Skip to Content
Error codes

Error codes

Every error response carries the envelope that the Getting started page describes. The error field is one of the codes below. We regenerate the table from our error catalog at every build. It lists the codes that an operator can observe.

Branch on the code, not on the message text. We never rename a code and we never change its meaning. We can add new codes without notice. If you receive a code that you do not know, act on the HTTP status class of the response.

The source field is an opaque value. Do not try to decode it. Quote it with the request_id in a support request.

Some codes carry a value in details that tells you which case fired: reason for market_suspended and limit_type for stake_limit_exceeded. The table lists the values under each code. These sets are open: we can add a value without a new API version. If you receive a value that you do not know, act on the code and its HTTP status alone, and do not fail the request handling.

Three codes belong to the player’s currency and its conversion (Accounts in TRY, USD or GBP). currency_mismatch (400) carries details.currency: the player’s currency, or your account’s for a user you have not synced yet. A user sync answers it too, for a code other than the one the player already has. fx_rate_out_of_band (409) carries details.fx_rate, details.reference_rate and details.band_bps: the rate you sent, our reference rate and the band in basis points. fx_rate_unavailable (503) has no details and comes with a Retry-After header. A close, a settlement and a void never return any of the three.

A code with widget in the Status column never appears in an HTTP response. It is a state of the widget in the browser. We list it so that you can understand the widget states that your end users report.

StatusCodeWhen it firesRetry and action
400validation_failedThe request body or query is malformed. On the position routes it also fires for an unknown market or outcome (a market the tenant has not enabled reads as unknown), for a market that is not open, and for a request outside the trading window of the market. An open or an order also stops when the market's cutoff before its close begins; a close does not. A suspended market returns market_suspended instead. When partial closes are live, a partial close also gets it for a part that is not below the open stake (the full close sells everything), for a part that does not fit the minor units of the currency, and for a converted position whose remaining stake would be zero or less in the pool currency.No. Fix the request and send it again. In the widget the market may have moved, so read it again before the next try.
400idempotency_key_requiredA write request has no Idempotency-Key header.No. Add the Idempotency-Key header and send the request again.
400currency_mismatchThe currency of the request is not the player's currency, or, for a user you have not synced yet, not one your account takes. Nothing is applied.No. Send the currency in details.currency, the player's, or leave the currency field out. A player's currency never changes after its first sync.
401invalid_api_keyThe API key is unknown, revoked or expired. The response does not say which.No. Get a valid key first: rotate it in the tenant portal or ask the platform team for a new one. Then send the request with it.
401invalid_session_tokenThe widget session token is missing, malformed, expired or revoked. The response does not say which.Refresh the session with POST /v1/widget/sessions/refresh, then retry the request with the same Idempotency-Key. If the refresh fails with this code too, the host page mints a new session.
403insufficient_scopeThe API key does not carry the scope that the endpoint needs. It also fires when an anonymous widget session, minted for a visitor who has not logged in, calls a route that acts for a user. In the tenant portal it fires for an action that your role or your account's mode does not allow, for example hiding a market category on a self_funded account, whose own markets are hidden one by one. A widget session also gets it on a partial sale or the quote of a part while you have turned off partial sales in the widget; your API key can still sell a part.No. Get a key with the scope this endpoint needs, then retry. For an anonymous widget session, mint a session for the user once they log in and pass it to setSession. For a partial sale in the widget, turn partial sales on in the card studio first; the user can still sell the whole position.
403tenant_suspendedThe tenant is suspended. A suspension also revokes the API keys, so you usually see invalid_api_key instead.No. The suspension is contractual, not technical. Contact the platform team.
403user_blockedThe end user has status blocked. A blocked user cannot open a position and cannot place a limit order. Closing a position, quoting a close and cancelling an order still work.No. Lift the block with a user upsert (PUT /v1/users), then retry.
403user_restrictedThe end user is restricted from new positions on this market, or on every market, by the risk owner of the user's tenant: Predixum staff for a pooled tenant's user, the tenant itself for a self_funded tenant's user. It is not users.status: a user upsert neither sets nor lifts it. Closing a position, quoting a close and cancelling an order still work.No. Predixum staff or, for a self_funded tenant's user, the tenant lifts it; the operator's API cannot.
404not_foundThe resource id in the request does not exist.No. Check the id in the request.
404unknown_userThe external_user_id has not been registered with a user upsert.No. Register the user first with PUT /v1/users, then retry the original request.
409would_overdrawA debit would take the virtual balance of the user below zero. Nothing is applied.Only after the stake is lowered or the balance of the user changes.
409position_terminalA close was requested for a position that already settled or was voided, or a close quote for one that already settled, was voided or was closed. Nothing is applied. When partial closes are live, a partial close or its quote for a position that is no longer open fails the same way.No. The position is already over, and a retry does not change that. A single closed position has no correction flow.
409price_movedThe market price moved past the limit in the request. An open fails above max_price and a close fails below min_price. Nothing is applied. In the widget the tenant's price change setting decides the max_price it sends: none refuses any rise from the quote, small allows the usual small move, and any sends no max_price, so an open from the widget then never gets this code. When partial closes are live, a partial close fails below its min_price too.Quote again from the current price and confirm again. A new open is a new intent with a new Idempotency-Key and a new max_price; a new close carries a new min_price.
409market_suspendedThe market exists but is suspended. It can reopen. Opening, closing and quoting a position and placing a limit order fail while it is suspended. The same code also comes back when the market is suspended for your account only, after the risk limit of your own pool on it was reached: opening a position and placing a limit order fail and your resting limit orders do not fill, but closing a position works, and other operators trade the market as before. A self-funded account's own pool is suspended this way, and your owner or admin lifts it from the tenant portal (POST /portal/v1/markets/{id}/risk-suspension/clear); our staff cannot lift it. A pooled account trades in the market's shared pool, which our staff hold when its price moves too fast or its use passes a set share of its limit: opening a position and placing a limit order then fail for every pooled account on the market, closing works, and our staff lift it. details.reason says why: utilization or price_spike. When partial closes are live, a partial close follows the rules of a close here.

Values of details.reason today, an open set: utilization, price_spike

Yes, once the market reopens. The lifecycle events and the Market Feed tell you when it does. A suspension for your account only lasts until your owner or admin lifts it from the tenant portal.
409stake_limit_exceededThe stake is above the per-position cap of the market, it would take the total open stake of the user on the market above the per-user cap, or it would take what the user is paid on the outcome above the pool's payout cap (limit_type max_payout_per_user). Nothing is applied. details.remaining is the stake that still fits for every limit_type. On max_payout_per_user, details.limit is the payout cap, details.payout_room is the cap minus the payout the user already holds on the outcome, and details.max_stake is the largest stake that pays within that room at its own execution price, equal to remaining; when we cannot price it, max_stake is left out and remaining is an estimate.

Values of details.limit_type today, an open set: per_position, per_user_per_market, max_payout_per_user

Only with a lower stake: details.remaining or less, which opens on the first try while the price stands; it is already cut to your currency's minor units. A remaining of 0 means no stake fits now. The per-user allowance frees again at settlement, at a void, or when the user closes a position on that market. Without max_stake on a max_payout_per_user refusal, remaining is an estimate and a smaller stake may still be needed.
409stake_below_minimumThe stake is below the per-position minimum of the market. Nothing is applied. details.limit is that minimum in the currency of the call, raised to its minor units, so a stake of details.limit opens on the first try while the rate stands. The market detail of the feed serves the minimum in stake_limits, in the account's currency. When partial closes are live, a partial close also gets it when the part sold or the part left would be below that minimum, with details.limit in the position's currency.Only with a higher stake. Raise it to details.limit or more, which is the minimum in your call's currency. For a partial close, sell a part that leaves at least the minimum, or close the whole position.
409tenant_exposure_limitThe open would take the model worst-case loss of your positions on this market above the market's limit. Nothing is applied. Closing a position is never refused for this reason.Only with a lower stake, or later: the allowance grows when positions on this market close or when the price moves.
409price_impact_exceededThe open would move the outcome's price by more than this market allows in one trade. Nothing is applied. details.max_stake is the largest stake that fits now; a close is never refused for this reason. The widget's price change setting does not change it: with the setting any, an open that moves the price past the cap still fails.Only with a lower stake: send details.max_stake or less. A max_stake of 0 means no stake fits until the price moves.
409tenant_limit_reachedNot returned today. Your monthly loss cap and your credit limit only warn: when your account goes above one, an alert is raised and trading goes on. If a limit stops trades again, this is the code that opening a position and placing a limit order fail with, and your resting limit orders do not fill; closing a position, quoting a close and cancelling an order still work.Not returned today. If a limit stops trades again, retry after the hold clears: a monthly loss cap hold at the start of the next month, a credit limit hold when your open balance is back at or under the limit, and either when our staff clear it. Your portal dashboard shows the hold.
409fx_rate_out_of_bandThe fx_rate you sent is farther from our reference rate than the band of your account allows. Nothing is applied.Only with another rate. Send an fx_rate inside the band around details.reference_rate, or leave fx_rate out to use our reference rate.
409state_conflictA request to cancel a limit order found the order already filled, expired or rejected. When partial closes are live, a partial close also gets it when stake_before is no longer the open stake of the position, because another sale or a close changed it first. Nothing is applied.No. Read the resource again and decide on what it is now. For a partial close, read the position again and send its open stake as stake_before.
409report_limit_reachedThe tenant already has the maximum number of report jobs in status generating. No job is created.Yes, once one of your report jobs has left status generating. Poll GET /v1/reports/{id} or wait for the report.ready webhook; there is no Retry-After.
409saved_markets_limit_reachedThe end user already has the maximum number of saved markets, and the market in the request is not one of them. Nothing is saved. Saving a market that is already saved still succeeds.Only after the user removes a saved market with DELETE /v1/widget/saved-markets/{market_slug}. The widget does not retry on its own.
409idempotency_key_in_progressAn earlier request with the same Idempotency-Key is still being processed. Nothing is applied by this request. The response carries a Retry-After header.Yes. Wait for Retry-After and retry with the same Idempotency-Key and the same body. A new key would be a second intent and can open a second position.
409wallet_rejectedYour wallet refused the debit of the stake for a reason other than funds or a suspended player, such as a limit, a risk check or an expired session. Nothing is opened or placed and nothing is debited.

