Search code examples
binance

Binance API error on quantity within range


Getting error, on Binance test API. SPOT TRADING

Symbol: BNBUSDT

Quantity: 0.331

Responce:
{"code":-1013,"msg":"Filter failure: LOT_SIZE"}

On testing on Quantity: 0.33

ORDER IS EXECUTED

On checking the LOT_SIZE

        "filterType": "LOT_SIZE",
        "minQty": "0.01000000",
        "maxQty": "9000.00000000",
        "stepSize": "0.01000000"

Can you please tell what error is causing the ERROR -1013, As the value 0.331 is within range?


Solution

  • The value 0.331 is within minQty and maxQty, but it does not respect the stepSize of 0.01000000. In other words you need to round your value to 2 decimal places.