massive-com / massive-com/client-python
Technical Indicators incorrect Time Conversion
@justinpolygon đang làm issue này rồi.
Từ ngày 22/6/2024.
- Ngôn ngữ chính
- Python
- Star
- 1.5k
- Fork
- 362
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Describe the bug
The time conversion is done from datetime when querying for technical indicators is to a nanoseconds resolution which conflicts with what Polygon is expecting (milliseconds). This, in turn, leads to Polygon thinking the wrong period is queried.
Code Links
- https://github.com/polygon-io/client-python/blob/b47b85245c24dcfd116ee93338ceba0c5f341f77/polygon/rest/base.py#L157-L166
- https://github.com/polygon-io/client-python/blob/b47b85245c24dcfd116ee93338ceba0c5f341f77/polygon/rest/base.py#L186-L187
As you can see, this is different from the way say the Aggregates call is done:
https://github.com/polygon-io/client-python/blob/b47b85245c24dcfd116ee93338ceba0c5f341f77/polygon/rest/aggs.py#L41-L45
The aggregates call is the right way. The SMA indicator also expects a millisecond timestamp: https://polygon.io/docs/stocks/get_v1_indicators_sma__stockticker
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.