Going live
The route from a sandbox key to a live one: what to prove, what to agree, and what changes when the tenant switches.
The sequence
Work in this order, so problems cost a test run rather than a customer's money.
- Build the whole flow against the sandbox: quote, reserve, order, position, exit, settlement.
- Trigger every failure mode on the Errors page deliberately and handle each one, including killing your own process mid-order and recovering it by
clientOrderId. - Run a settlement consumer through a full cycle, void included, and prove it is safe to run twice.
- Reconcile a period and prove it balances.
- Agree the commercial terms below.
- Swap the key.
The sandbox runs the production pipeline
Same pipeline, tables and code, with the fill produced locally: at once for a simulated order, and when you confirm the reserve for a recorded intent. What you prove there about idempotency, recovery, settlement and errors holds in production. One event cannot be rehearsed there: order.completed comes from the live venue closing an order, so no sandbox order emits it.
What to prove before you swap the key
Every one of these is reachable in the sandbox. Run them there.
Pricing and display
- Show the quote's
executionPriceon every ticket. Never show a reference probability as a price. - Where no executable price is published, show no price and disable the controls. Never fall back to the reference.
- Read
priceBasis. Display areference-basis quote as an estimate, or not at all. - Keep prices at the precision you received. Do not round to whole cents anywhere before display.
Money
- Act on
operatorMoneyandoperatorExitMoney, never on the float fields beside them. Parse amounts as decimal strings and never through a float. - Assert both identities before posting:
authorizationAmount = actualDebit + releaseAmountandactualDebit = tradeAmount + platformFee + operatorFee + venueFee, exactly. - Release the non-zero
releaseAmounta partial fill returns, and on a live buy the unused part of the venue fee reservation, which can come back even on a full fill. Debiting the full stake keeps the customer's money. - Credit
sellProceedson a sell and never debit. A nulloperatorMoneyis not a reason to fall back to the entry shape. - Reserve the stake on your wallet before the quote, not after the order.
Orders and recovery
- Derive every
clientOrderIdfrom the reservation in your own ledger, and reuse it on every retry. - Hold the authorization on
409 reconciliation_requiredand poll. Never release or re-quote on it. - Exercise the recovery path: kill the process mid-order, find the order again with
GET /api/v1/orders?externalUserId=&clientOrderId=, then read thatorderIdback withGET /api/v1/orders/{id}. - Switch your wallet on
settlementState, not onstatus. The list and the single-order routes carry the same value. Do not act on a row without it: treating a missing field as"settled"releases a hold you must keep. - Handle the refusals that depend on your configuration rather than the market:
over_wager_limitandover_period_limit(the limits you set per account or per player),over_tenant_exposure(waitretryAfterMs),market_not_offered, andstake_exceeds_stale_limit, which caps the stake on an aging or stale price and names the largest stake it would take inmaxStake. - Handle the live-account refusals:
503 trading_paused(your trading pause),503 order_lane_unavailableand503 live_execution_unavailable(wait and retry), on a buy too small to send the market $1 after fees422 invalid_stake($1.10 always clears it at the standard platform fee), and on a cash out422 below_venue_minimum,422 insufficient_position(offersellableContracts) and403 sell_not_available. Treat an order withdrawn before sending (statuscancelled, for example over a live cap) like any other cancellation: apply its release. - If you serve players in more than one jurisdiction, send each player's country with
PUT /api/v1/users/{id}/jurisdiction(or in the embed session) before their first quote. Where jurisdiction enforcement is active for your account, a player with no asserted country is refused. - Re-quote and re-confirm with the player on a
409. Never retry a422unchanged. - Handle
partially_filled.filledQuantity, not the quote'scontracts, is what the player holds.
Settlement and operations
- Key the settlement consumer on the settlement
idorpositionId, advance its cursor only after a successful credit, and make it safe to run twice. - Credit a void from
voidCredit(a refund with the fee included, or a split payout with the fee kept), and run a full settlement cycle including a void end to end. - Read
GET /api/v1/reconciliationon a nightly close and alert on anycriticalfinding. - Read
simulatedand surface it somewhere your operations team can see it. - Back off with jitter on
429and5xx, and readRateLimit-Remainingwherever it arrives. No header reports the per-tenant ceiling across all your keys, so keep a retry path. - Store keys in a secret manager and rehearse the rotation path.
- If you use webhooks, register every endpoint, verify a signed delivery end to end, and rehearse a signing-secret rotation: it replaces the old secret at once. Keep polling the reconciliation feed regardless.
- Narrow scopes per credential. A read-only integration key does not carry
orders:write.
What we need from you, and what you receive
Both lists, with the reason for each item, are in the Partner onboarding checklist, the last section of the Parity Integration Packet. In short, Parity needs your tenant name, jurisdictions, the markets to offer, commercial terms, display currency and language, account limits, the origins that will frame the embed and its look, your webhook endpoints and events, the keys and scopes you want, the people who need account access, and your technical contacts. You receive a sandbox tenant and host, a test key and later a live key (each shown once), a signing secret per webhook endpoint (shown once), the embed URL, account access for your team, and this documentation.
What is agreed with people, not in code
Agree these for your account before the key changes: the custody structure, including per-user versus omnibus accounts; the regulatory perimeter you operate inside; how KYC and AML responsibility divides between you and Parity; and the commercial terms.
Parity holds no player funds, and that does not change at launch
You own your customers' cash ledger. Parity returns exact instructions against it, authorizationAmount, actualDebit, releaseAmount, sellProceeds, settlementCredit and voidCredit, and never a balance of theirs. It works the same way in the sandbox.
What changes when the key changes
You integrate against a sandbox tenant. Once the contract is signed, the readiness checks have no blocking item and the terms are agreed, Parity creates your live tenant, a separate account, and you then receive sk_live_ keys for it. At go-live Parity also enables live execution for your account, confirms the collateral arrangement where Parity executes for you, and sets the live policy caps on your tenant. From then on Parity sends every confirmed order automatically, inside those caps; no one at Parity handles your orders one by one.
- From 2 November new markets trade on the venue's newer protocol, which is open only to tenants Parity has listed for it on every one of its services. Parity lists your tenant at go-live and runs a go-live preflight against it on each service; any red line stops the switch.
- The live tenant has its own slug, so the
operator=value in your iframe URL changes, and its own keys, webhook endpoints and signing secrets. Players and their history stay on the sandbox: each player is created on the live tenant the first time you send their id. Parity sends you every new value when it creates the live tenant. - Sandbox keys start
pk_test_and live keyssk_live_. The mode is stored on the operator record, so no header or parameter can cross it. - The balance, ledger, funding and sandbox test-control routes answer
403 sandbox_onlyfor a live tenant, because they model a Parity-held balance; your wallet decides what a player may stake. - Every other route behaves identically in both modes, against the same tables and the same code, with three exceptions. A live cash out is checked when it is quoted (sized in contracts, on the hundredth-of-a-contract grid, at least the market's minimum and no more than is free to sell). A live buy's quote reserves the venue's own fee inside the stake. And a live buy must send the market at least $1 once both fees are out. Otherwise only what happens after an order is cleared to execute differs: see below.
simulatedis on every quote, order and settlement payload, and tells you whether a fill was produced locally.
How a confirmed live order is sent
A sandbox order fills as soon as it may: at once when simulated, and in the confirm-reserve call when it is a recorded intent. A live order is recorded, reserved against and confirmed, and then waits at pending_venue_execution with transmissionState: not_transmitted until Parity's order lane sends it to the market, normally within a few seconds and always inside your live caps.
An order the lane may not send is withdrawn, not left waiting: a cap would be exceeded, trading is paused, or the order has waited longer than the lane allows (five minutes by default). It ends cancelled, nothing reached the market, and you receive order.cancelled with the exact releaseAmount to hand back. The sandbox never shows that wait or that withdrawal, so build for both: hold the authorization until the order is filled or cancelled, and apply what the order states.
Details are on Environments.