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
| Method | Endpoint | Description |
|---|
POST | /v1/orders | Create a new order |
POST | /v1/order/preview | Preview order before submission |
Order Query
| Method | Endpoint | Description |
|---|
GET | /v1/orders/open | Get all open orders |
GET | /v1/order/{orderId} | Get a specific order by ID |
Order Cancellation
| Method | Endpoint | Description |
|---|
POST | /v1/order/{orderId}/cancel | Cancel a specific order |
POST | /v1/orders/open/cancel | Cancel all open orders |
Order Types
| Value | Type | Description |
|---|
| 1 | LIMIT | Limit order at specified price |
| 2 | MARKET | Market order executed at best available price |
Order Intent
Orders require an intent indicating position direction:
| Value | Intent | Description |
|---|
| 1 | BUY_YES | Buy Yes contracts (go long on Yes) |
| 2 | SELL_YES | Sell Yes contracts (close long Yes position) |
| 3 | BUY_NO | Buy No contracts (go long on No) |
| 4 | SELL_NO | Sell No contracts (close long No position) |
Order States
Orders progress through these states:
PENDING_NEW → PARTIALLY_FILLED → FILLED
↓
CANCELED / REJECTED / EXPIRED
| Value | State | Description |
|---|
| 7 | PENDING_NEW | Order received, not yet processed |
| 1 | PARTIALLY_FILLED | Order partially executed |
| 2 | FILLED | Order fully executed |
| 3 | CANCELED | Order canceled by user |
| 5 | REJECTED | Order rejected by exchange |
| 6 | EXPIRED | Order expired (GTD orders) |
Time in Force
| Value | TIF | Description |
|---|
| 1 | GTC | Good till canceled |
| 2 | GTD | Good till specified date |
| 3 | IOC | Immediate or cancel |
| 4 | FOK | Fill 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
- Use WebSocket for updates - Subscribe to order updates instead of polling
- Preview before submit - Use the preview endpoint for order validation
- Handle rejects - Implement proper error handling for rejected orders
- Use synchronous execution - Set
synchronous_execution: true to wait for order acknowledgment