币安python获取api

时间:2021-06-07 01:23:49

标签: python api

这里是我要下载的多空比率说明

https://binance-docs.github.io/apidocs/futures/en/#long-short-ratio

在那个站点,有一句话:GET /futures/data/globalLongShortAccountRatio

请告诉我python中的代码(导入请求)例如“BTCUSDT”、“5M”CASE

1 个答案:

答案 0 :(得分:0)

不确定你到目前为止做了什么,但我认为这可能对你有帮助:

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]

可以在这里阅读:

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