sammchardy / python-binance

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

Accessing the Mark Price #1361

Open B-erkamklnc opened 1 year ago

B-erkamklnc commented 1 year ago

Sorry for my bad English. I need to access the mark price in futures, but I can't find a function like the last price function. All functions that can be used to access the mark price seem to include the requirement to be in position. However, I am looking for a way to access even if I am not in the position. I saw that there is an API path in the Binance documentation, but I couldn't find this feature in the library. Can you show me a way to access the mark price? If it is not possible, can you add this feature in the Binance API documentation?

lucifgy commented 12 months ago

If I understood you correctly then there is both futures_mark_price(self, params) for https://binance-docs.github.io/apidocs/futures/en/#mark-price and futures_coin_mark_price(self, params) for https://binance-docs.github.io/apidocs/delivery/en/#index-price-and-mark-price in the wrapper. And there seem to be no mistakes with the requests.