Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs-polymarket-us.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Orders API

The Orders API provides order entry and management capabilities for trading on markets.

Endpoints

Order Entry

MethodEndpointDescription
POST/v1/ordersCreate a new order
POST/v1/order/previewPreview order before submission

Order Query

MethodEndpointDescription
GET/v1/orders/openGet all open orders
GET/v1/order/{orderId}Get a specific order by ID

Order Cancellation

MethodEndpointDescription
POST/v1/order/{orderId}/cancelCancel a specific order
POST/v1/orders/open/cancelCancel all open orders

Order Types

ValueTypeDescription
1LIMITLimit order at specified price
2MARKETMarket order executed at best available price

Order Intent

Orders require an intent indicating position direction:
ValueIntentDescription
1BUY_YESBuy Yes contracts (go long on Yes)
2SELL_YESSell Yes contracts (close long Yes position)
3BUY_NOBuy No contracts (go long on No)
4SELL_NOSell No contracts (close long No position)

Order States

Orders progress through these states:
PENDING_NEW → PARTIALLY_FILLED → FILLED

                CANCELED / REJECTED / EXPIRED
ValueStateDescription
7PENDING_NEWOrder received, not yet processed
1PARTIALLY_FILLEDOrder partially executed
2FILLEDOrder fully executed
3CANCELEDOrder canceled by user
5REJECTEDOrder rejected by exchange
6EXPIREDOrder expired (GTD orders)

Time in Force

ValueTIFDescription
1GTCGood till canceled
2GTDGood till specified date
3IOCImmediate or cancel
4FOKFill completely or cancel
Real-Time Order UpdatesAfter submitting orders via REST, use the WebSocket Private Stream to receive real-time updates on order status, fills, and cancellations.

Best Practices

  1. Use WebSocket for updates - Subscribe to order updates instead of polling
  2. Preview before submit - Use the preview endpoint for order validation
  3. Handle rejects - Implement proper error handling for rejected orders
  4. Use synchronous execution - Set synchronous_execution: true to wait for order acknowledgment