params are identical across both; only the framing differs.
The envelope
A request carries anid, the protocol version, the method path, and a params object.
result or an error — never both — and echoes the request id.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
The JSON-RPC 2.0 request/response envelope and the WebSocket and HTTP transports shared by every method.
params are identical across both; only the framing differs.
id, the protocol version, the method path, and a params object.
{
"id": "1",
"jsonrpc": "2.0",
"method": "private/cancel",
"params": {
"subaccount_id": 12345,
"instrument_name": "ETH-PERP",
"order_id": "b7e6...c2a1"
}
}
result or an error — never both — and echoes the request id.
{
"id": "1",
"jsonrpc": "2.0",
"result": {
"order_id": "b7e6...c2a1",
"instrument_name": "ETH-PERP",
"order_status": "cancelled"
}
}
{
"id": "1",
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Invalid params",
"data": "order_id not found"
}
}
