We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 319f28b commit 3538644Copy full SHA for 3538644
alpaca_trade_api/entity.py
@@ -135,6 +135,8 @@ def __getattr__(self, key):
135
val = self._raw[key]
136
if key == 'timestamp':
137
if val > 1000000000000000000:
138
+ # this is for supporing timestamp represented in nanosecond.
139
+ # the alpaca data api uses nanoseconds. polygon uses microseconds.
140
return pd.Timestamp(val, tz=NY)
141
return pd.Timestamp(val, tz=NY, unit='ms')
142
return val
0 commit comments