Documentation Index
Fetch the complete documentation index at: https://docs.rails.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Request
{
"message": "cancelOrder",
"content": {
"clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285",
"market": "ETH-USD",
"orderId": "01HH0X2VD6R0CJE4X0P0D1NQ11",
"cancelBy": "orderId"
}
}
| Field | Type | Required | Description |
|---|
message | string | Yes | cancelOrder |
content.clientRequestId | string | No | Client-generated UUID for correlation |
content.market | string | No | Market name, only required when connecting with market=ALL |
content.orderId | string | Yes | Target order identifier |
content.cancelBy | string | Yes | Cancellation mode; currently orderId |
Response — Acknowledgment
{
"resultType": "cancelOrder",
"market": "ETH-USD",
"data": {
"statusCode": 202,
"body": "cancelling order",
"order": {
"market": "ETH-USD",
"orderId": "01HZ5J70FCBNJAS7TVPVB4GAAG",
"orderType": "buy",
"tradeType": "limit",
"price": "3601",
"quantity": "1",
"filledQuantity": "0.5",
"leverage": "1",
"createdAt": 1717100052972,
"updatedAt": 1717100393492,
"orderStatus": "cancelling",
"clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285",
"postOnly": false,
"avgFillPrice": "3601"
},
"clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285",
"apiQuotaUsed": 1
}
}
| Field | Type | Required | Description |
|---|
resultType | string | Yes | cancelOrder |
market | string | No | Market name, present when connected with market=ALL |
data.statusCode | number | Yes | 202 |
data.body | string | Yes | Status message |
data.order.market | string | Yes | Market name |
data.order.orderId | string | Yes | Unique identifier for the order |
data.order.orderType | string | Yes | Order side: buy or sell |
data.order.tradeType | string | Yes | Order type: limit or market |
data.order.price | string | Yes | Price used |
data.order.quantity | string | Yes | Remaining quantity |
data.order.filledQuantity | string | Yes | Filled quantity |
data.order.leverage | string | Yes | Leverage used at order creation |
data.order.createdAt | number | Yes | Milliseconds since epoch |
data.order.updatedAt | number | Yes | Milliseconds since epoch |
data.order.orderStatus | string | Yes | cancelling |
data.order.clientRequestId | string | No | Client-generated UUID for correlation |
data.order.postOnly | boolean | Yes | Maker-only creation flag |
data.order.avgFillPrice | string | No | Average price across fills |
data.clientRequestId | string | No | Client-generated UUID for correlation |
data.apiQuotaUsed | number | Yes | API quota consumed |
Response — Confirmation
{
"resultType": "cancelOrder",
"market": "ETH-USD",
"data": {
"statusCode": 200,
"body": "order cancelled",
"order": {
"market": "ETH-USD",
"orderId": "01HZ5J70FCBNJAS7TVPVB4GAAG",
"orderType": "buy",
"tradeType": "limit",
"price": "3601",
"quantity": "1",
"filledQuantity": "0.5",
"leverage": "1",
"createdAt": 1717100052972,
"updatedAt": 1717100393492,
"orderStatus": "cancelled",
"clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285",
"postOnly": false,
"avgFillPrice": "3601"
},
"clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285"
}
}
| Field | Type | Required | Description |
|---|
resultType | string | Yes | cancelOrder |
market | string | No | Market name, present when connected with market=ALL |
data.statusCode | number | Yes | 200 |
data.body | string | Yes | Status message |
data.order.market | string | Yes | Market name |
data.order.orderId | string | Yes | Unique identifier for the order |
data.order.orderType | string | Yes | Order side: buy or sell |
data.order.tradeType | string | Yes | Order type: limit or market |
data.order.price | string | Yes | Price used |
data.order.quantity | string | Yes | Remaining quantity |
data.order.filledQuantity | string | Yes | Filled quantity |
data.order.leverage | string | Yes | Leverage used at order creation |
data.order.createdAt | number | Yes | Milliseconds since epoch |
data.order.updatedAt | number | Yes | Milliseconds since epoch |
data.order.orderStatus | string | Yes | cancelled |
data.order.clientRequestId | string | No | Client-generated UUID for correlation |
data.order.postOnly | boolean | Yes | Maker-only creation flag |
data.order.avgFillPrice | string | No | Average price across fills |
data.clientRequestId | string | No | Client-generated UUID for correlation |
Response — Error
{
"resultType": "cancelOrder",
"market": "ETH-USD",
"data": {
"statusCode": 400,
"body": "Invalid request",
"error": {
"slug": "CANCEL_ORDER_ERROR",
"code": "2000"
},
"apiQuotaUsed": 1,
"clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285"
}
}
{
"resultType": "cancelOrder",
"market": "ETH-USD",
"data": {
"statusCode": 404,
"body": "order not found",
"error": {
"slug": "NOT_FOUND",
"code": "0007"
},
"apiQuotaUsed": 1,
"clientRequestId": "505c8b64-3bcc-4871-9b4d-fbe8c42926c3"
}
}
{
"resultType": "cancelOrder",
"market": "ETH-USD",
"data": {
"statusCode": 409,
"body": "order cannot be cancelled at the moment, please try again",
"error": {
"slug": "CANCEL_ORDER_CONFLICT_ERROR",
"code": "2001"
},
"apiQuotaUsed": 1,
"clientRequestId": "2f6635e5-bdab-4fbc-8e2e-21252d2219dc"
}
}
{
"resultType": "cancelOrder",
"market": "ETH-USD",
"data": {
"statusCode": 429,
"body": "api call rate limit exceeded",
"error": {
"slug": "TOO_MANY_REQUESTS",
"code": "0003"
},
"apiQuotaUsed": 10001,
"retryAfterSec": 300,
"clientRequestId": "2f6635e5-bdab-4fbc-8e2e-21252d2219dc"
}
}
{
"resultType": "cancelOrder",
"market": "ETH-USD",
"data": {
"statusCode": 500,
"body": "Internal Server Error",
"error": {
"slug": "CANCEL_ORDER_ERROR",
"code": "2000"
},
"apiQuotaUsed": 1,
"clientRequestId": "2f6635e5-bdab-4fbc-8e2e-21252d2219dc"
}
}
| Field | Type | Required | Description |
|---|
resultType | string | Yes | cancelOrder |
market | string | No | Market name, present when connected with market=ALL |
data.statusCode | number | Yes | Error status (400, 404, 409, 429, 500) |
data.body | string | Yes | Error description |
data.error.slug | string | Yes | Error slug |
data.error.code | string | Yes | Error code |
data.apiQuotaUsed | number | No | Present for quota responses |
data.retryAfterSec | number | No | Present when throttled |
data.clientRequestId | string | No | Client-generated UUID for correlation |