massive-com / massive-com/client-python
Technical Indicators incorrect Time Conversion
@justinpolygon y travaille déjà.
Depuis le 22/6/2024.
- Langage dominant
- Python
- Étoiles
- 1.5k
- Forks
- 362
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Évaluation
Cette issue n'a pas encore été évaluée.