Closed marcel-dehaan closed 2 years ago
Similar to #109
API_KEY = "" header = {"Authorization": f"Bearer {API_KEY}"} ts_start = 1643605200000000000 ts_end = 1643691600000000000 url = f"https://api.polygon.io/vX/quotes/TSLA?timestamp.gt={ts_start}×tamp.lt={ts_end}&limit=50000&order=asc" json = requests.get(url, headers=header).json() assert not hasattr(json, 'next_url') ticks = json['results'] print(pd.Timestamp(ts_start)) print(pd.Timestamp(ts_end)) print(len(ticks)) print(pd.Timestamp(ticks[0]['sip_timestamp'])) print(pd.Timestamp(ticks[-1]['sip_timestamp'])) --> 2022-01-31 05:00:00 --> 2022-02-01 05:00:00 --> 315 --> 2022-02-01 00:00:20.533433409 --> 2022-02-01 00:59:43.688896890
I've tested it on a couple of stocks, all have shown to only return a couple of ticks at the end of the day. Querying on date-string instead of Unix timestamp does not remedy the issue. Trades are returned as expected on 2022-01-31.
Hi! This should be resolved shortly. Apologies for the inconvenience.
Similar to #109
I've tested it on a couple of stocks, all have shown to only return a couple of ticks at the end of the day. Querying on date-string instead of Unix timestamp does not remedy the issue. Trades are returned as expected on 2022-01-31.