For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/websocket/market-data/subscription-response.md.
Subscription Response
Receive
Server
Acknowledgement sent from server in response to a subscribe or unsubscribe request.
const socket = new WebSocket("wss://api.truemarkets.co/v1/defi/market");socket.addEventListener("message", (event) => { console.log(event.data);});- payload
type*stringValue in
"subscribe""unsubscribe"status*stringsuccess when every requested topic was accepted; error when one or more were rejected (accepted topics are still applied).
Value in
"success""error"timestamp*integerUnix timestamp (seconds) when the response was generated.
Format
int64message?stringHuman-readable description of the result.
topics?array<>Accepted (applied) topics by canonical key. Omitted when none were accepted.
rejected?array<>Topics that could not be parsed, with reasons. Present only when status is error.
Example
{ "type": "subscribe", "status": "success", "timestamp": 0, "message": "string", "topics": [ "all" ], "rejected": [ { "topic": "string", "reason": "empty_topic" } ]}