You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the provided example, all functions work as expected but "stream.subscribe_trade_updates".
It gives the following error:
INFO:alpaca_trade_api.stream:started trading stream
INFO:alpaca_trade_api.stream:starting trading websocket connection
ERROR:alpaca_trade_api.stream:error during websocket communication: failed to authenticate
SDK Version I encountered this issue in
alpaca_trade_api version 2.1.0
Steps To Reproduce
run stream.subscribe_trade_updates
Filled out the Steps to Reproduce section?
I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current Behavior
`import logging
import config
from alpaca_trade_api.stream import Stream
log = logging.getLogger(name)
async def print_trade(t):
print('trade', t)
async def print_quote(q):
if q["x"] == "FTXU":
print('quote', q)
async def print_trade_update(tu):
print('trade update', tu)
async def print_crypto_trade(t):
print('crypto trade', t)
def main():
logging.basicConfig(level=logging.INFO)
feed = 'iex' # <- replace to SIP if you have PRO subscription
stream = Stream(key_id=config.API_KEY,secret_key=config.SECRET_KEY,data_feed=feed, raw_data=True)
stream.subscribe_trade_updates(print_trade_update)
stream.subscribe_trades(print_trade, 'AAPL')
stream.subscribe_quotes(print_quote, 'IBM')
stream.subscribe_crypto_trades(print_crypto_trade, 'ETHUSD')
stream.subscribe_crypto_quotes(print_quote, 'ETHUSD')
if name == "main":
main()
`
Expected Behavior
In the provided example, all functions work as expected but "stream.subscribe_trade_updates".
It gives the following error:
INFO:alpaca_trade_api.stream:started trading stream
INFO:alpaca_trade_api.stream:starting trading websocket connection
ERROR:alpaca_trade_api.stream:error during websocket communication: failed to authenticate
SDK Version I encountered this issue in
alpaca_trade_api version 2.1.0
Steps To Reproduce
Filled out the Steps to Reproduce section?
Anything else?
No response
The text was updated successfully, but these errors were encountered: