Technical Indicators incorrect Time Conversion
@justinpolygon is already working on this.
Since Jun 22, 2024.
Assessment
This issue has not been assessed yet.
Description
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
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 362
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from massive-com/client-python
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 72/100
massive-com/client-python#876 · 1 comment ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 72/100
massive-com/client-python#1031 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
massive-com/client-python#1029 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
massive-com/client-python#1028 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
massive-com/client-python#1022 ·
All issues in massive-com/client-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100