Orders
Place, query, and cancel orders
Place Order
POST /v1/orders
Authorization: Bearer <token>
Content-Type: application/json
{
"accountId": "clx...",
"symbol": "BTCUSDT",
"side": "BUY",
"type": "LIMIT",
"quantity": "0.01",
"price": "70000",
"positionSide": "LONG",
"reduceOnly": false,
"subAccountId": "34696153"
}Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | Your account ID |
symbol | string | Yes | Trading pair (e.g. BTCUSDT) |
side | string | Yes | BUY or SELL |
type | string | Yes | Order type (see below) |
quantity | string | Yes | Order quantity in base asset |
price | string | Conditional | Required for LIMIT and STOP orders |
stopPrice | string | Conditional | Required for STOP and TAKE_PROFIT orders |
positionSide | string | No | BOTH, LONG, or SHORT. Default: BOTH |
reduceOnly | boolean | No | Only reduce existing position. Default: false |
subAccountId | string | No | Sub-account ID |
Order Types:
| Type | Description |
|---|---|
MARKET | Execute immediately at market price |
LIMIT | Execute at specified price or better |
STOP | Stop-loss with limit price (requires stopPrice + price) |
STOP_MARKET | Stop-loss at market price (requires stopPrice) |
TAKE_PROFIT | Take profit with limit price (requires stopPrice + price) |
TAKE_PROFIT_MARKET | Take profit at market price (requires stopPrice) |
Response:
{
"ok": true,
"order": {
"id": "clx...",
"symbol": "BTCUSDT",
"side": "BUY",
"type": "LIMIT",
"quantity": "0.01",
"price": "70000",
"status": "NEW",
"clientOrderId": "usr_abc123..."
},
"venue": { "orderId": 123456789 }
}Permission: Requires TRADE permission for API key users.
Note: Your margin type preference (Cross/Isolated) set via /v1/futures/margin-type is automatically applied to every order. You don't need to send it explicitly.
List Orders
GET /v1/orders?symbol=BTCUSDT&status=NEW&limit=50&offset=0
Authorization: Bearer <token>Query Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
symbol | string | No | - | Filter by trading pair |
status | string | No | - | Filter by status |
limit | number | No | 50 | Max results (up to 200) |
offset | number | No | 0 | Pagination offset |
Response:
{
"ok": true,
"orders": [...],
"total": 142
}Get Order
GET /v1/orders/:id
Authorization: Bearer <token>Cancel Order
POST /v1/orders/:id/cancel
Authorization: Bearer <token>
Content-Type: application/json
{
"subAccountId": "34696153"
}Cancel All Open Orders
DELETE /v1/orders/open?accountId=clx...&symbol=BTCUSDT&subAccountId=34696153
Authorization: Bearer <token>Response:
{
"ok": true,
"canceled": 3,
"total": 3,
"results": [
{ "orderId": "clx...", "symbol": "BTCUSDT", "status": "CANCELED" }
]
}Get Open Orders (Exchange)
Returns open orders directly from the exchange (not from local DB):
GET /v1/futures/open-orders?subAccountId=34696153&symbol=BTCUSDT
Authorization: Bearer <token>