RTDS Channel (WebSocket)
Overview
Section titled “Overview”RTDS (Real-Time Data Stream) emits price tick events for every subscribed asset as soon as they occur. Connect and send a subscription message with the asset IDs you want to track.
Server: wss://ws.openfish.fun/ws/rtds
Subscribe
Section titled “Subscribe”Direction: Client -> Server
| Field | Type | Required | Description |
|---|---|---|---|
assets | array of strings | Yes | Asset IDs (token IDs) to subscribe to |
type | string | Yes | Must be "rtds" |
{ "assets": ["52114319501245915516055106046884209969926127482827954674443846427813813222426"], "type": "rtds"}Update Subscription
Section titled “Update Subscription”{ "operation": "subscribe", "assets": ["71321045679252..."]}Heartbeat
Section titled “Heartbeat”Send PING every 10 seconds. Server responds with PONG.
Events
Section titled “Events”Price Tick
Section titled “Price Tick”A price tick is emitted each time the price for a subscribed asset changes.
| Field | Type | Required | Description |
|---|---|---|---|
event_type | string | Yes | "price_tick" |
asset_id | string | Yes | Asset ID |
market | string | Yes | Condition ID |
price | string | Yes | Latest price |
mid_price | string | No | Mid-market price |
best_bid | string | No | Best bid |
best_ask | string | No | Best ask |
timestamp | integer | Yes | Unix timestamp in milliseconds |
Sample Message:
{ "event_type": "price_tick", "asset_id": "52114319501245...", "market": "0xbd31dc8a...", "price": "0.55", "mid_price": "0.545", "best_bid": "0.54", "best_ask": "0.55", "timestamp": 1712678400000}