docs: sync with docs.polymarket.com - 2026-05-21

This commit is contained in:
Etherdrake
2026-05-21 14:56:45 +02:00
parent fa49cb64f0
commit 2df6215a8e
50 changed files with 461 additions and 97 deletions
+44 -5
View File
@@ -32,10 +32,6 @@ These errors can occur on **any authenticated endpoint**.
`Trading is currently disabled. Check polymarket.com for updates` — The exchange is temporarily paused. No orders (including cancels) are accepted.
</ResponseField>
<ResponseField name="503" type="Service Unavailable">
`Trading is currently cancel-only. New orders are not accepted, but cancels are allowed.` — The exchange is in cancel-only mode. You can cancel existing orders but cannot place new ones.
</ResponseField>
<ResponseField name="429" type="Too Many Requests">
`Too Many Requests` — You've exceeded the [rate limit](/api-reference/rate-limits). Back off and retry with exponential backoff.
</ResponseField>
@@ -168,6 +164,26 @@ Errors from order placement endpoints.
`'{address}' address in closed only mode`
</ResponseField>
<ResponseField name="503" type="Service Unavailable">
`Trading is currently cancel-only. New orders are not accepted, but cancels are allowed.` — The exchange is in cancel-only mode. You can cancel existing orders but cannot place new orders.
</ResponseField>
<ResponseField name="503" type="Service Unavailable">
`post-only mode: only post-only orders and cancels are allowed` — The exchange is in post-only mode. You can cancel orders and place orders with `postOnly: true`; non-post-only orders are rejected. The response includes `code: "post_only_mode"` and `retry_after_seconds`, and the same retry delay is also sent in the `Retry-After` HTTP header.
</ResponseField>
Example response:
```json theme={null}
{
"error": "post-only mode: only post-only orders and cancels are allowed",
"code": "post_only_mode",
"retry_after_seconds": 79
}
```
The retry delay is also sent in the `Retry-After` HTTP header.
### POST orders
All errors from `POST /order` apply, plus:
@@ -178,6 +194,29 @@ All errors from `POST /order` apply, plus:
Per-order errors are returned in the `200` response array, with individual error messages for each failed order.
In post-only mode, non-post-only orders in a batch return per-order errors:
```json theme={null}
[
{
"errorMsg": "post-only mode: only post-only orders and cancels are allowed",
"orderID": "",
"takingAmount": "",
"makingAmount": "",
"status": "",
"success": true
},
{
"errorMsg": "post-only mode: only post-only orders and cancels are allowed",
"orderID": "",
"takingAmount": "",
"makingAmount": "",
"status": "",
"success": true
}
]
```
***
## Order Processing Errors
@@ -536,7 +575,7 @@ Errors from order query endpoints.
| `425` | Too Early | Matching engine is restarting — retry with backoff. See [Matching Engine](/trading/matching-engine) |
| `429` | Too Many Requests | Rate limit exceeded — implement exponential backoff |
| `500` | Internal Server Error | Unexpected server error — retry with backoff |
| `503` | Service Unavailable | Exchange paused or in cancel-only mode |
| `503` | Service Unavailable | Exchange paused, or order placement blocked by cancel-only / post-only mode |
<Note>
The CLOB API has an internal override: any error message containing `"not found"` returns `404`, `"unauthorized"` returns `401`, and `"context canceled"` returns `400`, regardless of the original status code.