Scott Moreland
12/31/2020, 5:08 PMws = instantiate_websocket_feed() # persistent connection run on own thread
# this flow gets run on a schedule every few seconds
with Flow("execute-trades", schedule) as flow:
latest_prices = get_prices(ws)
execute_trades(latest_prices)
Is there a better way to structure this?Dylan
Scott Moreland
12/31/2020, 6:41 PMDylan