Hi,
I am observing an Error while fetching data from library
Code:
from dhanhq import dhanhq
client_id=“1104246630”
access_token=“eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJkaGFuIiwicGFydG5lcklkIjoiIiwiZXhwIjoxNzM3Mzg1NDc5LCJ0b2tlbkNvbnN1bWVyVHlwZSI6IlNFTEYiLCJ3ZWJob29rVXJsIjoiIiwiZGhhbkNsaWVudElkIjoiMTEwNDI0NjYzMCJ9.2oScV4lhVvYDA0jM8blFcrqKWlCRgDbjB5-U9-oCeo280ps4dNK7XZYbh136kq9Iqdwbztdxed0uIceRF6pQOg”
dhan = dhanhq(client_id,access_token)
print(dhan.get_positions())
ERROR DESCRIPTION:
PS C:\Users\anupojs\AppData\Local\Programs\Python\Python313\Scripts> & C:/Users/anupojs/AppData/Local/Programs/Python/Python313/python.exe c:/Users/anupojs/AppData/Local/Programs/Python/Python313/Scripts/ConnectDhan.py
ERROR:root:Exception in dhanhq>>get_positions: HTTPSConnectionPool(host=‘api.dhan.co’, port=443): Max retries exceeded with url: /v2/positions (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Basic Constraints of CA cert not marked critical (_ssl.c:1018)’)))
{‘status’: ‘failure’, ‘remarks’: “HTTPSConnectionPool(host=‘api.dhan.co’, port=443): Max retries exceeded with url: /v2/positions (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Basic Constraints of CA cert not marked critical (_ssl.c:1018)’)))”, ‘data’: ‘’}
Please help me to solve this error