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

Candles

Receive
/v1/defi/market
Server

One candle for a subscribed candles.{SYMBOL}.{interval} 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*"candles"
Value in"candles"
timestamp*integer
Formatint64
topics*array<string>

The concrete topic, e.g. ["candles.ETH.1h"].

data*

OHLC price data for a single asset and interval.

Example
{  "type": "candles",  "timestamp": 0,  "topics": [    "string"  ],  "data": {    "symbol": "string",    "address": "string",    "chain": "string",    "product_type": "spot",    "interval": "string",    "open": "string",    "high": "string",    "low": "string",    "close": "string"  }}