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(
symbol=symbol,
side=side,
type=Client.ORDER_TYPE_MARKET,
quantity=base_quantity_rounded
)
status = order['status']
return status
status = go_sell("XRPUSDT", 27.4)
print(status)
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?