【发布时间】:2021-07-12 20:04:39
【问题描述】:
在 Jupyter 笔记本中,我试图抑制来自 Interactive Broker 的 TWS API 的错误 200 消息,例如:
错误 200,reqId 12755:未找到请求的安全定义,合约:Option(symbol='SPY', lastTradeDateOrContractMonth='20210721', strike=407.5, right='P', exchange='SMART' )
错误 200,reqId 12761:未找到请求的安全定义,合约:Option(symbol='SPY', lastTradeDateOrContractMonth='20210721', strike=412.5, right='P', exchange='SMART' )
我使用以下代码无济于事:
import warnings
warnings.filterwarnings('ignore')
warnings.simplefilter('ignore')
或
import warnings
warnings.filterwarnings('ignore')
【问题讨论】:
标签: python jupyter interactive-brokers tws