Values of details.wallet_status today, an open set: limit_reached, risk_rejected, invalid_session, unknown_player, currency_mismatch, debit_rejected

No. Your wallet gives the same answer to the same request. Resolve the refusal on your side, or change the stake, and send a new request.
413request_too_largeThe request body is larger than the size limit of the route.No. Make the body smaller or split the batch.
422idempotency_key_reusedThe Idempotency-Key was seen before with a different request body. Nothing is applied.No. A retry must send the original body byte for byte. A new intent needs a new key.
429rate_limitedThe tenant or the end user exceeded the rate limit of the route. The response carries a Retry-After header.Yes. Wait for Retry-After and send the same request with the same Idempotency-Key, so a retried write never applies twice.
500internal_errorAn unexpected failure on our side.Yes for a write that carries the same Idempotency-Key. If it keeps failing, send us the request_id and source.
503positions_pausedWe paused the opening of positions with a kill switch. When partial closes are live, the same switch also stops them.Yes, after we clear the pause. The widget shows a paused state meanwhile.
503feed_pausedWe paused the Market Feed reads with a kill switch.Yes, after we clear the pause.
503widget_pausedWe paused widget session mint, widget session refresh and the widget config read with a kill switch.Yes, after we clear the pause.
503market_not_readyThe market cannot take the trade right now: its state is still rebuilding after a restart on our side, or the market is busy, because other trades held its price lock for longer than the wait allows under load. Retry; the response carries a Retry-After header.Yes. Wait for Retry-After and send the same request with the same Idempotency-Key, so a retried open never applies twice.
503fx_rate_unavailableWe have no current exchange rate for the currency of your account, so a stake cannot be converted now. Nothing is applied. The response carries a Retry-After header.Yes. Wait for Retry-After and send the same request with the same Idempotency-Key. Closing a position still works meanwhile.
503wallet_unavailableTrading through your wallet is not possible right now: your wallet did not answer, it failed several debits in a row, or we paused it with a kill switch. Nothing is opened or placed, and a debit that may have been taken is rolled back. The response carries a Retry-After header, except with reason not_configured: this mode of your account has no wallet URL or wallet secret, so no bet is taken until you set both.

Values of details.reason today, an open set: paused, breaker_open, no_answer, not_configured

Yes. Wait for Retry-After and send the same request with the same Idempotency-Key. Closing a position and cancelling an order still work meanwhile.
504request_timeoutThe request ran past the 10 second limit, so we stopped waiting for it. The outcome is unknown: a write may still complete, or be rolled back, on our side. Retry with the same Idempotency-Key and body. The retry answers idempotency_key_in_progress until the first attempt settles, and then the stored result of that attempt.Yes. Send the same request with the same Idempotency-Key. Until the first attempt settles you get idempotency_key_in_progress; after that, its stored result. A new key would be a second intent.
widgetrealtime_unavailableThe widget used all its reconnect attempts and now runs on the polling fallback.Nothing to do. The widget keeps trying to reconnect in the background.
widgetwidget_session_expiredThe widget session token expired and the automatic refresh failed.No retry from your side. The widget refreshes the session on its own, and this state shows only when that refresh failed.
widgetwidget_config_invalidThe embed parameters failed the check at widget boot. The widget reports it to the browser console and shows nothing to the end user.No. Fix the embed parameters.
widgetwidget_runtime_errorA client-side exception the widget caught at its own boundaries. The widget reports it to us with its error beacon.No. The widget reports it to us, and there is nothing to retry.
Last updated on