-3

Problem with placing an order for spot trading in binance. I want to sell a currency and get another in the amount that I transfer by value. The API says :param quoteOrderQty: amount the user wants to spend (when buying) or receive (when selling) of the quote asset, applicable to MARKET orders (link), that is, this is exactly the argument to which I pass the amount that I want to receive when selling. Example:

client.create_order(symbol="BUSDUSDT", side="sell", type="MARKET",
                                                     quoteOrderQty=15)

after executing it, I should receive 15 USDT, which doesn't happen. The order is filled and exactly 15 BUSD are sold, 14.9985 USDT are bought :)

enter image description here

What is the problem?

Sss
  • 15
  • 2
  • 7

1 Answers1

0

MARKET orders using quoteOrderQty specifies the amount the user wants to spend (when buying) or receive (when selling) the quote asset; the correct quantity will be determined based on the market liquidity and quoteOrderQty

By using quoteOrderQty for MARKET order, server will execute the order and fill as much as possible. But the final received quantity can be a little bit different than quoteOrderQty.

Binance
  • 69
  • 6
  • Why the final quantity is just "a little bit" different than quoteOrderQty? From what I understand the former is in the unit of base asset while the latter is in the unit of quote asset, aren't they? Please correct my understanding if I am wrong. – chanp Sep 20 '22 at 19:37
  • When the SELL order is submitted, there’s calculation of quantity based on quoteOrderQty=15 that needs to follow the LOT_SIZE filter rule as well (which doesn’t allow BUSDUSDT to have decimals), therefore instead of selling quoteOrderQty/market price = 15.00150015 BUSD, it’s placed with 15BUSD ( the max it can be filled based on the LOT_SIZE) and finally the market price leads to receiving 14.9985USDT. Hope this helps to clarify better. Note: - You can check the filters using https://binance-docs.github.io/apidocs/spot/en/#exchange-information – Binance Sep 22 '22 at 18:22