Closed hiohiohio closed 10 months ago
fixes https://github.com/alpacahq/alpaca-py/issues/371
Context:
Changes:
How to check:
# to reproduce an error # ! pip install alpaca-py # to confirm this PR's change ! pip install git+https://github.com/hiohiohio/alpaca-py.git@fix-trade-update-model api_key=<YOUR API KEY> secret_key=<YOUR SECRET> paper = True # required for asyncio in google colab import nest_asyncio nest_asyncio.apply() from alpaca.trading.stream import TradingStream cli = TradingStream(api_key, secret_key, paper=paper) async def msg_handler(msg) -> None: print(msg) cli.subscribe_trade_updates(msg_handler) cli.run()
fixes https://github.com/alpacahq/alpaca-py/issues/371
Context:
Changes:
How to check: