Environment
Python
Problem
I am trying to use streamconn and streamconn.run and have gotten it to work to get minute data like I want. However I have a list of tickers that I want to get minute data on all of them yet it seems like I can only do one at a time. Does someone have some advice or a solution to this?
Example Code
conn = StreamConn(base_url=base_url,key_id=api_key_id,secret_key=api_secret,)
@conn.on(r’^account_updates$’)
async def on_account_updates(conn, channel, account):
print(‘account’, account)
@conn.on(r’^status$’)
async def on_status(conn, channel, data):
print(‘polygon status update’, data)
@conn.on(r’^AM$’)
async def on_minute_bars(conn, channel, bar):
print(‘bars’, bar)
@conn.on(r’^A$’)
async def on_second_bars(conn, channel, bar):
print(‘bars’, bar)
conn.run([‘account_updates’, ‘AM.{0}’.format(tickerslist)]) # this does not work