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

binance.us trading-fee endpoint #1278

Open MomentumRising opened 1 year ago

MomentumRising commented 1 year ago

The endpoint for binance.us to get fees based on assets is https://api.binance.us/sapi/v1/asset/query/trading-fee, however, python-binance does not work properly for this endpoint for .us tld. I see the following in the code and assume it works for binance.com: return self._request_margin_api('get', 'asset/tradeFee', True, data=params). I can't find reference to "trading-fee" anywhere at all in the source code. There were recent updates, back in September, to the fee endpoints for the .us tld. Perhaps that broke something for python-binance.

halfelf commented 1 year ago

trading-fee must be a binance.us unique API endpoint. You can try the private method client._request_api('get', 'asset/query/trading-fee', signed=True, data=params) to call it directly.