Filter failure: LOT_SIZE when placing Market order with quoteOrderQty during initial listing

Hi all,

I came across the Filter failure: LOT_SIZE error (code -2010) several times during the recent TKO initial crypto coin listing. I got this error about 8 times with the same request before a successful order was placed and executed.

My code takes advantage of the quoteOrderQty param to market buy a coin based on total USDT value. Here is a simplified version of my logs:

{'code': -2010, 'msg': 'Filter failure: LOT_SIZE'}
{'code': -2010, 'msg': 'Filter failure: LOT_SIZE'}
{'code': -2010, 'msg': 'Filter failure: LOT_SIZE'}
{'code': -2010, 'msg': 'Filter failure: LOT_SIZE'}
{'code': -2010, 'msg': 'Filter failure: LOT_SIZE'}
{'code': -2010, 'msg': 'Filter failure: LOT_SIZE'}
{'code': -2010, 'msg': 'Filter failure: LOT_SIZE'}
{'code': -2010, 'msg': 'Filter failure: LOT_SIZE'}
Successfully placed market order

My understandings are that during high volatility, the server is unable to calculate the quantity param based on the supplied quoteOrderQty param quick enough due to high fluctuations in the market price and as a result, returned the LOT_SIZE error. Once the price of the coin slows down, the time taken to calculate quantity is sufficient to place the order and hence is why after 8 unsuccessful trials, my order was eventually placed. Is quoteOrderQty slower than placing a normal market order with quantity?

I was wondering if someone with experience could confirm my understandings of this. I understand I could potentially just use the quantity param but this would require guessing and may lead to insufficient balance or left over. I am open to all suggestions and potential solutions to work around this.

Cheers!

I experienced this problem also.
And it has been reported by at least 2 others in the Telegram channel.
An explanation would be MOST welcome!
:pray:

2 Likes

I wouldn’t call this a problem, it’s natural to receive LOT_SIZE failure if the given quoteOrderQty is too low, which originates a quantity that’s lower than the min allowed quantity rule.

Therefore, unfortunately there’s not much that can be done, you need to provide higher quoteOrderQty if you want to reduce LOT_SIZE failure messages or wait for a less volatile market to calculate quoteOrderQty or as you’ve mentioned, use the quantity parameter.

I get that the nature behind the LOT_SIZE failure itself is justified.

However, in my situation, the price of the token TKO many milliseconds before my successful order was less than what I have bought it at. And the idea behind quoteOrderQty, if I’m not wrong, is to calculate the quantity based on quoteOrderQty / price of TKO. In other words, the lower than price, the higher the quantity. In my case, I received the LOT_SIZE failure when the quantity is supposedly higher than when I purchased it.

As an example, assume I used $1000 as my quoteOrderQty:
TKO price when LOT_FAILURE was around $2.60 USDT.
So quantity would have been 1000/2.60 = 384.6153

TKO price afterLOT_FAILURE when my order was successful was around $4.90 USDT.
So quantity would have been 1000/4.90 = 204.0816

I was successfully able to place an order when the calculated quantity was less than the quantity during a LOT_FAILURE. Could you please explain as to why this occurred?

2 Likes

Bump!

This problem also occurs to me. I think that some Binance API fix is required.

I post an order:

{
  "id": 181,
  "method": "order.place",
  "params": {
    "apiKey": <apiKey>,
    "newClientOrderId": "1-1-2851",
    "newOrderRespType": "FULL",
    "quoteOrderQty": "1068.61238789",
    "side": "BUY",
    "symbol": "BTCUSDT",
    "timestamp": 1689981040998,
    "type": "MARKET",
    "signature": <signature>
  }
}

on symbol:

{
            "symbol": "BTCUSDT",
            "status": "TRADING",
            "baseAsset": "BTC",
            "baseAssetPrecision": 8,
            "quoteAsset": "USDT",
            "quotePrecision": 8,
            "quoteAssetPrecision": 8,
            "baseCommissionPrecision": 8,
            "quoteCommissionPrecision": 8,
            "orderTypes": [
                "LIMIT",
                "LIMIT_MAKER",
                "MARKET",
                "STOP_LOSS_LIMIT",
                "TAKE_PROFIT_LIMIT"
            ],
            "icebergAllowed": true,
            "ocoAllowed": true,
            "quoteOrderQtyMarketAllowed": true,
            "allowTrailingStop": true,
            "cancelReplaceAllowed": true,
            "isSpotTradingAllowed": true,
            "isMarginTradingAllowed": false,
            "filters": [
                {
                    "filterType": "PRICE_FILTER",
                    "minPrice": "0.01000000",
                    "maxPrice": "1000000.00000000",
                    "tickSize": "0.01000000"
                },
                {
                    "filterType": "LOT_SIZE",
                    "minQty": "0.00000100",
                    "maxQty": "900.00000000",
                    "stepSize": "0.00000100"
                },
                {
                    "filterType": "ICEBERG_PARTS",
                    "limit": 10
                },
                {
                    "filterType": "MARKET_LOT_SIZE",
                    "minQty": "0.00000000",
                    "maxQty": "100.00000000",
                    "stepSize": "0.00000000"
                },
                {
                    "filterType": "TRAILING_DELTA",
                    "minTrailingAboveDelta": 10,
                    "maxTrailingAboveDelta": 2000,
                    "minTrailingBelowDelta": 10,
                    "maxTrailingBelowDelta": 2000
                },
                {
                    "filterType": "PERCENT_PRICE_BY_SIDE",
                    "bidMultiplierUp": "5",
                    "bidMultiplierDown": "0.2",
                    "askMultiplierUp": "5",
                    "askMultiplierDown": "0.2",
                    "avgPriceMins": 1
                },
                {
                    "filterType": "NOTIONAL",
                    "minNotional": "10.00000000",
                    "applyMinToMarket": true,
                    "maxNotional": "9000000.00000000",
                    "applyMaxToMarket": false,
                    "avgPriceMins": 1
                },
                {
                    "filterType": "MAX_NUM_ORDERS",
                    "maxNumOrders": 200
                },
                {
                    "filterType": "MAX_NUM_ALGO_ORDERS",
                    "maxNumAlgoOrders": 5
                }
            ],
            "permissions": [
                "SPOT"
            ],
            "defaultSelfTradePreventionMode": "NONE",
            "allowedSelfTradePreventionModes": [
                "NONE",
                "EXPIRE_TAKER",
                "EXPIRE_MAKER",
                "EXPIRE_BOTH"
            ]
        }
}

And I receive:
Error: [Binance Status -2010]: Filter failure: LOT_SIZE

From my point of view, LOT_SIZE error should not happen if quoteOrderQty is specified instead of quantity (otherwise there is no point in specifying quoteOrderQty if this is too unreliable).

I have also noticed that this error started to happen more often when using Binance Websocket API instead of HTTP API.