alpaca-trade-api-go icon indicating copy to clipboard operation
alpaca-trade-api-go copied to clipboard

Failed to get reader: WebSocket closed

Open petric3 opened this issue 2 years ago • 1 comments

FYI, just testing the new News endpoint, I'm getting disconnects one per about two hours, sometimes sooner, please see the screenshot.

2022-02-02_20-05

Otw, I'm subscriber to marketdata. PS: great new News API, the right way to go, thank you so much.

petric3 avatar Feb 03 '22 06:02 petric3

Hey 👋 Thanks for reporting the issue and for the kind words.

The panic on your screenshot is caused by a bug that should be fixed by https://github.com/alpacahq/alpaca-trade-api-go/pull/189. However, that in itself does not explain your disconnects, that are directly caused by the fact the the server doesn't seem to answer with a pong to your pings in time.

gnvk avatar Feb 10 '22 15:02 gnvk