Extended Hours Errors and Data

I have a free account and I’m using websocket to call for data. I’m not receiving any price updates during extended or pre market hours.

Also, is there any account settings I need to change to ensure I have permissions for extended hours trading?

My terminal:
2024-08-26 19:38:52,170 - INFO - Trading script is running with full extended hours monitoring enabled.

2024-08-26 19:38:52,507 - INFO - Fetched initial price for GD: $290.955

2024-08-26 19:38:52,552 - INFO - Fetched initial price for MANH: $261.37

2024-08-26 19:38:52,599 - INFO - Fetched initial price for ACM: $99.65

2024-08-26 19:38:52,645 - INFO - Fetched initial price for VCTR: $54.59

2024-08-26 19:38:52,693 - INFO - Fetched initial price for COST: $892.97

2024-08-26 19:38:52,741 - INFO - Fetched initial price for INTU: $617.34

2024-08-26 19:38:52,789 - INFO - Fetched initial price for WRB: $58.34

2024-08-26 19:38:52,834 - INFO - Fetched initial price for META: $521.17

2024-08-26 19:38:52,880 - INFO - Fetched initial price for PANW: $347.27

2024-08-26 19:38:52,928 - INFO - Fetched initial price for AMP: $441.27

2024-08-26 19:38:52,976 - INFO - Fetched initial price for LINE: $85.45

2024-08-26 19:38:53,026 - INFO - Fetched initial price for ARDT: $17.51

2024-08-26 19:38:53,070 - INFO - Fetched initial price for APP: $89.76

2024-08-26 19:38:53,117 - INFO - Fetched initial price for AAON: $93.88

2024-08-26 19:38:53,117 - INFO - Completed fetching initial prices.

2024-08-26 19:38:53,117 - INFO - Attempting to connect to WebSocket…

2024-08-26 19:38:53,276 - INFO - WebSocket connected. Authenticating…

2024-08-26 19:38:53,276 - INFO - Authentication message sent. Subscribing to data…

2024-08-26 19:38:53,276 - INFO - Subscribed to data for symbols: [‘GD’, ‘MANH’, ‘ACM’, ‘VCTR’, ‘COST’, ‘INTU’, ‘WRB’, ‘META’, ‘PANW’, ‘AMP’, ‘LINE’, ‘ARDT’, ‘APP’, ‘AAON’]

2024-08-26 19:38:53,277 - INFO - Entering main WebSocket loop…

@DirtyDel All accounts can trade during extended hours (no settings needed) and all data includes extended hours. However, if you are using the free Basic market data, the websocket only streams trade and quote data from the IEX exchange. That exchange has limited extended hour trading 8:00-17:00 ET. That may be the reason you don’t see data outside of those hours. Furthermore, many symbols do not trade or trade very infrequently on the IEX exchange, especially in extended hours, so you may not see a lot of data. IEX exchange

A premium Alpaca account would resolve this?

@DirtyDel A paid “Algo Trader Plus” market data subscription provides real time access to full market data. There would be full extended hour data for typically more symbols.

However, depending upon you strategy, the free Basic market data plan does provide full market data, but just not the most recent 15 minutes (ie not real time). By definition, streamed data is time (so you cannot stream real time), but you can use the REST APIs to fetch data up to 15 minutes previous. That delay may not be impactful for some strategies especially in extended hour trading.

I just paid for the market data subscription. Is there any param or callback I need to include for the paid market data to be utilized? Or will my account API have the new data included?

Edit* Stream url currently used:
STREAM_URL = “wss://stream.data.alpaca.markets/v2/iex”

Hey :wave:

You need to change your STREAM_URL to wss://stream.data.alpaca.markets/v2/sip.

1 Like