Market Order: quoteOrderQty VS quantity

Hello,

I am wondering whether it is better to place a market order using quoteOrderQty vs quantity in regards to performance benefits when using one or the other.

Also, is the quoteOrderQty equivalent to the total cost ie. including fees or not ?

For instance, if I place a Buy Market order with quoteOrderQty=100 for the symbol BTCUSD, am I guaranteed to spend exactly 100USD ?

Thanks!

You can test with Spot Testnet (https://testnet.binance.vision/)

Example:
POST https://testnet.binance.vision/api/v3/order?symbol=ETHBTC&side=SELL&type=MARKET&quoteOrderQty=0.01&timestamp=xxx&signature=xxx

Response:

{
“symbol”: “ETHBTC”,

“price”: “0.00000000”,
“origQty”: “0.50251000”,
“executedQty”: “0.50251000”,
“cummulativeQuoteQty”: “0.00999994”,
“status”: “FILLED”,
“timeInForce”: “GTC”,
“type”: “MARKET”,
“side”: “SELL”,
“fills”: [
{
“price”: “0.01990000”,
“qty”: “0.50251000”,
“commission”: “0.00000000”,
“commissionAsset”: “BTC”,
“tradeId”: 3
}]}

As you can see, I’ve put quoteOrderQty=0.01, but the executed is 0.00999994 (“cummulativeQuoteQty”) since it needs to respect the quantity value limits, which was converted to qty 0.50251000 (origQty).
Then, checking the “fills” part, you can see separation between qty and commission, so commission is not included.
More info: Beginner's Guide to QuoteOrderQty Market Orders

1 Like

Thanks!

1 Like