我正在尝试将字典opt_chain
作为参数传递
opt_chain = {
'symbol': 'AAPL',
'contractType': 'CALL',
'optionType': 'S',
'fromDate': '2021-07-18',
'afterDate': '2021-07-19',
'strikeCount': 4,
'includeQuotes': True,
'range': 'ITM',
'strategy': 'ANALYTICAL',
'volatility': 29.0
}
到函数 apiget_options_chain
但我收到以下错误
option_chains = td_client.get_options_chain(args_dictionary = opt_chain)
TypeError: get_options_chain() got an unexpected keyword argument 'args_dictionary'
这是我运行的代码(摘录):
opt_chain = {
'symbol': 'AAPL',
'contractType': 'CALL',
'optionType': 'S',
'fromDate': '2021-07-18',
'afterDate': '2021-07-19',
'strikeCount': 4,
'includeQuotes': True,
'range': 'ITM',
'strategy': 'ANALYTICAL',
'volatility': 29.0
}
option_chains = td_client.get_options_chain(args_dictionary = opt_chain)
pprint.pprint(option_chains)
这是 Python v3.6.9
任何帮助是极大的赞赏,
谢谢