Real-time mark and index prices, broadcast once per block. Public channel, filtered by numeric market IDs.
Subscribe
{
"method": "subscribe",
"params": {
"channel": "oracle",
"market_ids": [1, 2]
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
market_ids | number[] | No | Filter by market IDs. Empty = all markets |
The acknowledgement echoes back the filter that was actually applied. Check it — if you expected one market and see for all markets, your parameter did not reach the server.
{
"type": "subscribed",
"method": "subscribe",
"status": "success",
"message": "Successfully subscribed to oracle for 1 market(s)",
"channel": "oracle",
"data": { "market_ids": [1] }
}Message Format
Update
Sent once per block. There is no snapshot for this channel.
{
"channel": "oracle",
"type": "update",
"market_id": null,
"data": {
"prices": {
"1": {
"index_price": "63124681577830349000000",
"mark_price": "63126084821834306372811"
}
},
"timestamp": 1786931315
},
"tx_hash": "0xac2fdb604d460c39d57a0ff7a398ab28e6c6dd8b0d6955012ae3fa41cbd04bff",
"block_number": 19325558,
"log_index": 0,
"worker_timestamp": "1786931315106267297"
}Update Message Fields
| Field | Type | Description |
|---|---|---|
channel | string | Always "oracle" |
type | string | Always "update" |
market_id | null | Always null — one message carries every subscribed market |
data.prices | object | Map of market ID (as a string key) to its price object |
data.timestamp | number | Server timestamp in seconds |
tx_hash | string | Hash of the transaction that triggered the broadcast |
block_number | number | Blockchain block number |
log_index | number | Log index within the block |
worker_timestamp | string | Server timestamp in nanoseconds when the update was built |
Price Object Fields
| Field | Type | Description |
|---|---|---|
index_price | string | Index price, wei (18 decimals) |
mark_price | string | Mark price, wei (18 decimals) |
Both fields are optional: a market appears with only the price that is currently available.
Examples
Subscribe to all markets
{
"method": "subscribe",
"params": {
"channel": "oracle"
}
}Subscribe to a single market
{
"method": "subscribe",
"params": {
"channel": "oracle",
"market_ids": [1]
}
}Unsubscribe
{
"method": "unsubscribe",
"params": {
"channel": "oracle"
}
}Testing with wscat
# Connect
wscat -c wss://ws.rise.trade/ws
# Subscribe to all markets
{"method":"subscribe","params":{"channel":"oracle"}}
# Subscribe to BTC/USDC only (market 1)
{"method":"subscribe","params":{"channel":"oracle","market_ids":[1]}}
# Unsubscribe
{"method":"unsubscribe","params":{"channel":"oracle"}}Notes
Price Format
Prices are integer strings in wei (18 decimals), not decimals. Divide by 1018 to get a human-readable value: "63126084821834306372811" ≈ 63,126.08 USD.
This differs from the trades channel, where prices are already decimal.
Finding a Market ID
GET /v1/markets returns every market with its market_id and config.name. Market 1 is BTC/USDC.
No Snapshot
Nothing is sent at subscription time. The first message arrives with the next block.
Unknown Markets
A market_ids entry that does not exist is still accepted with a success acknowledgement. The subscription simply never delivers an update, so verify your IDs against GET /v1/markets.
Public Channel
This channel does not require authentication. Oracle prices are public market data.