Trades Channel

Real-time trade feed for all matched orders. This is a public channel that broadcasts every trade as it happens.

Channel: trades
Authentication: Not required

Subscribe

{
  "method": "subscribe",
  "params": {
    "channel": "trades",
    "market_ids": [1, 2]
  }
}
ParameterTypeRequiredDescription
market_idsnumber[]NoFilter by market IDs. Empty = all markets

Message Format

Update

Sent immediately when a trade occurs. There is no snapshot for this channel.

{
  "channel": "trades",
  "type": "update",
  "market_id": "18",
  "data": {
    "id": "0x000000000000d1b3000000000126ed7e000000000000043a-0x000000000000dbbc000000000126ed80000000000000009e",
    "maker_order_id": "0x000000000000d1b3000000000126ed7e000000000000043a",
    "taker_order_id": "0x000000000000dbbc000000000126ed80000000000000009e",
    "maker": "0x02fa9805dc68b93b2d30ce2c47ca629373523d8e",
    "taker": "0xd29d002b1126077670d716772fc49f3fd44ceecb",
    "maker_side": 1,
    "price": "65.6998",
    "size": "0.2",
    "fee_maker": "0.001313996",
    "fee_taker": "0.001313996",
    "fee_liquidation": "0"
  },
  "tx_hash": "0x71d88c4fab0bbd8eaae8c3ca6c50a87a4a5a53dcf0cc3b2cae8f976728a23133",
  "block_number": 19328384,
  "log_index": 156,
  "worker_timestamp": "1786934140123456789"
}

Update Message Fields

FieldTypeDescription
channelstringAlways "trades"
typestringAlways "update"
market_idstringMarket ID
dataobjectTrade object (see below)
tx_hashstringTransaction hash
block_numbernumberBlockchain block number
log_indexnumberLog index within the block
worker_timestampstringServer time in nanoseconds

There is no timestamp or block_timestamp field on this channel. Trade time comes from the block: resolve block_number through the REST API if you need it.

Trade Object Fields

FieldTypeDescription
idstringUnique trade ID — "<maker_order_id>-<taker_order_id>", both 24-byte hex, joined by -
maker_order_idstringMaker's composite order ID, hex (0x…)
taker_order_idstringTaker's composite order ID, hex (0x…)
makerstringMaker's address (lowercase)
takerstringTaker's address (lowercase)
maker_sidenumberMaker's side: 0 = Buy, 1 = Sell
pricestringTrade price, decimal
sizestringTrade size, decimal
fee_makerstringFee paid by the maker, decimal USDC. "0" when the maker's tier pays no fee
fee_takerstringFee paid by the taker, decimal USDC
fee_liquidationstringLiquidation fee, decimal USDC. "0" on a normal trade
🚧

Order IDs are hex strings, not numbers

id, maker_order_id and taker_order_id are 24-byte composite IDs rendered as 0x… hex, and id joins the two with a hyphen. Parsing them as integers overflows; keep them as strings.

Maker Side

ValueDescription
0Maker was buying (long)
1Maker was selling (short)

The taker's side is always opposite to the maker's side.

Examples

Subscribe to all trades

{
  "method": "subscribe",
  "params": {
    "channel": "trades"
  }
}

Subscribe to specific markets

{
  "method": "subscribe",
  "params": {
    "channel": "trades",
    "market_ids": [1, 2]
  }
}

Unsubscribe

{
  "method": "unsubscribe",
  "params": {
    "channel": "trades"
  }
}

Testing with wscat

# Connect (mainnet)
wscat -c wss://ws.rise.trade/ws

# Subscribe to all trades
{"method":"subscribe","params":{"channel":"trades"}}

# Subscribe to market 1 only (BTC/USDC)
{"method":"subscribe","params":{"channel":"trades","market_ids":[1]}}

# Unsubscribe
{"method":"unsubscribe","params":{"channel":"trades"}}

Notes

No Snapshot

The trades channel sends nothing at subscription time; it only streams trades as they happen. Use GET /v1/trade-history for history.

Price Format

All price, size and fee fields are decimal strings (human-readable), not wei.

  • "65.6998" = 65.6998 USDC per unit
  • "0.2" = 0.2 units

Real-time Delivery

Trades are broadcast as soon as the match event is processed from the chain. There is no batching or throttling.

Public Channel

This channel does not require authentication. For your own fills — with fees, PnL and position context — use the Fills Channel.