tos_options_dashboard icon indicating copy to clipboard operation
tos_options_dashboard copied to clipboard

contract type not working

Open s-github-2 opened this issue 1 year ago • 0 comments

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'

s-github-2 avatar Sep 22 '23 21:09 s-github-2