LOT_SIZE error despite the correct stepsize (I think)

I’ve read quite a few topics on this and thought I had understood the filter correctly…

I’m attempting to sell 27.4 XRP on the XRPUSDT pair at market price. The LOT_SIZE filter for XRPUSDT says:

        "stepSize": "0.1",
        "filterType": "LOT_SIZE",
        "maxQty": "20000000",
        "minQty": "0.1"

The code I’m using is a simple one:

from binance import Client
from credentials import binance_api_key, binance_api_secret

def go_sell(symbol, base_quantity_rounded):
    client = Client(binance_api_key, binance_api_secret)

    # Order side
    side = "SELL"

    print(f"We are trying to sell: base_quantity_rounded = {base_quantity_rounded}")
    # Place a market order
    order = client.create_order(

    status = order['status']

    return status

status = go_sell("XRPUSDT", 27.4)

Which gives me the famous:

binance.exceptions.BinanceAPIException: APIError(code=-1013): Filter failure: LOT_SIZE

The way I thought this filter worked was that I had to use the correct stepSize (a value rounded to 0.1 decimal) and of course match the MIN_NOTIONAL of 5 USDT (XRPUSDT price is around 0.47 at the time of writing) 27.4*0.47 > 5 USDT

Why is it I’m still getting the LOT_SIZE error?

Nobody knows?

Well, after chatting with support, it turned out I was using the wrong endpoint to get my LOT_SIZE details from. I was using the Futures endpoint for Spot trading… :smiley:

The issue is that you are checking the wrong exchangeInfo endpoint. https://fapi.binance.com/fapi/v1/exchangeInfo is for the Futures, since it starts with FAPI.

For spot you should be checking this one GET /api/v3/exchangeInfo Binance API Documentation

“filterType”: “LOT_SIZE”,
“minQty”: “1.00000000”,
“maxQty”: “9222449.00000000”,
“stepSize”: “1.00000000”

setpSize for this asset is 1 meaning that you can’t have any decimals

Glad to know you’ve found the source of issue. :slight_smile: