upstox / upstox-python

Official Python SDK for accessing Upstox API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to convert the expiry field from Instrument object

abbazs opened this issue · comments

commented

The expiry field of Instrument object has a value '1519237800000', how can I convert this to a human readable date?

This is actually a timestamp in milliseconds.
time_stamp = 1519237800000 / 1000
Firstly divide it by 1000 then use datetime.datetime.fromtimestamp(time_stamp).
This will return a datetime.datetime object.

We hope this message finds you well. We would like to inform you that the issue you reported is related to an outdated version of our API. As a result, we will be closing this issue since it is no longer valid. We understand the importance of staying up-to-date, so we strongly urge you to start planning your migration towards the latest version, v2, of our API. As part of this process, please be aware that our legacy v1 API and SDK are scheduled for deprecation soon.

Exciting news! We are thrilled to announce the release of our brand new V2 API version, bringing along various improvements and enhancements. You can access it at https://upstox.com/uplink/

To ensure a smooth transition, we recommend obtaining the most recent SDK (v2.0.0) by visiting: https://pypi.org/project/upstox-python-sdk/

For your convenience, all the necessary details regarding the API's functionalities can be found in our comprehensive API documentation: https://upstox.com/developer/api-documentation/

We sincerely appreciate your cooperation during this transition period, and our dedicated team is ready to assist you with any queries or support you may need while using the latest version of our API.

Thank you for being part of the Upstox community, and we look forward to providing you with an even better experience with our v2 API.

Best regards,
The Upstox Team