Skip to main content
All trading operations require Ed25519 signatures. See Transaction Signing for details.

Place Order

{
  "method": "post",
  "request": {
    "type": "action",
    "payload": {
      "action": {
        "type": "order",
        "orders": [{
          "order": {
            "c": "BTC-USD",
            "b": true,
            "px": 100000.0,
            "sz": 0.1,
            "r": false,
            "t": {
              "limit": {
                "tif": "GTC"
              }
            }
          }
        }]
      },
      "signature": "5j7s...base58...",
      "account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
    }
  },
  "id": 1
}

Cancel Order

{
  "method": "post",
  "request": {
    "type": "action",
    "payload": {
      "action": {
        "type": "cancel",
        "cancels": [{
          "c": "BTC-USD",
          "oid": "order_hash_base58"
        }]
      },
      "signature": "5j7s...base58...",
      "account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
    }
  },
  "id": 2
}

Cancel All Orders

Cancel all orders for a specific symbol or all orders across all symbols.
{
  "method": "post",
  "request": {
    "type": "action",
    "payload": {
      "action": {
        "type": "order",
        "orders": [
          {
            "cancelAll": {
              "c": ["BTC-USD"]
            }
          }
        ]
      },
      "signature": "5j7s...base58...",
      "account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
    }
  },
  "id": 3
}
Cancel All Fields:
  • cancelAll: Cancel all order object (part of orders array, uses camelCase)
    • c: Array of symbol strings
    • To cancel all orders in specific symbols: ["BTC-USD", "ETH-USD"]
    • To cancel all orders across all symbols: [] (empty array)
Response: One cancelled status per order that was cancelled.

Batch Orders

Place multiple orders in a single request for maximum efficiency.
{
  "method": "post",
  "request": {
    "type": "action",
    "payload": {
      "action": {
        "type": "order",
        "orders": [
          {
            "order": {
              "c": "BTC-USD",
              "b": true,
              "px": 99900.0,
              "sz": 0.1,
              "r": false,
              "t": {"limit": {"tif": "GTC"}}
            }
          },
          {
            "order": {
              "c": "BTC-USD",
              "b": false,
              "px": 100100.0,
              "sz": 0.1,
              "r": false,
              "t": {"limit": {"tif": "GTC"}}
            }
          }
        ]
      },
      "signature": "5j7s...base58...",
      "account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
    }
  },
  "id": 3
}

Response Format

Response Fields:
  • channel: Always “post” for post responses
  • id: Request ID (matches the id from the request)
  • data: Post response data
    • type: Always “action”
    • payload: OrderResponse (same format as HTTP /order endpoint)
      • status: “ok” or “error”
      • response: Response object
        • type: Response type (e.g., “order”)
        • data.statuses: Array of order statuses (one per order in batch)

Status Types

StatusDescriptionFields
restingOrder placed and resting on book{oid: string}
filledOrder fully filled immediately{oid: string, totalSz: number, avgPx: number}
partiallyfilledOrder partially filled{oid: string, totalSz: number, avgPx: number}
cancelledOrder cancelled{oid: string}
errorOrder rejected{message: string}

Error Handling

Common errors and solutions:
Ensure you’re using the correct serialization format. Use official SDKs when possible.
If signer is different from account, the signer must be pre-authorized via /agent-wallet endpoint.
Check your available balance before placing orders. Consider position size and leverage.
Verify order parameters meet market requirements (min size, tick size, etc).