How to set Margin in Future API for a coin?

Hi All,

I want to set 25% of my Wallet balance as Margin but I am not able to find any API endpoint? Can someone please let me know how to adjust the margin before placing an order in finance future.

https://binance-docs.github.io/apidocs/futures/en/#change-initial-leverage-trade

You can adjust the leverage using this endpoint.

When I am setting leverage, I am not able to set margin manually. But in the UI you can select 25% along with 50X leverage. Then the cost will be 25% of your account balance and I want to implement this from API.

Unfortunately, this feature is only available using the UI. You have to calculate it yourself if you want to do this using the API.