How to create contract based order with percentage of balance(Delivery type or Coin-M)

Hi team, Greetings of the day!

We have implemented our custom bot, We have to place an order with percentage of balance in USD Coin-M.

For Ex: In my UI we have slide bar where we can slide and select some %, lets say 45% and now we need to place order with 45% of balance with USD Coin-M.

I’m able to place order in USD Coin-M with Number of Contracts, let’s say 15 contracts, But we are unable to place order with percentage of balance, let’s say we have 2 BTC available balance, from this available balance we need place order with 5% of available balance (0.10 BTC).

We have been trying to implement this from past few days. It will be great, if you provide with your suggestion to implement the above. Also please provide API information if any available for this.

Below is the screenshot from Binance as a reference, which is excepting from our custom UI.
image

Thanks

Any update on this post as I am facing the same problem. Can anyone help me?

Hi @aisling
It will be great if you assist on this, we have got struck form past few days.

Thanks in advance.

Hi @SreekanthAvala, the % is not an available feature in the API, you need to consult your account’s balance (Binance API Documentation) and locally calculate the quantity equivalent of a certain % before submitting an order.

Can you please describe a little bit more and let me know the approach which I need to follow?