w00152651 发表于 2021-1-6 01:22:12

tbpy 频繁查询(2s间隔)数据为空

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)}


感觉需要等待几分钟,才可以恢复
页: [1]
查看完整版本: tbpy 频繁查询(2s间隔)数据为空