Place limit/market orders, cancel, and modify via the unified transaction endpoint
POST /order endpoint. Send a transaction with an actions array; each action is a tagged object (e.g. {"l": {...}} for a limit order).
BigInt(Date.now()) * 1_000_000n.POST /order has this shape:
| Field | Description |
|---|---|
actions | Array of action objects (see below). Order/cancel/modify use l, m, mod, cx, cxa. |
nonce | Unique value for replay protection (e.g. timestamp in nanoseconds). |
account | Account public key (base58) — whose account is traded. |
signer | Signer public key (base58) — who is signing (usually same as account). |
signature | Ed25519 signature (base58). |
l)| Field | Type | Description |
|---|---|---|
c | string | Symbol (e.g. “BTC-USD”) |
b | boolean | true = buy, false = sell |
px | number | Limit price |
sz | number | Size/quantity |
tif | string | Time in force: "GTC", "IOC", "ALO" |
r | boolean | Reduce-only |
m)| Field | Type | Description |
|---|---|---|
c | string | Symbol |
b | boolean | true = buy, false = sell |
sz | number | Size/quantity |
r | boolean | Reduce-only |
mod)| Field | Type | Description |
|---|---|---|
oid | string | Order ID (base58 hash) |
symbol | string | Symbol |
amount | number | New order size |
cx)| Field | Description |
|---|---|
c | Symbol |
oid | Order ID to cancel (base58) |
cxa)| Field | Description |
|---|---|
c | Array of symbols; use [] to cancel all symbols. |
OrderResponse with one status per execution event:
| Status | Description | Fields |
|---|---|---|
resting | Order placed and resting on book | {oid} |
working | Partial fills, still resting | {oid, filledSz, remainingSz, vwap} |
| Status | Description | Fields |
|---|---|---|
filled | Order fully filled | {oid, totalSz, avgPx} |
partiallyFilled | Partially filled and terminal | {oid, totalSz, avgPx} |
cancelled | Cancelled by user | {oid} |
cancelledRiskLimit | Cancelled — risk limit | {oid, reason?} |
cancelledSelfCrossing | Cancelled — self-crossing | {oid} |
cancelledReduceOnly | Cancelled — would increase position | {oid} |
cancelledIOC | IOC expired without full fill | {oid, filledSz} |
rejectedCrossing | Post-only rejected for crossing | {oid} |
rejectedDuplicate | Duplicate order ID | {oid} |
rejectedRiskLimit | Rejected — risk limit | {oid, reason?} |
rejectedInvalid | Invalid parameters | {oid, reason?} |
error | Generic error | {message} |
Unified signed transaction. All state-mutating operations use this model.
The actions array can contain any combination of action types, executed atomically.
Must be signed - see http-readme.md for signing details.
Array of actions to execute atomically. Each action is a tagged object where the key is the compact action tag.
Action types: l, m, mod, cx, cxa, faucet, agentWalletCreation, updateUserSettings, whitelistFaucet (admin), px (admin), o (admin)
One action in the actions array. Exactly one of the following keys must be present: l, m, mod, cx, cxa, faucet, agentWalletCreation, updateUserSettings, (or admin: whitelistFaucet, px, o).
Unique nonce for replay protection (use timestamp in nanoseconds or incrementing counter)
Account public key (base58) - whose account is being acted on
"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
Signer public key (base58) - who is signing (usually same as account, or authorized agent)
"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
Ed25519 signature of bincode_serialize(actions) + nonce_le_u64 + account_pubkey_bytes (base58)
"5j7sVt3k2YxPqH4w..."
Transaction accepted. One status per execution event in response.data.statuses.
Response from POST /order. One entry in response.data.statuses per execution event (e.g. one per order placed, or one for faucet/agent/settings).
Status variants: resting, working, filled, partiallyFilled, cancelled, cancelledRiskLimit, cancelledSelfCrossing, cancelledReduceOnly, cancelledIOC,
rejectedCrossing, rejectedDuplicate, rejectedRiskLimit, rejectedInvalid, deposit, depositFailed, agentWallet, agentWalletFailed,
cancelOneRejected, cancelAllRejected, error.