Issue with placing market sell order on binance spot.

Hello,

I am using python-binance module. I have some issue with placing market sell order. My code is as follows. Currently I run in testnet.

client = Client(api_key=API_KEY, api_secret=API_SECRET, testnet=True)
print(client.create_order(symbol="BTCUSDT", side="SELL", type="MARKET",quantity=0.50000694))

After executing above code I got error as follows.

Traceback (most recent call last):
  File "c:\Users\admin\Desktop\Binance Buy-Sell\main.py", line 11, in <module>
    print(client.create_order(symbol="BTCUSDT", side="SELL", type="MARKET",quantity=0.50000694))
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\binance\client.py", line 1448, in create_order
    return self._post('order', True, data=params)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\binance\client.py", line 418, in _post
    return self._request_api('post', path, signed, version, **kwargs)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\binance\client.py", line 378, in _request_api
    return self._request(method, uri, signed, **kwargs)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\binance\client.py", line 359, in _request
    return self._handle_response(self.response)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\binance\client.py", line 368, in _handle_response
    raise BinanceAPIException(response, response.status_code, response.text)
binance.exceptions.BinanceAPIException: APIError(code=-1013): Filter failure: LOT_SIZE

What is the solution of this?

Thanks & Regards

Hi,
it’s because of the quantity of your order. Remove the 694 from the end at it will work. The decimal is too small and doesn’t match the minimum LOT SIZE of the BTCUSDT pair.