Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contract type not working #4

Open
s-github-2 opened this issue Sep 22, 2023 · 0 comments
Open

contract type not working #4

s-github-2 opened this issue Sep 22, 2023 · 0 comments

Comments

@s-github-2
Copy link

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant