Skip to main content

Order Management

Query your order history and cancel pending limit orders.

Order Endpoints Summary

PolySimulator offers two order placement endpoints. Use the one that fits your workflow:
EndpointBest Fortime_in_force FieldSupported Values
POST /v1/ordersNew bots, full featurestime_in_forceGTC (default), FOK, IOC
POST /v1/clob/orderPolymarket migrationorder_typeGTC, FOK, IOC, GTD
Key difference: The native /v1/orders endpoint uses order_type for market/limit and time_in_force for GTC/IOC. The CLOB-compatible endpoint uses order_type for the time-in-force policy (matching Polymarket’s schema). See CLOB Compatibility for the CLOB endpoint schema.

List Orders

GET /v1/orders
Returns orders from two internal data sources merged into a single stream:
  • Pending limit orders — unfilled GTC orders stored in the pending_orders table.
  • Filled / cancelled orders — executed trades from the orders table.
Both types share the same OrderItem response shape. Supports offset and cursor-based pagination.

Query Parameters

ParameterTypeDefaultDescription
statusstringFilter: PENDING, FILLED, CANCELLED, EXPIRED
market_idstringFilter by condition_id
sidestringFilter: BUY, SELL
limitint50Max results (1–200)
offsetint0Pagination offset (ignored when cursor is set)
cursorstringISO-8601 timestamp for cursor pagination (preferred for bots)

Response Fields

FieldTypeDescription
order_idintUnique order identifier
market_idstringMarket condition_id
sidestringBUY or SELL
outcomestringOutcome label (e.g. Yes, No)
order_typestringmarket or limit
limit_pricestring | nullLimit order price (null for market orders)
quantitystringOrder size in shares
time_in_forcestringGTC, FOK, or IOC
statusstringPENDING, FILLED, CANCELLED, or EXPIRED
client_order_idstring | nullYour idempotency key
created_atstringISO-8601 creation timestamp
filled_atstring | nullISO-8601 fill timestamp (null if unfilled)
fill_pricestring | nullExecution price (null if unfilled)
cancelled_atstring | nullISO-8601 cancellation timestamp

Examples

curl -H "X-API-Key: $API_KEY" \
  "https://api.polysimulator.com/v1/orders?status=PENDING&limit=20&offset=0"

Response

{
  "orders": [
    {
      "order_id": 15,
      "market_id": "0x1a2b3c...",
      "side": "BUY",
      "outcome": "Yes",
      "order_type": "limit",
      "limit_price": "0.60",
      "quantity": "10.0",
      "time_in_force": "GTC",
      "status": "PENDING",
      "client_order_id": "limit-001",
      "created_at": "2026-02-06T12:00:00+00:00",
      "filled_at": null,
      "fill_price": null,
      "cancelled_at": null
    }
  ],
  "next_cursor": "2026-02-06T11:55:00+00:00",
  "has_more": true
}
Use cursor-based pagination for bots. The cursor is an ISO-8601 timestamp (created_at of the last item). This avoids page drift when new orders arrive between requests. Pass the next_cursor value from the previous response as the cursor parameter.

Cancel Order

DELETE /v1/orders/{order_id}
Cancel a pending limit order. Only PENDING orders can be cancelled.
curl -X DELETE -H "X-API-Key: $API_KEY" \
  https://api.polysimulator.com/v1/orders/42

Response

{
  "order_id": 42,
  "status": "CANCELLED",
  "order_type": "limit",
  "side": "BUY",
  "outcome": "Yes",
  "price": "0.60",
  "quantity": "10.0",
  "notional": "6.00",
  "fee": "0"
}
Cancellation returns reserved funds:
  • BUY orders: Reserved cash is returned to your balance
  • SELL orders: Reserved shares are returned to your position

Next Steps