If I use alpaca-trade-api version 0.46, the simpleStream.py example demo works:
pip3 install alpaca_trade_api==0.46
python simpleStream.py --all (under alpaca-trade-api-python/examples directory from github repository)
Example Output (seems OK):
2020-06-23 04:28:43.841834 debug: Entity({‘ev’: ‘status’, ‘message’: ‘Connecting to Polygon’, ‘status’: ‘connecting’})
2020-06-23 04:28:44.060167 debug: Entity({‘ev’: ‘status’, ‘message’: ‘Connected Successfully’, ‘status’: ‘connected’})
2020-06-23 04:28:44.200134 debug: Entity({‘ev’: ‘status’, ‘message’: ‘authenticated’, ‘status’: ‘auth_success’})
2020-06-23 04:28:44.250377 debug: Entity({‘ev’: ‘status’, ‘message’: ‘subscribed to: Q.’, ‘status’: ‘success’})
2020-06-23 04:28:44.251205 debug: Entity({‘ev’: ‘status’, ‘message’: 'subscribed to: T.’, ‘status’: ‘success’})
2020-06-23 04:28:44.253505 debug: Entity({‘ev’: ‘status’, ‘message’: ‘subscribed to: AM.’, ‘status’: ‘success’})
2020-06-23 04:28:44.258159 debug: Entity({‘ev’: ‘status’, ‘message’: 'subscribed to: A.’, ‘status’: ‘success’})
A 2020-06-23 AAL 0.00% 14.41 14.41 158
A 2020-06-23 BA 0.00% 191.20 191.25 300
A 2020-06-23 GLD 0.00% 165.19 165.19 800
A 2020-06-23 KTOV 0.00% 0.94 0.94 100
A 2020-06-23 IDEX 0.00% 3.65 3.65 260
Here is broken output using api version 0.48:
( pip3 install alpaca_trade_api==0.48 )
unknown channel A.* (you may need to specify the right data_stream)
ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending name=‘Task-1’ coro=<reloadWatch..watch_command() running at simpleStream.py:96> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f16f48aa460>()]>>