-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
奇怪 我都跑起来是这样 #5
Comments
这是成功的代码: from okx.app.market import MarketSPOT
from okx.app.utils import eprint
if __name__ == '__main__':
proxy_host = None
marketSPOT = MarketSPOT(proxy_host=proxy_host)
history_candle = marketSPOT.get_history_candle(
instId='BTC-USDT',
start='2024-01-01 00:00:00',
end='2024-01-01 22:00:00',
bar='2H',
)
eprint(history_candle) 输出结果: {'code': '0', 可能需要注意的:
|
感谢作者的耐心回复。我使用的是 https://github.com/pyted/okx/blob/master/examples/2.4%20APP%20%E7%8E%B0%E8%B4%A7%E8%A1%8C%E6%83%85-%E5%8E%86%E5%8F%B2K%E7%BA%BF.ipynb 我示例里,第一次是能够得到okx返回的数据,在包处理组合时候,出现的错误情况。 另外作者你推荐的用 proxy_host okx_resender 能docker就好啦 |
更新一下底层: pip3 install candlelite --upgrade Pandas版本过低,有BUG |
paux 1.0.13 |
注意urllib3的版本不要过高,Pandas不要低于2 |
` history_candle = self.market.get_history_candle(
instId='BTC-USDT',
start='2024-01-01 00:00:00',
end='2024-01-01 23:59:00',
bar='2H',
)
返回的是
{'code': 'CANDLE_START_ERROR', 'data': array([], shape=(0, 9), dtype=float64), 'msg': 'BTC-USDT[candle empty]'} candle.shape= (0, 9)
The text was updated successfully, but these errors were encountered: