Skip to main content
Mainnet websocket URL: wss://ws.pacifica.fi/ws
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 message
and an alive connection will respond with