|
@@ -351,14 +351,13 @@ if __name__ == '__main__':
|
|
|
subscribe_result = xt_trader.subscribe(acc)
|
|
|
print('对交易回调进行订阅,订阅后可以收到交易主推,返回0表示订阅成功', subscribe_result)
|
|
|
|
|
|
- bridge()
|
|
|
- # scheduler = BlockingScheduler()
|
|
|
- # scheduler.add_job(func=bridge, trigger='cron', day_of_week='0-4', hour='09', minute='40',
|
|
|
- # timezone="Asia/Shanghai")
|
|
|
- # try:
|
|
|
- # scheduler.start()
|
|
|
- # except (KeyboardInterrupt, SystemExit):
|
|
|
- # pass
|
|
|
+ scheduler = BlockingScheduler()
|
|
|
+ scheduler.add_job(func=bridge, trigger='cron', day_of_week='0-4', hour='09', minute='40',
|
|
|
+ timezone="Asia/Shanghai")
|
|
|
+ try:
|
|
|
+ scheduler.start()
|
|
|
+ except (KeyboardInterrupt, SystemExit):
|
|
|
+ pass
|
|
|
|
|
|
|
|
|
# xtdata.subscribe_quote('000001.SZ', '1d', '', '', count=1, callback=MA)
|