Beginner's Guide to QuoteOrderQty Market Orders

Market orders using QuoteOrderQty or Reverse Market Orders is a feature currently only supported by the Binance API for SPOT orders.

To explain how it works and give example use cases, let’s review some finance terms.

A symbol is composed of a base asset and a quote asset.
Given a symbol BTCUSDT, BTC stands for the base asset and USDT stands for the quote asset.

One way to think about this is “How much USDT do I need to have in order to get an amount of BTC?”

MARKET orders
A regular MARKET order is when you buy or sell your base asset for the best available price. In the API, this would be using the parameter quantity.

Let’s say, the market price for 1 BTC is 10,900 USDT.

If you want to buy 1 BTC, you can send a MARKET order on the BUY side for 1 BTC and you will spend your 10,900 USDT.

If you want to sell 1 BTC, you can send a MARKET order on the sell side for 1 BTC and you will receive 10,900 USDT.

The reverse:

But what if, you have 100 USDT, and you want to spend all of it for the correct amount of BTC? In a regular market order, you would have to guess how much of the quantity (BTC) in the order. This could lead to either insufficient funds (because the quantity was too high) or leftover USDT (because the quantity was too low).

This is where the field quoteOrderQty for MARKET orders come in.

If you want to spend 100 USDT to get some BTC, you can send a MARKET quoteQtyOrder of 100 USDT on the BUY side.
If you want to receive 100 USDT but don’t know how much BTC to set, you can instead send a MARKET quoteQtyOrder of 100 USDT on the SELL side.

Summary:

Market Orders using quantity, is when you want to buy or sell a specific amount of the base asset.

Market Orders using quoteOrderQty is when you want to spend or receive a specific amount of the quote asset.

Questions?
Please leave a comment if something is still unclear.

Thank you!

sorry but I think this api option is buggy. I have just sent a couple or order using quoteOrderQty and it comes back with
{
code: -2010,
msg: ‘Account has insufficient balance for requested action.’
}

yes, I am sure I have the funds there and they are not locked.

2 Likes

What if I want to sell/receive ALL my USDT on each order I make?

1 Like

Excellent explanation, I had my doubts about how to use that parameter and what I was doing was obtaining the price and multiplying it by the quote asset but with this explanation you have saved me a lot of work

Taking your explanation as an example there is some way to apply the quoteQty with loans, that is, for example if I have 100 USDT to borrow that amount in BTC

@Saratoga quoteQty is not available from margin borrow endpoint yet, the work around could be calculating the amount in the client side.

Hi there, this is my first post and I would like first to thank everyone for many useful information I was able to find here !

However, I didn’t find the answer to that question : Regarding QuoteOrderQty Market orders, to which value does the PRICE_FILTER apply ?

It seems logical that it applies to the base price (the “real price”), but this amount may not be easy to assess with a QuoteOrderQty order. And the goal of the QuoteOrderQty, if I understand well, is actually to avoid searching for the base asset price. Or did I miss something ?

Thank you !

Edit: Or… maybe, thinking about that again… The price filters and percent price filters do not apply to QuoteOrderQty Market orders. That would make sense as market orders have no price…

there is no need to provide price for QuoteOrderQty Market orders, PERCENT_PRICE will not be hit for the request

Question removed and new topic opened.

Open a new topic pls. This is supposed to be used as a knowledge base.

Is there any plan to add QuoteOrderQty for STOP_LOSS orders too?

Using Kotlin or Java this is a summary of the chat above (which I am thankful for)

hey, maybe you can help? i tried next buy order
{
baseCurrency: ‘ETC’,
quoteCurrency: ‘USDT’,
quoteOrderQty: 10,
}

problem that in the result i have
cummulativeQuoteQty: ‘9.93280000’,

its not comission because comission is charging later from bought ETC

why it use only 9,9328 instead of 10. do you have idea?