sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
6.06k stars 2.21k forks source link

Inconsistent Symbol Info Values (minQty, maxQty, stepSize) #1108

Closed bgsahan closed 2 years ago

bgsahan commented 2 years ago

I am using python-binance for trading BNBUSDT pair. I just noticed there are some inconsistency between Binance-API filters and the filters I receive when I use client.get_symbol_info('BNBUSDT') command.

When I use client.get_symbol_info('BNBUSDT'), I get {'filterType': 'LOT_SIZE', 'minQty': '0.01000000', 'maxQty': '9000.00000000', 'stepSize': '0.01000000'}

But on https://api.binance.com/api/v3/exchangeInfo, I get {"filterTpe":"LOT_SIZE","minQty":"0.00100000","maxQty":"900000.00000000","stepSize":"0.00100000"}

This is a problem for me because when I want to make a market order with 3 decimal precision it raises APIError(code=-1013): Filter failure: LOT_SIZE.

Is there a get around I can apply here to make market orders with 3 decimal precision?

bgsahan commented 2 years ago

I found out the mismatch was happening only in the test server. The exchange information is consistent otherwise.