如何从python中获取二进制未来硬币数据

zsohkypk  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(238)

我应该使用binance.client中的什么函数来获取未来硬币的历史数据?这个脚本适用于现金符号,但不适用于未来的硬币。似乎“client.get\u historical\u klines”函数不能下载将来的硬币数据,但我在binance包中找不到正确的函数。

from binance.client import Client
from datetime import datetime

binance_api_key = '...'
binance_api_secret = '...'
symbol = 'BTCUSD_210924' #with 'BTCUSDT' for example works perfectly...
kline_size = '1h'
date_beg = datetime.strptime('1 Jan 2021', '%d %b %Y')
date_end = datetime.strptime('25 Apr 2021', '%d %b %Y')

client = Client(api_key=binance_api_key, api_secret=binance_api_secret)
raw = client.get_historical_klines(symbol, kline_size, date_beg.strftime("%d %b %Y %H:%M:%S"), date_end.strftime("%d %b %Y %H:%M:%S"))

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题