I’m running a unlimited plan account and subscribing to bars for ~4k symbols:
print('length of tickers = ', len(tickers)) >>>length of tickers = 4334 stream.subscribe_bars(print_bar, *tickers)
Results in the following error:
INFO:alpaca_trade_api.stream:starting websocket connection INFO:alpaca_trade_api.stream:connected to: wss://stream.data.alpaca.markets/v2/sip WARNING:alpaca_trade_api.stream:data websocket error, restarting connection: code = 1009 (message too big), reason = read limited at 16385 bytes
Per the documentation - Real-time data - Documentation | Alpaca
- There is no limit for the number of channels at a time for trades, quotes and minute bars(
Does anyone have any suggestions on how to get around this? Many applications for this api are going to involve scanning for criteria across a large number of tickers.