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

Reference Prices

Receive
/v1/defi/market
Server

Batch of weighted reference prices computed from multiple exchange BBOs.

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*"reference_prices"
Value in"reference_prices"
timestamp*integer
Formatint64
topics*array<>

The concrete topic this message belongs to, e.g. ["reference_prices"] — even for all subscribers.

data*array<>
Example
{  "type": "reference_prices",  "timestamp": 0,  "topics": [    "all"  ],  "data": [    {      "symbol": "string",      "instrument": "string",      "mid_price": "string",      "bid": "string",      "ask": "string",      "sources": [        {          "source": "string",          "bid": "string",          "ask": "string",          "mid_price": "string",          "weight_pct": "string",          "timestamp": "2019-08-24T14:15:22Z"        }      ],      "timestamp": "2019-08-24T14:15:22Z"    }  ]}