设为首页收藏本站

 找回密码
 注册
查看: 564|回复: 0

tbpy 频繁查询(2s间隔)数据为空 [复制链接]

Rank: 1

精华
0
UID
297537
积分
2
帖子
1
主题
1
阅读权限
10
注册时间
2020-11-7
最后登录
2021-7-25
发表于 2021-1-6 01:22:12 |显示全部楼层
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)}


感觉需要等待几分钟,才可以恢复
您需要登录后才可以回帖 登录 | 注册

bottom

静态版|手机版|联系我们|交易开拓者 ( 粤ICP备07044698   

GMT+8, 2024-3-29 14:07

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部