contract type not working
s-github-2 opened this issue · 0 comments
s-github-2 commented
contract_type was not getting used - following change fixes it
# Temporarily stores JSON data in the browser (generally safe to store up to 2MB of data)
@app.callback(Output('storage-option-chain-all', 'data'),
[Input('submit-button-state', 'n_clicks'), Input('storage-historical', 'data'), Input('storage-quotes', 'data')],
[State('memory-ticker', 'value'), State('memory-expdays','value'), State('memory-confidence','value'),State('memory-contract-type','value')]
)
def get_option_chain_all(n_clicks, hist_data, quotes_data, ticker, expday_range, confidence_lvl, contract_type):
if ticker is None:
raise PreventUpdate
json_data = tos_get_option_chain(ticker, contractType=contract_type, rangeType='ALL', apiKey=API_KEY) # changed from 'ALL'