Websocket (/ws) documentation?

Hi Pythians,

Is there any documentation available for the /ws WebSocket endpoint?

https://www.pyth.network/pyth-price-feeds opens a connection to wss://hermes.pyth.network/ws and sends the following message:

{"ids":[…],"type":"subscribe"}

The “why”: I want to see if it’s possible to replace our current usage of SSE (/v2/updates/price/stream) to have VAA bytes/price updates pushed down a bit faster.

Thanks!

Gm @flex , we do have an undocumented WS endpoint, but we recommend using the documented SSE endpoint – they’re functionally the same in terms of latency, there isn’t a speed advantage in using the websockets endpoint.

1 Like