When placing a New Order (TRADE), How do i set the “quantity” field to be equivalent to spending 10 USDT, or a fixed amount?
Hi. So far this functionality is not available in futures API. The calculation before sending the API request is required. But if you are also involved in the spot trading, you can use quoteOrderQty to specify the amount of quote asset (e.g. USDT) while placing an order. https://binance-docs.github.io/apidocs/spot/en/#new-order-trade
Thanks Ishuen, can I get help on how to calculate it?
what values am I converting?
quoteOrderQty = price * quantity
For example, assume that we want to buy BNB with 10 USDT and we don’t have to consider the filter restriction.
10 (USDT) = 361.4 (the current BNB price) * quantity
So the quantity we have to specify on the order is 10 / 361.4 (approximately equals to 0.027)
Thanks… that works