Announcements
Matching engine changes — planned restarts, updates, and maintenance windows — are announced before they happen in these channels:Telegram
Join the Polymarket Trading APIs channel for real-time announcements.
Discord
Join the #trading-api-announcements channel in the Polymarket Discord.
Handle Matching Engine Restarts
During a restart, order-related actions reject new work temporarily. After the engine returns, it enters post-only mode for two minutes: cancels remain available, but new orders must be eligible maker orders submitted as post-only. Your integration controls whether and when to retry. Use a delay supplied by the service when one is available; otherwise, fall back to exponential backoff.Recommended Retry Strategy
1
Detect the Restart
Treat the restart signal as a temporary condition. Do not retry unrelated
request failures under the same policy.
2
Wait Before Retrying
Honor the server-provided delay when present. Otherwise, start with a
one-to-two-second delay and increase it after each failed attempt.
3
Resume in Post-Only Mode
Once restart rejections stop, continue canceling as needed and submit only
eligible maker orders as post-only for the next two minutes.
Retry Order Placement
Retry an eligible post-only limit order only when the rejection identifies a matching engine restart:- TypeScript
- Python
- API
Given a
SecureClient, catch RequestRejectedError and check its
restriction field. The SDK does not retry automatically.Don’t have the TypeScript SDK installed? Start with the TypeScript SDK
guide, then come back.TypeScript
Handle Restricted Trading Modes
Restricted modes change which new orders are accepted. Cancels remain available unless trading is fully disabled. A cancel-only restriction blocks all new orders; a post-only restriction allows eligible maker orders submitted as post-only.Handle Request-Level Restrictions
Pause new submissions when trading is unavailable. Switch to eligible post-only orders only when the rejection identifies post-only mode:- TypeScript
- Python
- API
Given a
SecureClient, handle rejections from placeLimitOrder():TypeScript
restriction identifies post-only rejections, and retryAfter contains
the server-provided delay in seconds when supplied. An unclassified HTTP
503 does not distinguish cancel-only mode from fully disabled trading.
Pause new submissions and propagate the error; do not infer that cancels
are available from this response alone.Handle Batch Post-Only Rejections
A batch can be accepted at the request level while individual non-post-only orders are rejected. Check every result before treating the batch as successful:- TypeScript
- Python
- API
postOrders() returns an OrderResponse for each submitted order. Compare
rejected results with OrderResponseErrorCode.POST_ONLY_MODE.TypeScript
Best Practices
- Subscribe to announcement channels — prepare your order workflow before a planned restart.
- Retry only restart rejections — do not apply restart retry logic to unrelated failures.
- Honor server delays — use the supplied delay when present and bounded exponential backoff otherwise.
- Adapt to restricted modes — pause new orders in cancel-only mode and submit only eligible maker orders in post-only mode.
- Log restriction changes — correlate observed transitions with announced maintenance windows.