Place orders, cancel specific orders, or cancel all orders. Requires Ed25519 signature.
All operations use type: "order" with different items in the orders array.
Order types (use {"order": {...}}):
triggerPx: 0.0 for immediate execution)Cancel single order (use {"cancel": {...}}):
{"cancel": {"c": "BTC-USD", "oid": "order_hash_base58"}}Cancel all orders (use {"cancelAll": {...}}):
{"cancelAll": {"c": ["BTC-USD"]}}{"cancelAll": {"c": []}}Signing: See “Transaction Signing” section below
| Field | Type | Description |
|---|---|---|
c | string | Symbol (e.g., “BTC-USD”) |
b | boolean | Buy side (true = buy, false = sell) |
px | number | Price (0.0 for market orders) |
sz | number | Size/quantity |
r | boolean | Reduce-only (true = only close position) |
t | object | Order type (see below) |
cloid | string? | Optional client order ID (base58) |
| TIF | Description |
|---|---|
GTC | Good Till Cancel - rests on book |
IOC | Immediate or Cancel - fill or kill |
ALO | Add Liquidity Only - post-only maker |
| Field | Description |
|---|---|
c | Symbol |
oid | Order ID to cancel (base58) |
| 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} |
Signed transaction for placing orders.
Must be signed - see "Transaction Signing" section
The action to perform
Account public key - whose account is being traded (base58)
"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
Signer public key - who's signing; usually same as account, or authorized agent (base58)
"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
Ed25519 signature of bincode_serialize(action + account + signer) (base58)
"5j7sVt3k2YxPqH4w..."