For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/websocket/market-data/orderbook.md.

Orderbook

Receive
/v1/defi/market
Server

Full order-book depth snapshot for a subscribed orderbook.{venue}.{pair} topic.

Code Sample
const socket = new WebSocket("wss://api.truemarkets.co/v1/defi/market");socket.addEventListener("message", (event) => {  console.log(event.data);});

Messages

  1. payload
type*"orderbook"
Value in"orderbook"
timestamp*integer
Formatint64
topics*array<string>

The concrete topic this message belongs to, e.g. ["orderbook.hyperliquid-spot.HYPE-USDC"].

data*

A full order-book depth snapshot for one pair; each update replaces the prior book.

Example
{  "type": "orderbook",  "timestamp": 0,  "topics": [    "string"  ],  "data": {    "venue": "string",    "pair": "string",    "coin": "string",    "bids": [      {        "px": "string",        "sz": "string",        "n": 0      }    ],    "asks": [      {        "px": "string",        "sz": "string",        "n": 0      }    ],    "event_timestamp": "2019-08-24T14:15:22Z",    "occurred_at": "2019-08-24T14:15:22Z"  }}