Idirect-Tech / Breeze-Python-SDK

The official Python client library for the ICICI Securities trading APIs
MIT License
53 stars 28 forks source link

invalid checksum error #16

Closed mailchalla closed 1 year ago

mailchalla commented 1 year ago

tried running your example Webinar_Strategy_05_DEC_2022.py file, I am getting invalic checksum error for get_quotes API all values for apikey, secreykey etc are correct as the get_historical_data_v2 is giving right results, but the other APIs where a checksum is required are failing, please fix these at the earliest

Idirect-Tech commented 1 year ago

Hi, no checksum calculation is required in the demo strategy. get_quotes API is being called through SDK library only

adeshct commented 1 year ago

This majorly happening when we are running our codes in applications installed in local system such as PyCharm. However, the same works in Colab.

For Example:

breeze.get_portfolio_holdings(exchange_code="NFO",
                              from_date="2022-08-01T06:00:00.000Z",
                              to_date="2022-08-19T06:00:00.000Z",
                              stock_code="",
                              portfolio_type="")
{'Status': 5, 'Error': 'Authentication Fail :: Invalid Checksum.'}
Sriram1974 commented 1 year ago

Has this issue been resolved ? I am facing the same issue. get_customer_details() works and all other API s throw invalid checksum error

mailchalla commented 1 year ago

Yaah

Make the below call after generate_session() call

This has solved tge problem for me

On Fri, 14 Apr 2023 at 10:04 PM, Sriram1974 @.***> wrote:

Has this issue been resolved ? I am facing the same issue. get_customer_details() works and all other API s throw invalid checksum error

— Reply to this email directly, view it on GitHub https://github.com/Idirect-Tech/Breeze-Python-SDK/issues/16#issuecomment-1508930289, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKJJT42AR62MHRSLSAP4L3XBF373ANCNFSM6AAAAAATMQXP3A . You are receiving this because you authored the thread.Message ID: @.***>

-- Subhash

mailchalla commented 1 year ago

issue is now closed by making sure that "isec.ws_connect()* call is made before any api call.