I am streaming quotes through websockets using the following endpoint and the python websockets module
Endpoint: “wss://stream.data.alpaca.markets/v2/sip”
I receive data for a few minutes until my code crashes with the error: [Errno 32] Broken pipe
I am not very experienced or knowledgable with internet protocols/websocket so I was hoping someone could point me in the right direction. I am wondering if this could be a server side issue. Anyone else experience this?
Here’s the traceback:
— request header —
GET /v2/sip HTTP/1.1
Upgrade: websocket
Host: stream.data.alpaca.markets
Origin: http://stream.data.alpaca.markets
Sec-WebSocket-Key: Bxv4fwZ2OR+apkATTG23rQ==
Sec-WebSocket-Version: 13
Connection: Upgrade
— response header —
HTTP/1.1 101 Switching Protocols
Date: Fri, 18 Mar 2022 14:51:41 GMT
Connection: upgrade
Sec-Websocket-Accept: 4uLNiabuMgALJv6y09RjUxkbVec=
Upgrade: websocket
Strict-Transport-Security: max-age=15724800; includeSubDomains