Skip to main content
This WebSocket API will be deprecated on July 1, 2026. See the Migration Guide to move to the Centrifuge-based API.
Subscribe to all trade updates on the exchange. You will receive updates when a trade is settled or a new trade is placed. CHANNEL NAME FORMAT recent_trades MESSAGE PAYLOAD FORMAT See the trades section for the format of the message
const channel = realtime.channels.get('recent_trades');
channel.subscribe((message) => {
  console.log(message.data);
});
The above command returns JSON structured like this
{
  "baseToken": "0x8f3Cf7ad23Cd3CaDb09735AFf958023239c6A063",
  "bettor": "0x814d79A9940CbC5Af4C19cAa118EC065a77CD31f",
  "stake": "999999999999999999",
  "odds": "484425713316886290000",
  "orderHash": "0xf7321de419b8887eafe5756d25db37ed2796dfc2495a49e266f13c8533fddb67",
  "marketHash": "0x32d6c7d300dc44c795e2bdb8c735d9ad74fd2bbece89012904a5ea8ec6b566f1",
  "maker": false,
  "betTime": 1625668455,
  "settled": false,
  "bettingOutcomeOne": true,
  "fillHash": "0x027f3237d9dc9dfa6068b60d852c3e972776b683a8c43b2e1a43602918de924e",
  "status": "SUCCESS",
  "tradeStatus": "SUCCESS"
}