Network: Mainnet▼
Order Actions
Raw order action payloads for POST /v1/session/actions.
For SDK-first examples, see Orders. For request signing, batching, nonce fields, and response behavior, see Execute Session Actions.
Create Order
Create an order by including a CreateOrder action inside a session actions request.
json
{
"CreateOrder": {
"side": "Buy",
"price": "1000000000",
"quantity": "5000000000",
"order_type": "Spot"
}
}Fields:
| Field | Description |
|---|---|
side | Buy or Sell. |
price | Raw integer price, scaled by market precision. |
quantity | Raw integer quantity, scaled by market precision. |
order_type | Order execution type. See Order Types. |
Use Precision & Decimals to convert human-readable prices and quantities into raw integer values.
Order Types
Set CreateOrder.order_type to one of these values:
| Order Type | Raw order_type Value |
|---|---|
| Spot | "Spot" |
| Market | "Market" |
| Limit | { "Limit": ["1000000000", "1734876543210"] } |
| Post Only | "PostOnly" |
| Fill Or Kill | "FillOrKill" |
| Bounded Market | { "BoundedMarket": { "max_price": "1100000000", "min_price": "900000000" } } |
Notes:
- Buy limit orders execute at the limit price or lower.
- Sell limit orders execute at the limit price or higher.
PostOnlyreverts if any quantity would execute immediately as a taker.FillOrKillfails unless the full order can execute immediately.BoundedMarketrequiresmax_pricegreater than or equal tomin_price.
Cancel Order
Cancel an open order by including a CancelOrder action inside a session actions request.
json
{
"CancelOrder": {
"order_id": "0x..."
}
}Fields:
| Field | Description |
|---|---|
order_id | Order ID returned by order creation, order history, or WebSocket order updates. |
For low-level signing details specific to cancellation, see Cancelling an Order.
Batch Example
POST /v1/session/actions groups actions by market. A single request supports up to 5 actions total across up to 5 markets.
json
{
"actions": [
{
"market_id": "0x1234567890abcdef...",
"actions": [
{
"CreateOrder": {
"side": "Buy",
"price": "1000000000",
"quantity": "100000000",
"order_type": "Spot"
}
},
{
"CancelOrder": {
"order_id": "0xabcdef..."
}
}
]
}
],
"signature": {
"Secp256k1": "0x789..."
},
"nonce": "2",
"trade_account_id": "0xdef456...",
"session_id": {
"Address": "0xabc123..."
},
"collect_orders": true
}