Skip to main content
Orica provides WebSocket endpoints for real-time data streaming. Use WebSockets when you need live updates without polling.

Available Streams

Market Data

Real-time price updates, market cap changes, and volume for a specific market.

Activity Feed

Live trade notifications filtered by market or user.

Base URL


Connection Lifecycle

1

Connect

Open a WebSocket connection to the appropriate endpoint.
2

Initialize

Some endpoints require a filter message after connecting (e.g., Activity Feed).
3

Receive Data

The server sends initial data (market state, history) followed by live updates.
4

Stay Alive

Send periodic pings to keep the connection open.
5

Disconnect

Close the connection when done or handle reconnection on errors.

Message Format

All messages are JSON. Server messages include a type field:

Client Actions


Connection Limits


Example: Basic Connection


Reconnection Strategy

Implement automatic reconnection for robustness:

When to Use WebSockets

Use WebSockets For

  • Live price displays
  • Real-time trade feeds
  • Notifications
  • Low-latency updates

Use REST For

  • One-time data fetches
  • Historical queries
  • Large data exports
  • Simple integrations