Swagger_client error

I am getting error of no module named swagger_client when I try to get option chain data. I have installed upstox SDK and it is working. Can anyone point out what is the issue.

Could you please share a screenshot of the error? On my end, I can access the option chain data using the Python SDK with the following code:

import upstox_client
from upstox_client.rest import ApiException
configuration = upstox_client.Configuration()
configuration.access_token = '{access_token}'
api_instance = upstox_client.OptionsApi(upstox_client.ApiClient(configuration));
api_version = '2.0'
try:
    api_response = api_instance.get_put_call_option_chain("NSE_INDEX|Nifty 50","2024-08-08")
    print(api_response)
except ApiException as e:
    print("Exception when calling OptionChain api %s\n" % e)

Please ensure you are using the latest version of the SDK to access the option chain API.

1 Like