Here is a description of long short ratio that I want to download
https://binance-docs.github.io/apidocs/futures/en/#long-short-ratio
In that site, there is a sentence: GET /futures/data/globalLongShortAccountRatio
Please tell me the code in python (import requests) for example "BTCUSDT", "5M" CASE
Not sure what you have done so far, but this may help you i think:
def get_global_long_short_accounts(self, symbol: 'str', period: 'str', startTime: 'str' = None, endTime: 'str' = None, limit: 'int' = 30) -> any:
"""
Long/Short Ratio (MARKET_DATA)
GET /futures/data/globalLongShortAccountRatio
"""
response = call_sync(self.request_impl.get_global_long_short_accounts(symbol, period, startTime, endTime, limit))
self.refresh_limits(response[1])
return response[0]
can read up on it here:
https://github.com/Binance-docs/Binance_Futures_python/blob/master/binance_f/requestclient.py
https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.