"client.get_historical_klines" 来自 Binance API return 不划算
"client.get_historical_klines" from Binance API doesn't return good value
使用下面的函数得到了这个结果:
[1637971200000, '53756.29000000', '53859.31000000', '53747.77000000', '53853.57000000', '16.49892000', 1637971259999, '887949.68081540', 639, '12.00163000', '645905.65329110', '0']
client.get_historical_klines("BTCBUSD", Client.KLINE_INTERVAL_1MINUTE, "27 Nov, 2021 00:00:00","27 Nov, 2021 00:00:59")
如果我与同一日期的图表进行比较,蜡烛不匹配。
BTCBUSD Graph
我哪里错了?
谢谢
那是因为你看错了蜡烛。你的图片显示你是UTC+1,所以你必须查看01:00才能看到正确的handle
尝试在 binance.Client(api_key, secret_key, testnet)
中将 testnet
设置为 False
frame = pd.DataFrame(client.get_historical_klines(symbol, interval, lookback + " day ago UTC"))
使用下面的函数得到了这个结果:
[1637971200000, '53756.29000000', '53859.31000000', '53747.77000000', '53853.57000000', '16.49892000', 1637971259999, '887949.68081540', 639, '12.00163000', '645905.65329110', '0']
client.get_historical_klines("BTCBUSD", Client.KLINE_INTERVAL_1MINUTE, "27 Nov, 2021 00:00:00","27 Nov, 2021 00:00:59")
如果我与同一日期的图表进行比较,蜡烛不匹配。
BTCBUSD Graph
我哪里错了? 谢谢
那是因为你看错了蜡烛。你的图片显示你是UTC+1,所以你必须查看01:00才能看到正确的handle
尝试在 binance.Client(api_key, secret_key, testnet)
testnet
设置为 False
frame = pd.DataFrame(client.get_historical_klines(symbol, interval, lookback + " day ago UTC"))