Testnet websocket URL: wss://test-ws.pacifica.fi/ws The API service provides a universal endpoint for websocket streams. The subscribed data will be streamed in the corresponding channel after the connection is established.
Subscription Message
Unsubscription Message
Heartbeat and Timeout
A websocket connection will be closed if no message is sent for the past 60 seconds, or the connection has been alive for 24 hours. To keep the connection alive without messages in 60 seconds, we can send a heartbeat messageCompression
To reduce bandwidth, open the connection with?compress=deflate:
pong, errors, and trading responses, stay as text frames.
The compression state carries across messages, so use one decompressor for the whole connection. This is not the standard permessage-deflate extension.
Slow Clients
Forbook and bbo, a client that reads slowly receives only the latest snapshot, not every update in between. If the server cannot write to a connection for 60 seconds, it closes the connection with close code 1011.