Place orders
Endpoint
POST /exchange
Selector: action.type: "order"
Purpose
Places one or more perpetual limit orders for the authorized customer's account. The enclave applies the customer's risk constraints before native execution through the pooled account.
Authorization
Owner or permitted trading agent. The SDK signs the action; see raw signing for custom clients.
Request fields
| Field | Type | Required | Meaning |
|---|---|---|---|
action | Object | Yes | The supported action described below. |
nonce | Unsigned integer | Yes | Trading nonce; native-style millisecond timestamp convention. |
signature | Object | Yes | Wallet signature containing r, s and recovery byte v (27 or 28). |
expiresAfter | Unsigned integer or null | No | Request expiry in Unix milliseconds. |
vaultAddress | Null | No | Omit or use null; customer subaccount/vault routing is outside this profile. |
The action object contains:
| Field | Type | Required | Meaning |
|---|---|---|---|
action.type | String | Yes | "order". |
action.orders | Array | Yes | Between 1 and 32 order objects. |
action.grouping | String | Yes | "na". |
action.orders[].a | Unsigned integer | Yes | Supported perpetual asset index. |
action.orders[].b | Boolean | Yes | true for buy; false for sell. |
action.orders[].p | Decimal string | Yes | Positive limit price. |
action.orders[].s | Decimal string | Yes | Positive order size. |
action.orders[].r | Boolean | Yes | Reduce-only flag. |
action.orders[].t | Object | Yes | {"limit":{"tif":"Gtc"}}. |
action.orders[].c | Hex string | No | Client order ID: 0x followed by 32 hexadecimal characters. |
See the shared trading envelope for the common signing and routing fields.
Request example
The signature and timestamps below are illustrative, not valid authorization. Asset 0 is illustrative; the deployment's supported markets determine valid indexes.
{
"action": {
"type": "order",
"orders": [
{
"a": 0,
"b": true,
"p": "100000",
"s": "0.001",
"r": false,
"t": {
"limit": {
"tif": "Gtc"
}
},
"c": "0x11111111111111111111111111111111"
}
],
"grouping": "na"
},
"nonce": 1796250000000,
"signature": {
"r": "0x1111111111111111111111111111111111111111111111111111111111111111",
"s": "0x2222222222222222222222222222222222222222222222222222222222222222",
"v": 27
}
}Response fields
| Field | Meaning |
|---|---|
status | "ok" for an admitted request or "err" for a request-level rejection. |
response | Response object on success; a reason string for a request-level rejection. |
response.type | "order" for the order response. |
response.data.statuses | One result per submitted order, in request order. |
response.data.statuses[].resting.oid | Order ID for a resting order. |
response.data.statuses[].filled.oid | Order ID for a filled order. |
response.data.statuses[].filled.totalSz | Total filled size reported by a filled result. |
response.data.statuses[].filled.avgPx | Average fill price reported by a filled result. |
response.data.statuses[].error | Rejection reason for an individual child. |
Response example
A resting acknowledgement has this shape:
{
"status": "ok",
"response": {
"type": "order",
"data": {
"statuses": [
{
"resting": {
"oid": 12345
}
}
]
}
}
}Constraints
This profile supports Gtc limit orders with grouping: "na". A batch contains between 1 and 32 orders. IOC, post-only ALO, trigger orders, grouped TP/SL and builder fields are outside the supported action shape.
The customer planner accepts up to six fractional price digits and eight fractional size digits after ignoring trailing zeros. Market and venue constraints still apply. Price, size and market checks can reject an individual child.
An acknowledgement is distinct from reconciled fill and position accounting. An uncertain result retains the corresponding reservations until its outcome is reconciled. A missing response is not permission to blindly resubmit.