Skip to main content
POST
/
v2
/
clob
/
orders
curl -X POST https://api.pmx.trade/v2/clob/orders \
  -H "Content-Type: application/json" \
  -d '{
    "orderMessage": {
      "market": "7xKXabc123...",
      "owner": "9yLMdef456...",
      "side": 0,
      "outcome": 0,
      "priceBps": 5500,
      "quantity": "50000000",
      "nonce": "1705312800000",
      "expiry": "1705399200"
    },
    "signature": "base64signature...",
    "orderType": "limit",
    "timeInForce": "gtc"
  }'
{
  "orderId": "b2c3d4e5-...",
  "status": "partially_filled",
  "fills": [
    {
      "id": "c3d4e5f6-...",
      "priceBps": 5500,
      "quantity": "30000000",
      "usdcAmount": "16500000",
      "takerFee": "41250",
      "makerRebate": "8250",
      "protocolFee": "33000",
      "fillType": "direct",
      "matchedAt": "2025-01-15T12:00:01.000Z"
    }
  ],
  "committedAmount": "11000000"
}
Places a limit or market order. The order message must be signed by the owner’s wallet. No auth token is needed — identity is proven by the Ed25519 signature on the order message. Orders are matched in real-time by the matching engine.

Request body

orderMessage
object
required
signature
string
required
Ed25519 signature of the Borsh-serialized 92-byte order message.
orderType
string
default:"limit"
limit or market.
timeInForce
string
gtc (Good-Til-Cancelled), ioc (Immediate-Or-Cancel), or fok (Fill-Or-Kill). Defaults to gtc for limit orders.

Response

orderId
string
Order UUID assigned by the engine.
status
string
Order status after placement: open, partially_filled, filled, or cancelled.
fills
array
Immediate fills if the order matched.
committedAmount
string
Amount committed (locked) for this order in raw units.
curl -X POST https://api.pmx.trade/v2/clob/orders \
  -H "Content-Type: application/json" \
  -d '{
    "orderMessage": {
      "market": "7xKXabc123...",
      "owner": "9yLMdef456...",
      "side": 0,
      "outcome": 0,
      "priceBps": 5500,
      "quantity": "50000000",
      "nonce": "1705312800000",
      "expiry": "1705399200"
    },
    "signature": "base64signature...",
    "orderType": "limit",
    "timeInForce": "gtc"
  }'
{
  "orderId": "b2c3d4e5-...",
  "status": "partially_filled",
  "fills": [
    {
      "id": "c3d4e5f6-...",
      "priceBps": 5500,
      "quantity": "30000000",
      "usdcAmount": "16500000",
      "takerFee": "41250",
      "makerRebate": "8250",
      "protocolFee": "33000",
      "fillType": "direct",
      "matchedAt": "2025-01-15T12:00:01.000Z"
    }
  ],
  "committedAmount": "11000000"
}
No auth token is needed. The owner field in the order message identifies the trader, and the Ed25519 signature proves ownership.
Ensure you’ve deposited USDC into your smart wallet before placing orders. Buy orders require USDC equal to priceBps * quantity / 10000. Sell orders require the corresponding outcome tokens.