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
client-python/polygon/rest/base.py
Lines 157 to 166 in b47b852
client-python/polygon/rest/base.py
Lines 186 to 187 in b47b852
As you can see, this is different from the way say the Aggregates call is done:
client-python/polygon/rest/aggs.py
Lines 41 to 45 in b47b852
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