Paper API trade_updates stream
See original GitHub issueI noticed the Paper API websockets is not working. My live key authenticates to AlpacaStream, but I get the error below when I try to connect with my paper key:
Error: There was an error in authorizing your websocket connection. Object received: { "stream": "authorization", "data": { "action": "authenticate", "message": "access key verification failed", "status": "unauthorized" } }
I checked the urls.js in your code, the paper websockets endpoint is not there, so I figured either paper websockets trade_updates is probably not implemented or Alpaca made one of their confusing changes again. Paper and live accounts share the same wss endpoint for data (wss://data.alpaca.markets/stream), but the trade_updates for paper accounts is at this wss endpoint:
wss://paper-api.alpaca.markets/stream
I will appreciate if this can be integrated.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top GitHub Comments
I’ve gone ahead and pushed a new version which has support for paper. You can now specify whether or not the credentials are paper when creating the
AlpacaStream
like below:Hope this helps! Just make sure you are on version
2.2.4
.Thank you for letting me know, I’ll attempt to integrate this today. 😎