92 views
0

INFO – 模拟交易下单 PYSDK_insert_f26d976d8e34004e539cbf8dc6c7b1a6: 时间:2020-09-11 23:10:00.000000,合约:SHFE.ni2011,开平:CLOSETODAY,方向:SELL,手数:1,价格:118030.0
INFO – 模拟交易委托单 PYSDK_insert_f26d976d8e34004e539cbf8dc6c7b1a6: 全部成交

就是这些信息,我想获取后记录进文本里

Answered question
1

启动的脚本里增加这些:

import logging
logger = logging.getLogger("TqApi")
handler = logging.FileHandler('tqsdk.log')
handler.setLevel(logging.INFO)
logger.addHandler(handler)

Answered question
You are viewing 1 out of 1 answers, click here to view all answers.