{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arena-predictions-com/json-schema/arena-predictions-com-order-request-schema.json",
  "title": "OrderRequest",
  "description": "A buy names instrumentId or ticker, side and count. A sell names tradeId and covers the whole open position. A limit order adds limitPriceCents. Unknown fields are refused (400), so a typo never changes an order.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arena-predictions-com-openapi.json#/components/schemas/OrderRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "idempotencyKey"
  ],
  "properties": {
    "action": {
      "type": "string",
      "enum": [
        "buy",
        "sell"
      ],
      "default": "buy"
    },
    "type": {
      "type": "string",
      "enum": [
        "market",
        "limit"
      ],
      "description": "market: fills now at the live price or is refused. limit: fills at limitPriceCents or better, or rests (gtc), or is canceled (ioc, fok)."
    },
    "idempotencyKey": {
      "type": "string",
      "format": "uuid",
      "description": "One per order. The same key again answers the stored order with replayed: true and places nothing; the same key with a different order is 409 idempotency_key_reused. Retry with the same key after a timeout or a 503."
    },
    "clientOrderId": {
      "type": "string",
      "format": "uuid",
      "description": "Kalshi's name for idempotencyKey. Send one of the two."
    },
    "instrumentId": {
      "type": "string",
      "pattern": "^ins_[0-9A-HJKMNP-TV-Z]{12}$",
      "description": "Buy: the Arena instrument; side is the instrument's side. It must list on one live Kalshi market (409 no_tradable_listing otherwise)."
    },
    "ticker": {
      "type": "string",
      "description": "Buy: a Kalshi market ticker instead of instrumentId; side is the market's side. Never echoed back while the venue-data switch is off."
    },
    "side": {
      "type": "string",
      "enum": [
        "yes",
        "no"
      ],
      "description": "Buy: the side to buy."
    },
    "count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000000000,
      "description": "Buy: contracts. Your paper balance is the limit."
    },
    "tradeId": {
      "type": "string",
      "format": "uuid",
      "description": "Sell: the open position (GET /portfolio)."
    },
    "limitPriceCents": {
      "type": "integer",
      "minimum": 1,
      "maximum": 99,
      "description": "Limit: your price for the side you trade, in cents (a percent)."
    },
    "timeInForce": {
      "type": "string",
      "enum": [
        "gtc",
        "ioc",
        "fok",
        "good_till_canceled",
        "immediate_or_cancel",
        "fill_or_kill"
      ],
      "default": "gtc"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time",
      "description": "gtc only: when the order stops resting. At most 365 days out."
    },
    "maxPriceCents": {
      "type": "integer",
      "minimum": 1,
      "maximum": 99,
      "description": "Market buy: refuse to fill above this (409 price_moved, nothing placed)."
    },
    "minPriceCents": {
      "type": "integer",
      "minimum": 1,
      "maximum": 99,
      "description": "Market sell: refuse to sell below this (409 price_moved, nothing sold)."
    },
    "route": {
      "type": "string",
      "enum": [
        "kalshi",
        "best"
      ],
      "description": "best: a fill may be priced at Novig's or Polymarket's price when it passes every check. Omitted: Kalshi's."
    },
    "statedProbPct": {
      "type": "integer",
      "minimum": 1,
      "maximum": 99,
      "description": "Buy: your probability for the side. Never changes the fill; scored on /eval. Paper only."
    },
    "execution": {
      "type": "string",
      "enum": [
        "paper",
        "kalshi",
        "poly-intl",
        "prophetx"
      ],
      "default": "paper",
      "description": "paper (default) uses the paper book and trade:write. kalshi sends a live Kalshi order and needs trade:write:kalshi. poly-intl sends a live Polymarket International order and needs trade:write:poly-intl. prophetx sends a live ProphetX order with the key owner's own ProphetX connection and needs trade:write:prophetx; it answers 503 trading_off until Arena opens it. Polymarket US is not a value."
    },
    "op": {
      "type": "string",
      "enum": [
        "create",
        "cancel",
        "amend",
        "status"
      ],
      "description": "Live only. Default create. status is ProphetX only: read one order."
    },
    "orderId": {
      "type": "string",
      "description": "Live cancel or amend: the Kalshi order id (a UUID). ProphetX cancel or status: the ProphetX order id."
    },
    "externalId": {
      "type": "string",
      "format": "uuid",
      "description": "ProphetX: the order's UUID, one per order; idempotencyKey is accepted as the same thing. Required on a create and on a cancel, which ProphetX wants beside its own order id."
    },
    "strikeId": {
      "type": "string",
      "maxLength": 80,
      "description": "ProphetX create: the strike (the selection on a market) the order is for. At most 80 characters of letters, digits, _ . : and -."
    },
    "price": {
      "type": "integer",
      "minimum": -25000,
      "maximum": 25000,
      "description": "ProphetX create: American odds as a whole number on ProphetX's published ladder: between -25000 and 25000, and at or below -100 or at or above 100. The answer carries impliedPct beside it: 100/(odds+100) for positive odds, |odds|/(|odds|+100) for negative."
    },
    "quantity": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000,
      "description": "ProphetX create: the stake in dollars, at most two decimals."
    },
    "orderStrategy": {
      "type": "string",
      "maxLength": 40,
      "description": "ProphetX create, optional and undocumented: ProphetX's submit_order documents external_id, strike_id, price and quantity only. When given it is forwarded as order_strategy; when left out, nothing is sent for it. At most 40 characters of letters, digits, _ . : and -."
    },
    "priceCents": {
      "type": "integer",
      "minimum": 1,
      "maximum": 99,
      "description": "Live: the price of the side, in cents."
    },
    "updatedPriceCents": {
      "type": "integer",
      "minimum": 1,
      "maximum": 99,
      "description": "Live amend: the new price of the side."
    },
    "updatedCount": {
      "type": "integer",
      "minimum": 1,
      "description": "Live amend: the new contract count."
    }
  }
}