LUCIT-Systems-and-Development / unicorn-binance-rest-api

A Python SDK by LUCIT to use the Binance REST API`s (com+testnet, com-margin+testnet, com-isolated_margin+testnet, com-futures+testnet, us, tr) in a simple, fast, flexible, robust and fully-featured way.
https://unicorn-binance-rest-api.docs.lucit.tech
Other
61 stars 17 forks source link

Support for retrieving futures commission rates? #18

Closed hawkeye-bot closed 2 years ago

hawkeye-bot commented 2 years ago

While making use of this excellent library, I was looking to retrieve the user commission rates from the endpoint https://binance-docs.github.io/apidocs/futures/en/#user-commission-rate-user_data. Unfortunately I couldn't find the function in the rest-manager to achieve this. Would it be possible to have support added for this endpoint?

Or if I've overlooked the function, I'd appreciate somebody pointing me to the right place!

Kind regards!

oliver-zehentleitner commented 2 years ago

Yes its missing!

It should be easy to add, you want to make a PR?

oliver-zehentleitner commented 2 years ago

I dont trade futures and i dont get the permissions to work atm. (error 2015) Can you try please? https://github.com/LUCIT-Systems-and-Development/unicorn-binance-rest-api/blob/master/example_commission_rate.py

oliver-zehentleitner commented 2 years ago

Ok, it seems binance needed a while till 2015 error gets removed.

I was able to successfully test the new function: example_futures_commission_rate.py {'symbol': 'BTCUSDT', 'makerCommissionRate': '0.000200', 'takerCommissionRate': '0.000400'}

https://unicorn-binance-rest-api.docs.lucit.tech/unicorn_binance_rest_api.html?highlight=futures_commission_rate#unicorn_binance_rest_api.manager.BinanceRestApiManager.futures_commission_rate

oliver-zehentleitner commented 2 years ago

https://github.com/LUCIT-Systems-and-Development/unicorn-binance-rest-api/releases/tag/1.4.0