Errors
Every failure is a JSON body with a machine-readable error code. Branch on the code, not the message, which is for people and may change.
The error shape
{ "error": "quote_expired" }
{ "error": "invalid_request", "detail": [ { "path": ["side"], "message": "..." } ] }
{ "error": "insufficient_scope", "required": "orders:write", "message": "..." }
{ "error": "over_wager_limit", "detail": "...", "maxStake": 50 }erroris always present and is the field to branch on.detailis present on validation, quote and order refusals and carries the reason as prose for a person. Do not parse numbers from it; the figures you can act on are named fields, listed below.maxStake(a number, major units) is present on403 over_wager_limitand422 stake_exceeds_stale_limit: the largest stake that would be accepted. Re-quote at or under it.maxCentsis present on409 line_not_available: the executable price, in cents, that put the line outside the tradeable band. It is a price, not an amount.retryAfterMsis present on409 over_tenant_exposure: how long until the window that is full rolls over.requestedStakeandsupportedStakeare present on409 stake_exceeds_available_depth: what you asked for, and the largest stake the book can fill at these terms.sellableContractsandminimumContractsare present on422 insufficient_positionand422 below_venue_minimumwhen a live cash out is refused at quote time: the most contracts the player could sell now, and the smallest sale the market accepts.orderIdis present on409 quote_already_used, where it names the order that spent the quote, and on409 idempotency_conflict, where it names the order that already holds yourclientOrderId.priceMoveis present on409 price_movedand on nothing else. It carriesfromCents,toCentsandadverseCents, so you can show the player how the price moved without re-quoting, plustoPrice, the live price exactly, andliveBook, the live book on both outcomes with the time Parity read it.requiredis present oninsufficient_scopeand names the scope the route needs. OnPOST /api/v1/embed-sessionsandDELETE /api/v1/embed-sessions/{id}it is an array (those routes need three scopes) and amissingarray beside it names the ones your key lacks.retryAfterSecondsis present on every429, and so is theRetry-Afterheader. They carry the same number of seconds.messageis prose for a log line. It may change; do not parse it.
The request id
Most partner responses, success and failure alike, carry a parity-request-id header: a fresh random value Parity attaches as the response goes out. The 429s from the image and embed-session limits do not.
Quotes and orders, the calls disputes are about, work differently. On POST /api/v1/quotes and POST /api/v1/orders you may send your own id in an x-request-id header: 1 to 128 characters of letters, digits, ., _, : and -. Parity uses it when it is well formed and mints a random one when it is absent or is not, and either way the response carries it in both x-request-id and parity-request-id, success and refusal alike. That id is stored with the quote, the order and any refusal, so Parity support can find the call by it. Keep it unique per call if you want it to identify one. The combo quote and order routes echo it the same way, without storing it.
When you report a problem, send the request id together with what else identifies the call: the route, the time (UTC), the player's externalUserId, and the quoteId, orderId or your clientOrderId where there is one, with the error code you received.
The one code that is not a failure
409 reconciliation_required means hold the authorization
Parity is still confirming whether the venue took the order. This is not a rejection: collateral stays committed and you must not release the authorization.
GET /api/v1/orders/{id} reports it as status: "submitted", settlementState: "pending", actualDebit of "0.00" and the whole authorization still showing as releaseAmount. Poll until settlementState becomes settled.
Do not show an unresolved order as failed. Releasing the authorization on an order that did execute leaves a real position with no cash behind it, and nothing flags it later.
Every error this API returns
400: the request needs fixing
| error | Where | Meaning |
|---|---|---|
invalid_json | Every route with a JSON body: quotes, orders, cancel, confirm-reserve, jurisdiction and limits writes, embed sessions, deposit address, sandbox controls | The body did not parse as JSON. |
invalid_request | The same routes, and the order list | Schema validation failed (detail lists the issues), or on the order list a clientOrderId arrived without an externalUserId. |
missing_user | Quotes, orders, deposit address; jurisdiction and limits | No X-Parity-User header. On jurisdiction and limits, an empty {id} in the path. |
invalid_cursor | Events, orders, positions, settlements, player activity, reconciliation feed, sandbox ledger | Malformed, or issued under a different sort/dir. Restart from the first page. See “A malformed cursor is refused on every feed” below. |
invalid_scope | Orders, positions, settlements | scope is anything other than children. Leave it out to read one operator. |
scope_with_operator_header | Orders, positions, settlements | scope=children sent together with x-parity-operator. scope=children reads your own rows and your direct child operators’ together, so send it as yourself; to read one child, send the header without scope. |
invalid_limit | Events (1 to 100, or 1 to 500 with updated_since), settlements, player activity, reconciliation feed | Outside the route’s range. The order, position and ledger lists do not refuse a limit: they bring it into range. |
invalid_sport | Events | A sport that is not in your catalogue. The message lists the sports available to you. |
invalid_category | Events | Not a canonical category. Refused, not ignored, so a bad filter cannot return the whole catalogue. |
invalid_sort | Events | Not one of trending, volume, closing-soon, new. |
invalid_dir | Events | Not asc or desc. |
invalid_date | Events, the order list, the customer statement, the audit trail | A date parameter (closesAfter, closesBefore, updated_since, since, until, from, to) was not ISO-8601. The order list refuses an unreadable since or until rather than returning every order. |
invalid_period | Customer statement | from is not earlier than to, or the period is longer than 366 days. |
invalid_format | Customer statement, audit trail | format is not json or csv. |
incomplete_period_limit | PATCH limits | After the change the period limit would have a stake ceiling without a window, or a window without a ceiling. Nothing was changed. |
invalid_tradable | Events | tradable was not true or false. |
invalid_parameter | Events | A list filter sent with updated_since: sort, dir, search, tradable, closesAfter, closesBefore or book. |
updated_since_too_old | Events | updated_since is earlier than the start of the change feed. Sync the catalogue in full instead. |
invalid_type | Reconciliation feed | Unknown item type in a ?type= filter. |
invalid_type | Player activity | Unknown activity type in a ?type= filter. The body lists the supported ones. |
invalid_date | Player activity | updated_since was not an ISO-8601 instant with a time zone. |
updated_since_too_old | Player activity | updated_since is earlier than activity.earliest (90 days ago, or the start of the feed), or the cursor’s pass began more than 91 days ago. The body carries earliest. |
invalid_from | Reconciliation | The window bound was not ISO-8601. |
invalid_since | Deprecated settlement feed | Not ISO-8601. Refused rather than treated as “from the beginning”. |
invalid_outcome | Settlements | outcome was not won, lost or void. |
invalid_settled_from | Settlements | settledFrom was not ISO-8601. |
invalid_settled_to | Settlements | settledTo was not ISO-8601. |
invalid_jurisdiction | Jurisdiction assertion | country was not a two-letter ISO 3166-1 alpha-2 code. |
invalid_origin | Embed sessions | returnOrigin could never match a browser Origin header. |
invalid_region | Embed sessions | A region we do not know. |
invalid_body | Sandbox resolutions | A missing or invalid field such as positionId or resolution. A body that does not parse as JSON is invalid_json, as everywhere else. |
scenario_invalid | Sandbox scenarios | The scenario is not a partial fill, or its size is unusable. |
position_not_open | Sandbox resolutions | The request does not name a position that can still be resolved. |
no_contracts | Price stream | No usable contract ids in ?contracts=. |
Swipe the table sideways for more columns.
401 / 403: credentials, scope and eligibility
| Status | error | Meaning |
|---|---|---|
401 | missing_credentials | No Authorization header, or not a Bearer token. |
401 | invalid_key | Unrecognised key. |
401 | revoked_key | The key was revoked. |
403 | insufficient_scope | The key does not carry the scope this route needs; required names it. Checked before the rate limit, so a scope mistake never shows up as a 429. |
403 | operator_suspended | The operator account is not active. Returned for any status other than active, not only a suspension. |
403 | operator_archived | Parity has archived this operator. Every request with its keys is refused, and no new session, quote or order is taken. Ask Parity to restore it. |
403 | operator_not_permitted | Aggregators: the x-parity-operator header names an operator this key is neither for nor the direct parent of. The refusal does not say whether that operator exists. |
403 | mode_mismatch | Aggregators: the x-parity-operator header names an operator in the other mode. A sandbox key never acts for a live operator, and a live key never acts for a sandbox one. Use a key of the same mode. |
403 | not_a_sandbox_operator | A sandbox control called by a tenant that is not a sandbox. In practice sandbox_only answers first. |
403 | sandbox_only | A balance, ledger or funding endpoint called by a live tenant. Those model a Parity-held balance and exist for sandbox integration only. |
403 | market_not_offered | The market exists; this operator is not offered it. Not a 404, so you do not debug your ids. |
403 | quote_not_yours | The quote belongs to another operator. A quote is an offer to one party. |
403 | over_wager_limit | The stake is above a maximum wager in force for this account: either the number the operator set for every account under it, or a tighter one set against this account. maxStake on the body is that ceiling. Send a stake at or under it and it works immediately. |
403 | over_period_limit | This account has staked its allowance for a rolling window. Unlike over_wager_limit, the stake is not too large and a smaller one may not help; the allowance refills with time, so wait. detail names what was staked, over what window and against which ceiling. |
403 | over_order_limit | The order is above the operator’s tenant-wide ceiling on one order’s notional. A separate control from the two above, covering sells as well as buys. |
403 | user_suspended | You suspended this player, in the portal or with PUT /api/v1/users/{id}/status. Returned on quotes and orders. A 403 because the request is correct and the refusal comes from your configuration. |
403 | sell_not_available | A sell (cash out) on a live account while cashing out before settlement is turned off. Returned on quotes and orders. The position stays open and settles normally. |
403 | cash_out_paused | A sell (cash out) while cash outs are paused, for every account or for yours. Returned on quotes and orders. Buying carries on, and the position stays open until the market settles. |
Swipe the table sideways for more columns.
404: not found
| error | Meaning |
|---|---|
market_not_found | No such contract, on a quote request. |
quote_not_found | No such quote, on an order request. It carries noOrderForKey: true on the same terms as quote_expired below. |
unknown_event | No such event id or slug in this operator’s catalogue. |
unknown_order | No such order for this operator. Also covers “not yours”, so the route cannot confirm a guessed id. |
unknown_position | Same rule, for a position. |
unknown_user | No such player for this operator, on the settlement register, the reconciliation feed, a player’s activity and the two sandbox balance reads. The order and position lists return an empty page instead, so check the id before trusting an empty result. |
unknown_deposit | No such deposit for this operator. |
position_not_found | Sandbox resolutions. No such position for this operator. |
scenario_not_found | Sandbox scenarios. No armed scenario with that id. |
not_available | POST /api/v1/combos/orders. Combos are on for your operator but this combo cannot be placed yet; reason says why (sandbox, client_wallet or operator_wallet). Nothing was held. |
Swipe the table sideways for more columns.
409: the state moved
| error | Meaning | What to do |
|---|---|---|
not_executed | Trade confirmation. The order has not traded (cancelled, rejected or still pending), so there is nothing to confirm. Read the order instead. | |
price_stale | The upstream price is too far behind to trade on. Returned by both the quote and the order path. | Wait for the next tick and re-quote. |
quote_expired | The quote passed expiresAt. Once it is more than ten seconds past, the refusal carries noOrderForKey: true: no order holds this clientOrderId and this quote can never place one, so an earlier request under the same id and the same quoteId whose answer you lost placed nothing. It says nothing about a request under another quoteId, and it is left off whenever Parity could not finish that check in time. Without it, send the same request again before re-quoting. A 403 user_suspended carries it on the same terms. | Re-quote and re-confirm the new price. |
quote_already_used | That quote was spent by an order that is not the one you are sending. It cannot be the same clientOrderId: a resend of that id replays as a 200 and never reaches this branch. | Read orderId on the body. It names the order that spent the quote, and GET /api/v1/orders/{id} says what it bought. Then quote afresh for whatever intent is still unfilled. Your own clientOrderId looks up an empty page here, so do not reach for it. |
reconciliation_required | The venue did not answer in time. The order may or may not exist there. | Hold the authorization. Poll GET /api/v1/orders/{id} until settlementState is settled. Never release. |
not_cancellable | This order's transmissionState is not not_transmitted, so it cannot be withdrawn. The body carries the state. | unknown: keep holding the authorization and wait for reconciliation. resolved: the money is already decided, so apply the order's own operatorMoney. |
resolution_conflict | A sandbox position was already settled to a different resolution. | Sandbox only. The first resolution stands and is not rewritten; ask for the same one to replay it. |
price_moved | The venue's live book has moved off the price the quote named. Adverse moves only: a move in the player's favour fills at the better price, except for a buy on a fast up-or-down window (5 minute, 15 minute, 1 hour, 4 hour), where a move either way past the larger of 5 cents and 10% of the quoted price is refused and adverseCents is negative for a move in the player's favour. priceMove on the body carries fromCents, toCents and adverseCents, with the live price exactly as toPrice and the live book as liveBook. | Show the new number and let the player decide. You do not have to re-quote blind to find it. |
price_unverified | Parity could not reach the venue to confirm the current price, so the order was not accepted. Unlike price_stale, this is not about the age of a price Parity holds. | Retry in a moment. Nothing was accepted, so it is safe. |
market_paused | Quotes. The venue was read for the quote and offers nothing on the side being traded this instant, on any contract whose book Parity reads. Also a contract that settles on a protocol Parity does not trade, with detail “This market is not available to trade yet.”; such contracts are withdrawn from the catalogue when ingest learns their protocol. | Re-quote in a moment; the empty-book case clears by itself. The protocol case does not: stop offering the contract. |
line_not_available | The outcome being bought is executable above the wagerable ceiling, so that side is not wagerable; the other side is judged on its own price. It is not a suspension: the verdict is recomputed from the book on every request. detail names the offending price. Buys only, so a holder of the near-certain side can always exit. | Re-quote rather than retrying a spent quote. It clears when the book moves back inside the band. |
idempotency_conflict | A clientOrderId that already names a different order. Two orders want one key and the first one has it. | Do not retry. orderId on the body names the order that holds the key; reconcile your own reservation against it. |
over_tenant_exposure | Your tenant has taken as much stake as its per-window exposure budget allows. Quotes and orders. The request is correct; the window is full. | Wait retryAfterMs (on the body) and try again. Not a 429: it is about stake, not request count. |
stake_exceeds_available_depth | Quotes only. The book cannot fill the whole stake at these terms. requestedStake and supportedStake are on the body. Refused rather than quoted smaller, so a customer is never charged for a trade they did not ask for. | Offer the customer supportedStake, and re-quote at that stake if they accept. |
order_cancelled | On confirm-reserve: the order was cancelled before you confirmed. | Release the authorization. Nothing stands behind it. |
not_an_intent | On confirm-reserve: the order is not awaiting a reserve. It is already at a venue, filled or rejected. | Do not absorb this. Read the order back and act on its own settlementState and operatorMoney. |
Swipe the table sideways for more columns.
Combos (optional, preview)
The combo endpoints answer 404 until Parity enables combos for your operator. Once enabled, they add these codes. See Combos (optional).
| error | Where | Meaning |
|---|---|---|
400 invalid_request | Combo quotes and orders | Fewer than 2 legs or more than 50, a malformed field, a clientOrderId of the wrong shape, or a minPayoutMinor not above the stake or over your payout cap. Nothing was held. |
402 insufficient_funds | Combo orders | The player’s balance does not cover the stake. Only where Parity holds the player’s wallet. Nothing was held. |
404 not_found | Every combo endpoint | Combos are off for your operator, or no combo has this id for your operator. |
409 combos_paused | Combo quotes and orders | The kill switch is on. Nothing was priced or held. |
409 combos_busy | Combo orders | The shared budget for firm prices is spent for the moment. Nothing was held. Try again shortly. |
409 client_order_reused | Combo orders | This clientOrderId was already used for a different combo. Nothing was held. |
422 refused | Combo quotes and orders | A cap or a leg rule refused the combo before anything was held. refusals lists each one. |
Swipe the table sideways for more columns.
Each refusal in refusals has a code, from operator_disabled to combos_paused, and Combos (optional) lists every one. A combo that ends not_filled or price_changed is not an error response: it carries reason.code, one of no_quotes, price_changed, expired, busy, refused and failed.
Some of these mean re-quote. The rest mean wait, or stop.
price_stale, price_moved, price_unverified, quote_expired, market_paused and line_not_available say the request was correct and the world changed: ask for a fresh quote and show the player the new price.
trading_paused, order_lane_unavailable and live_execution_unavailable are 503s: nothing was quoted or placed, and the right response is to wait and try again, not to re-price.
reconciliation_required and not_cancellable say nothing about the price and concern an order whose money you cannot move yet. Re-quoting risks a second position against the same reservation; releasing could leave a live position with no cash behind it.
quote_already_used and idempotency_conflict mean something else already happened under an identifier you thought was free. Neither is retryable: read the order that holds it.
422: accepted shape, refused business rule
| error | Meaning |
|---|---|
statement_too_large | Customer statement. The period holds more than 5,000 lines; ask for a shorter one. |
market_not_open | The contract has closed, resolved or been voided, and detail carries the status. Also an up or down window that has not opened yet (detail says when it opens), a 5 minute, 15 minute or 4 hour window for a coin other than BTC, ETH, SOL and XRP, which is never offered, or a commodity up or down window on an account that does not have them enabled. |
no_price | No usable price for that side. Show “no price”. |
invalid_stake | The stake buys zero contracts; or, on a live account, a buy would send the market less than $1 once the platform fee and the venue fee reservation are taken out (at the standard platform fee, $1.10 clears this on every market); or a live cash out was sized with stake instead of contracts. |
stake_exceeds_stale_limit | The price is stale enough to cap the stake, or no book can be read for the contract. maxStake on the body is the cap. Re-quote at or under it. |
market_unavailable | Orders. The contract closed between quote and order, or it settles on a protocol Parity does not trade (detail: “This market is not available to trade yet.”). |
no_eligible_venue | No source is configured to execute this contract. A configuration problem: it does not resolve itself on the next tick. |
insufficient_position | The sell is larger than the position held. On the order path, for every account. On a live account it is also refused when the sell is quoted, counting contracts already promised to this player’s other cash outs in progress, and the body carries sellableContracts and minimumContracts. Size the exit in contracts from the position you read back. |
below_venue_minimum | Quotes, live accounts. The cash out is smaller than the market’s minimum sale (the market’s own minimum where it publishes one, otherwise 5 contracts). A whole position smaller than the minimum cannot be cashed out at all: it stays open and settles normally. The body carries sellableContracts and minimumContracts. |
insufficient_funds | The customer cannot back this order, and it is not the same refusal as insufficient_collateral below it. Nothing was sent to the venue and no collateral was committed. detail names what they hold and what the order needed. Raised only where Parity holds the wallet; if you hold your customers’ balances yourself, you will never see it and the check is yours to make. For those tenants it is a reserve: a placed order holds its stake until it fills, is rejected or is cancelled, so a customer with $120 who has $60 working may place $60 more and no more, whether the orders arrive together or hours apart. A rejection, a cancellation and the unfilled remainder of a partial fill all return it. If you hold your customers’ balances yourself, Parity keeps nothing to be short of and the check is yours: debit or reserve on your side, and do not treat the absence of this error as a reservation. |
insufficient_collateral | Your float at the venue is short, which is a different problem with a different fix: top it up. Do not collapse this and insufficient_funds into one branch, because one is your money and the other is your customer’s. If you trade from your own wallet and its trading authorisation has expired, you get trading_authorisation_expired instead, never this. |
trading_authorisation_expired | Orders, accounts that trade from their own wallet with a trading authorisation (a session key). The authorisation your wallet’s key gave Parity has expired, so no trade can be signed: buys and cash outs are both refused, and winnings wait in the wallet uncollected until it is renewed. Nothing was sent and no money moved; topping up does not help. Renew it with your wallet’s key through the renewal link Parity sends, and trading resumes at once. A retry of an order placed before the expiry still returns that order. Subscribe to wallet.authorisation_expiring to hear 14, 7 and 1 days ahead, and read GET /api/v1/status for the date. |
rejected | The execution layer refused. detail carries the reason. |
route_not_supported | Funding only. That asset and chain pair is not in the live catalogue. |
simulation_not_permitted | You sent executionIntent: "simulate" and your tenant’s execution mode does not allow it. The credential is fine and the request is understood: send executionIntent: "record_intent" instead, or have the ceiling raised. |
Swipe the table sideways for more columns.
429, 5xx
| Status | error | Meaning |
|---|---|---|
429 | rate_limited | Over the per-key allowance, or over the ceiling shared by every key your operator holds (the message says which). Retry-After is always set, and retryAfterSeconds carries the same figure on the body. |
500 | internal_error | An unhandled failure. Retry with backoff; report it if it persists. |
502 | bridge_unavailable | Funding only. The bridge could not be reached; nothing was recorded, so retry is safe. |
503 | trading_paused | Quotes and orders. The trading pause on your account is on: no new trades are taken, open positions are unaffected and settle normally. An order still waiting to be sent is not sent while the pause is on; where Parity sends your orders under your live operator policy it is withdrawn (status cancelled) and its hold released. An order already at a venue is not touched. Retry once the pause is lifted. |
503 | order_in_progress | Orders. This request started nothing: another request with the same clientOrderId is still being placed, or, with queued: true, Parity was too busy to start this one. Retry-After is set: send the same request again, with the same quoteId and clientOrderId, and it returns that order once it is recorded. Never re-quote or change the clientOrderId on this code. It is not counted as an error on the status page. |
503 | order_lane_unavailable | Quotes, live accounts. The service that sends live orders has not reported recently, for example during a restart. Nothing was quoted. Retry in a minute. |
503 | live_execution_unavailable | Quotes and orders. Live execution is unavailable for this account right now. Nothing was placed and no money moved. Retry later. |
503 | funding_unavailable | Funding only. No treasury destination configured. Not retryable without an operations change. |
503 | no_address_for_chain | Funding only. No deposit address could be issued on that chain. |
503 | embed_unavailable | Embed sessions are temporarily unavailable on our side. Nothing to fix in your request; retry later. |
503 | change_feed_unavailable | Events with updated_since only. The change feed is not available yet; retry shortly. |
503 | activity_feed_unavailable | Player activity only. The feed is not available yet; retry shortly. |
503 | stream_capacity | The price stream is at its live-connection limit for this instance. Retry-After says when to come back. |
Swipe the table sideways for more columns.
A failed bridge poll is not an error
Reading a deposit while the bridge is unreachable returns 200 with the stored lifecycle and a syncError field, not a 502. The state may be stale; the money is not gone, and a status screen should say so.
Embed-session and price-stream codes
A request made with an embed session (Authorization: Embed <token>) on the embed surface, or on GET /api/v1/stream/prices when a session is presented, is refused with one of these. The embed-session mint itself adds two 422s, and the two model codes are 403.
| Status | error | Meaning |
|---|---|---|
401 | missing_session | No session. A Bearer API key sent here gets this too, with a message saying so: an API key is not a credential for the browser surface. |
401 | token_in_query | The token was sent as ?token=. Send it in the header. |
401 | malformed_token | Not the shape of a session token. |
401 | invalid_token | The token does not verify. |
401 | unknown_session | No such session. |
401 | session_expired | The session is past expiresAt. Mint a new one. |
401 | session_revoked | The session was ended. |
403 | origin_mismatch | The browser Origin is not the returnOrigin the session was minted for. |
403 | operator_suspended | The operator is not active. |
403 | user_suspended | You suspended this customer. |
429 | rate_limited | Over the per-session limit or the operator ceiling. Retry-After is set and retryAfterSeconds is on the body. |
503 | signing_unavailable | Sessions are temporarily unavailable on our side; retry later. |
Swipe the table sideways for more columns.
A malformed cursor is refused on every feed
Every paged feed answers a cursor it cannot decode with 400 invalid_cursor: /api/v1/events, /api/v1/orders, /api/v1/positions, /api/v1/settlements, both player activity feeds, /api/v1/reconciliation/feed and the sandbox GET /api/v1/users/{id}/ledger. One rule, one code, one status.
So a consumer that stored a truncated cursor gets a 400 instead of silently re-reading its whole history.
A cursor naming a row that has gone is not the same thing
On /api/v1/orders, /api/v1/positions and the ledger read, a cursor that decodes cleanly but names a row that has since been removed from the result still yields the first page, because an empty page would look like the end of the feed.
So key every credit on the record's own id rather than on having advanced, and treat an unexpectedly full first page after a resume as a signal rather than as a busy night.
Rate-limit headers are not on every response
The gate produces RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset on every request it authorises, and most routes pass them back. These answer without them:
- Every
400from/api/v1/events, and every500 internal_error. - Every error a funding route returns after the key gate, and every response from the sandbox controls.
- Every
403 sandbox_only,404 unknown_user,404 unknown_positionand404 unknown_deposit.
Do not assume a header on every reply. Read them where they arrive, keep your own count, and treat a 429 as the authoritative signal. Every 429 carries Retry-After and the same figure as retryAfterSeconds on the body.
Codes this API does not return
Listed because most payments APIs have them, so you know not to expect them here.
| Code | Status |
|---|---|
422 insufficient_balance | Not returned, and never will be. You own your customers' cash ledger. Parity holds no player funds and has no balance of theirs to check against. Reserve on your own wallet before quoting; a stake is refused here for price, freshness and eligibility only. |
Idempotency-Key | Idempotency is keyed on clientOrderId rather than on a header, and a replay of the same id is a 200 rather than a conflict. A clientOrderId reused for a different order is 409 idempotency_conflict, which is listed with the other 409s above. |
503 venue_unavailable | Not returned. An unreachable source surfaces as 409 price_stale, 409 price_unverified, 409 reconciliation_required or 422 no_eligible_venue. /api/health returns 503 only when the database is down. |
Swipe the table sideways for more columns.
A retry policy that works
// Branch on the class of failure, not on the status code alone.
const CREDENTIALS = new Set([
'missing_credentials', 'invalid_key', 'revoked_key', 'insufficient_scope',
'operator_suspended', 'operator_archived', 'operator_not_permitted', 'mode_mismatch',
]);
function classify(status: number, error: string) {
if (error === 'reconciliation_required') return 'hold'; // do NOT release, do NOT re-quote
if (status === 409) return 'requote'; // price moved or quote spent
if (status === 429 || status >= 500) return 'backoff';
if (status === 401 || CREDENTIALS.has(error)) return 'credentials';
if (status === 403) return 'refused'; // a business refusal: keep the key
return 'fix'; // 400 and 422: retrying changes nothing
}- hold: keep the authorization, poll
GET /api/v1/orders/{id}and act only whensettlementStateissettled. If you never received anorderId, find it withGET /api/v1/orders?externalUserId=&clientOrderId=. - requote: start a new quote. Show the player the new price before submitting.
- backoff: exponential, with jitter. For an order, resubmit with the same
clientOrderId, so the retry is safe. - credentials: read
requiredon aninsufficient_scopeand issue a key that carries it. Waiting fixes nothing. Only these codes are about the key or the account; a 403 is not always one of them. - refused: a business refusal with a correct key, such as
cash_out_paused,over_wager_limit,market_not_offeredoruser_suspended. Show the customer themessageand do not touch the key. Every refusal carriesmessage. - fix: never retry unchanged. A
422retried in a loop is a loop.
The SDK raises these as typed errors, already classified. ReconciliationRequiredError carries holdAuthorization: true, RateLimitError carries retryAfterSeconds, InsufficientScopeError carries required, and QuoteAlreadyUsedError carries the colliding orderId. See the SDK.
Rate limits
The limiter runs on every authenticated /api/v1 route, and most responses carry the key's current window on three headers (the exceptions are listed above). It is documented in full on Rate limits. Read it before you write a polling loop: a second limit covers all your keys together, and the headers do not report it.