Skip to main content
All trading operations require Ed25519 signatures and a unique nonce for replay protection. 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"
              }
            }
          }
        }],
        "nonce": 1704067200000000000
      },
      "account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signature": "5j7s...base58..."
    }
  },
  "id": 1
}

Order Fields

FieldTypeDescription
cstringSymbol (e.g., “BTC-USD”)
bbooleanBuy side (true = buy, false = sell)
pxnumberPrice (0.0 for market orders)
sznumberSize/quantity
rbooleanReduce-only (true = only close position)
tobjectOrder type
cloidstring?Optional client order ID (base58)

Order Types

TypeExample
Limit GTC{"limit": {"tif": "GTC"}}
Limit IOC{"limit": {"tif": "IOC"}}
Limit ALO{"limit": {"tif": "ALO"}}
Market{"trigger": {"is_market": true, "triggerPx": 0.0}}

Cancel Order

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

Cancel All Orders

{
  "method": "post",
  "request": {
    "type": "action",
    "payload": {
      "action": {
        "type": "order",
        "orders": [{
          "cancelAll": {
            "c": ["BTC-USD"]
          }
        }],
        "nonce": 1704067200000000000
      },
      "account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signature": "5j7s...base58..."
    }
  },
  "id": 3
}
FieldDescription
cArray of symbols, or [] for all symbols

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"}}
            }
          }
        ],
        "nonce": 1704067200000000000
      },
      "account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signature": "5j7s...base58..."
    }
  },
  "id": 5
}

Response Format

FieldDescription
typeAlways "post" for trading responses
idRequest ID (matches the request)
data.typeAlways "action"
data.payload.status"ok" or "error"
data.payload.response.typeResponse type (e.g., "order")
data.payload.response.data.statusesArray of status objects (one per order)

Status Types

Non-Terminal (Order Still Active)

StatusDescriptionFields
restingOrder placed and resting on book{oid}
workingPartial fills, still resting{oid, filledSz, remainingSz, vwap}

Terminal (Order Complete)

StatusDescriptionFields
filledOrder fully filled{oid, totalSz, avgPx}
partiallyFilledPartially filled and terminal{oid, totalSz, avgPx}
cancelledCancelled by user{oid}
cancelledRiskLimitCancelled - risk limit{oid, reason?}
cancelledSelfCrossingCancelled - self-crossing (STP){oid}
cancelledReduceOnlyCancelled - would increase position{oid}
cancelledIOCIOC expired without full fill{oid, filledSz}
rejectedCrossingPost-only rejected for crossing{oid}
rejectedDuplicateDuplicate order ID{oid}
rejectedRiskLimitRejected - risk limit{oid, reason?}
rejectedInvalidInvalid parameters{oid, reason?}
errorGeneric error{message}

Response Examples

{
  "type": "post",
  "id": 1,
  "data": {
    "type": "action",
    "payload": {
      "status": "ok",
      "response": {
        "type": "order",
        "data": {
          "statuses": [{
            "working": {
              "oid": "Fpa3oVuL3UzjNANAMZZdmrn6D1Zhk83GmBuJpuAWG51F",
              "filledSz": 0.05,
              "remainingSz": 0.05,
              "vwap": 100000.0
            }
          }]
        }
      }
    }
  }
}

Error Handling

Ensure you’re using the correct serialization format including nonce. 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.
Each nonce can only be used once. Use nanosecond timestamps: BigInt(Date.now()) * 1_000_000n.
Verify order parameters meet market requirements (min size, tick size, etc).