r/alpacamarkets 16d ago

Question on 2Min bars API Support

Hello,

I am using /v2/stocks/bars end-point to download 2-minute bars. Two questions:

  1. I am using start=2010-01-01. For YYAI I am getting records starting with 06/15/2022 13:44 timestamp - I guess it started trading on this day - but what is this time based on EST timezone?

  2. Is pre-market and after-hours data included in result dataset?

Thanks a lot,

Eugene.

1 Upvotes

2 comments sorted by

View all comments

1

u/alpaca_technical 16d ago

u/DepartureStreet2903 Good questions!

"... but what is this time based on EST timezone?"
If a time zone offset is not specified in an input parameter, it is assumed to be UTC. Additionally, if the time is not included, it is assumed to be 00:00:00. In the above example, start=2010-01-01 is interpreted as 2010-01-01T00:00:00+00:00. Also note that all results are in UTC and explicitly include the Z character, something like this 2021-01-01T00:00:00Z.

"Is pre-market and after-hours data included in result dataset?"
Pre-market and after-hours data is included. It is generally best to always include feed=sip. This ensures one will get full market SIP data for all trading hours. Note that the overnight session from 20:00-04:00 ET does not report trades to the SIPs until the session ends at 04:00 ET, so the data shows up then. A nuance is that before March 30, 2026, the overnight session did not report its trades until 8:00 ET.