Hey, I have a question.
I would like to query candlestick data of some NYSE stocks where trading hours are between 9:30 and 16:00 EST.
For example I use the following query:
https://data.alpaca.markets/v2/stocks/HLF/bars?timeframe=4H&start=2024-04-15T09:30:00-04:00&end=2024-07-14T16:00:00-04:00&limit=5000&adjustment=raw&feed=sip&sort=asc
Please observe the parameters I set:
- Timeframe: 4H - I would assume that since trading hours at NYSE are 6h 30m long, I would get two candles, but I receive 3
- Start date is with ISO 8601 / RFC-3339 format which is required by the Historical bars (single symbol) endpoint
- Same with end date
Which query will return in most cases 3 bars for a single day, none of which directly maps to 9:30-13:30 or 13:30 to 16:00 (or 16:30).
Can you please explain what I am doing wrong? I do not believe this to be a simple timezone question, but I think I have a fundamental misunderstanding in using the API.
Thanks