py5paisa
py5paisa copied to clipboard
access_token=None when fetching market depth
- 5paisa Python SDK version: py5paisa-0.5.3.dist-info
- Python version: 3.8.10
- Operating System: Ubuntu
Description
I get the "Logged in!!" message. Then I am trying to fetch market depth with the provided example which fails with the following nondescript message:
'access_token'
Check the following line(825) on py5paisa.py
def market_depth_token(self):
try:
response = self.session.post(self.MARKET_DEPTH_ROUTE, headers=self.jwt_headers).json()
This returns the following error response which is not very helpful.
{'body': {'CacheTime': 1, 'Data': None, 'Message': 'Error while processing your request.', 'Status': -1, 'TimeStamp': '/Date(1658726873071+0530)/'}, 'head': {'responseCode': '5PMD', 'status': '0', 'statusDescription': 'Success'}}
As a result the access_token is None and market_depth_url is malformed as follows:
wss://openapi.5paisa.com/ws?subscription-key=c89fab8g895a426d9e00db380b567027&access_token=None
I am also getting the error with the market depth api
Get19:06:23 | Logged in!! <py5paisa.py5paisa.FivePaisaClient object at 0x7fc7cc7bc160> 19:06:23 | 'access_token' None
we are looking into it, we will resolve it soon.
we are looking into it, we will resolve it soon.
Can you give me a tentative date ? This query remained unanswered and so I have already waited for 2 weeks. Just let me know a tentative time frame, so I can plan accordingly.
The issue is fixed, please update the library and let us know if any issues.