Hello guys, I am trying to place a futures order through api.
Here is the code below:
This code is making order of buying 12 FLM quantity with usdt of 6$ as price of FLM is 0.5 at that time .
But what I want to make order is 12$ usdt as quantity parameter and whatever the quantity can be get during that market price should be place order.
I want to pass USDT as quantity parameter, The reason for this is, for specific quantity of any token, we need to fetch price to calculate quantity with available balance for trade, this consumes some time, I don’t want to waste that time.
Is there any way to make USDT as quantity parameter?
That’s known as “quoteOrderQt” in Spot (more info: Beginner's Guide to QuoteOrderQty Market Orders), however this feature is not yet available on Futures, but we’re aware of its demand.
Kindly please available this option in futures too in next updates, there is big demand for that
I am totally agree with you. Without quoteOrderQt in futures_create_order Futures mode, we can’t use all quotedCoin to hold a position.
This is not good for a high-frequency operation(204 times per year),after backtesting of my model, my ROI decrease almost 7% ,assum I use 99% quotedCoin to hold a position,so…quoteOrderQt is important for me to operate.
Hope @aisling can heard my request.
Use the formula below:
qtd_quote = 100.00 “USDT”
size = round(qtd_quote/price,3)
qtd_quote: The quantity of USDT you want to trade.
price: Use a WebSocket to get the market price in real time. You can set the price for Limit orders.
size: variable assigned to the quantity parameter.
round: rounds the quotient of the division.
3: the precision (number of digits after the coma) allowed for the asset you want to trade.