- 精华
- 0
- 在线时间
- 2 小时
- UID
- 297537
- 积分
- 2
- 帖子
- 1
- 阅读权限
- 10
- 注册时间
- 2020-11-7
- 最后登录
- 2021-7-25
- 精华
- 0
- UID
- 297537
- 积分
- 2
- 帖子
- 1
- 主题
- 1
- 阅读权限
- 10
- 注册时间
- 2020-11-7
- 最后登录
- 2021-7-25
|
tbpy.init()
result = tbpy.get_history_n(
symbol='cu2101.SHFE', frequency='2h', count=10,
flag=tbpy.QuoteFlag.Null, fields=['open', 'high', 'time'], timeout='100s')
print(result)
第一次:
{'open': array([58190., 58280., 57780., 57900., 57970., 57960., 58110., 58150.,
58110., 58250.]), 'high': array([58440., 58290., 57930., 58000., 58090., 58100., 58140., 58250.,
58200., 58580.]), 'time': array([datetime.datetime(2021, 1, 4, 20, 0),
2秒后查询:
{'open': array([], dtype=float64), 'high': array([], dtype=float64), 'time': array([], dtype=float64)}
感觉需要等待几分钟,才可以恢复 |
|