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

Subscribe

Send
/v1/defi/market
Server

Message sent to server indicating which topics the client wants to subscribe to or unsubscribe from.

Code Sample
const payload = {  "type": "subscribe",  "topics": [    "all"  ]};const socket = new WebSocket("wss://api.truemarkets.co/v1/defi/market");socket.addEventListener("open", () => {  socket.send(JSON.stringify(payload));});

Messages

  1. payload
type*string

Action the request is intending to take.

Value in"subscribe""unsubscribe"
topics*array<>

Topics to subscribe to or unsubscribe from, e.g. ["price_candles"], ["price_candles","surging_assets"], or ["all"].

Example
{  "type": "subscribe",  "topics": [    "all"  ]}