alpaca-trade-api-js
alpaca-trade-api-js copied to clipboard
[Bug]: Date precision
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
The implementation of the data stream casts timestamps with nanosecond precision to javascript Date
object which has millisecond precision, this causes data loss.
Expected Behavior
Have the original datetime string with nanosecond precision.
SDK Version I encountered this issue in
alpaca-trade-api version: 3.0.1
Steps To Reproduce
1. Subscribe to any symbol using the data stream listener.
2. Get any trade event
Filled out the Steps to Reproduce section?
- [X] I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.
Anything else?
No response