alpacahq / alpaca-py

The Official Python SDK for Alpaca API
https://alpaca.markets/sdks/python/getting_started.html
Apache License 2.0
578 stars 146 forks source link

[Question]: How to get hourly historical data starting from 9:30am (NY time)? #397

Open JLXIA opened 9 months ago

JLXIA commented 9 months ago

Question form pre-submit checklist.

Question

When using get_stock_bars for hourly data, it always starts from fully hour (e.g. 8:00, 9:00), but the stock market opens at 9:30am, how can I get bars from half of the hour?

bossdown123 commented 7 months ago

the market closes at a round hour and opens at a half hour either you will need to request the half hour candle before the round 10:00 the 1 hour candle from 9:00 or the hour after 3:30 if you start at an odd hour from 9:30