Error reference

Every error the API returns, what causes it, and how to handle it in a bot.

HTTPErrorCauseBot handling
400Missing required fieldsticker/action/yes_no/count absentFix the payload; do not retry as-is
400Invalid or unknown marketBad ticker/slug, or market settledRe-resolve the market via search
400Market is not tradable / not accepting ordersVenue paused books or market closedSkip market; retry only after status change
400count must be at least NBelow venue minimum order size (Polymarket: 5)Raise size or skip
400limit_price / trigger_price grid errorsOff the market's tick grid (0.01 or 0.001)Round to the advertised min_tick_size
400Insufficient liquidityDisplayed depth cannot absorb a market orderReduce size or use IOC limit
400Fill-or-kill / Immediate-or-cancel rejectedFOK couldn't fully fill; IOC had nothing marketableExpected control flow — handle, don't alarm
400Insufficient balanceCost + resting reservations exceed available balanceFree reservations (cancel resting buys) or downsize
400Insufficient open positionSelling/reserving more than held (minus holds)Reconcile positions via GET /portfolio
401UnauthorizedMissing/revoked API keyStop; rotate credentials
403Forbidden: account ownership mismatchKey does not own the target accountFix account/key pairing
404Not foundUnknown order id / account / userTreat as terminal for that id
410Order already executed / not restingCancelling something that already completedTreat as success-equivalent: nothing left to cancel
429RateLimitExceededPer-minute token bucket emptyBack off per Retry-After
429QuotaExceeded / RestingOrderLimitExceededMonthly quota or resting-order capUpgrade tier or reduce footprint
500Internal Server ErrorOur bugRetry with the SAME client_order_id — idempotency makes it safe
The golden rule

Always send client_order_id. Any timeout or 5xx can then be retried blindly: if the original write succeeded you get the stored order back with idempotent_replay: true; if it failed, the retry executes. Double-fills become impossible.