OpenApi-5p / py5paisa

Official Python SDK for 5paisa APIs natively written in VB .NET
https://5paisa.github.io
93 stars 69 forks source link

Expiry Dates of BSE Sensex Error #260

Open Ashwin-Ajith opened 1 year ago

Ashwin-Ajith commented 1 year ago

Description

I was trying to get the expiries of BSE Index Sensex. But I'm getting the wrong expiry dates. I think it is Nifty expiry dates.

What I Did

client.get_expiry("B","SENSEX")

Response: {'Expiry': [{'Exch': 'B', 'ExchType': 'D', 'ExpiryDate': '/Date(1695321000000+0530)/'}, {'Exch': 'B', 'ExchType': 'D', 'ExpiryDate': '/Date(1695925800000+0530)/'}, {'Exch': 'B', 'ExchType': 'D', 'ExpiryDate': '/Date(1696530600000+0530)/'}, {'Exch': 'B', 'ExchType': 'D', 'ExpiryDate': '/Date(1697135400000+0530)/'}, {'Exch': 'B', 'ExchType': 'D', 'ExpiryDate': '/Date(1697740200000+0530)/'}, {'Exch': 'B', 'ExchType': 'D', 'ExpiryDate': '/Date(1698345000000+0530)/'}, {'Exch': 'B', 'ExchType': 'D', 'ExpiryDate': '/Date(1698949800000+0530)/'}, {'Exch': 'B', 'ExchType': 'D', 'ExpiryDate': '/Date(1700764200000+0530)/'}], 'Message': 'Success', 'Status': 0, 'lastrate': [{'Exch': 'B', 'ExchType': 'C', 'LTP': 66060.03,

When I'm parsing the first datetime in milliseconds I'm getting "2023-09-21 18:30:00" It should be "2023-09-22". It's the same for all the dates. It is d-1. Please resolve it Screenshot 2023-09-22 142827

taurus05 commented 1 year ago

It's showing same expiry date for Nifty and Banknifty as well. @5paisa @ba11b0y Please look into this. thanks!