Reference
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. It is the one that fails cheapest, because everything it surfaces costs 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 is not a lesser environment
It is the same pipeline, the same tables and the same code, with the fill produced locally and the tenant flagged. Everything you prove there about idempotency, recovery, settlement and error handling transfers unchanged.
What to prove before you swap the key
Every one of these is reachable in the sandbox. Run them there.
Pricing and display
- Render the quote's
executionPriceon every ticket. No surface anywhere renders 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. - Carry prices at the precision you received them. No rounding to whole cents anywhere in the path from response to 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 + venueFee. Exactly, not to a tolerance. - Release the non-zero
releaseAmounta partial fill returns. Debiting the full stake keeps money that is not yours to keep. - 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. No branch anywhere releases on it, and no branch re-quotes 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, and prove you are reading it from the single-order route. The list route does not carry it, and a branch comparingundefinedto"pending"releases a hold it must keep. - 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, fee included, 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. Two things it will not tell you: the quote and order routes answer without the headers, and a second per-tenant ceiling counts every key you hold together and is not reported on any header. Keep a retry path rather than a purely predictive one. - Store keys in a secret manager and rehearse the rotation path.
- Narrow scopes per credential. A read-only integration key does not carry
orders:write.
What is agreed with people, not in code
Part of a launch is a conversation rather than a contract shape. Settle these per deployment, 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. That shape is identical in the sandbox, which is why what you build there is what you run.
What changes when the key changes
- Sandbox keys are minted
pk_test_and live keyssk_live_. Mode is a property of the operator record, so no header or parameter moves a caller across the boundary. - The balance, ledger, funding and sandbox test-control routes answer
403 sandbox_onlyfor a live tenant. They model a Parity-held balance, which is the wrong model for a live operator: your own wallet is the authority on what a player may stake. - Every other route behaves identically in both modes, against the same tables and the same code. What differs is what happens after an order is cleared to execute: see below.
simulatedis on every quote, order and settlement payload, and tells you whether a fill was produced locally.
Ask what is armed before you point real customers at it
A sandbox order produces a fill immediately. A live order does not: it is recorded, reserved against, and cleared to execute, and it is transmitted to a venue only when venue execution is enabled for your deployment and that specific order has been armed. Arming is a deliberate per-order act, not something an order acquires by being placed. Until both are true the order sits at pending_venue_execution with transmissionState: not_transmitted.
Nothing is lost there: no order was sent, the order is still cancellable, and its release instruction is exact. But it is not a state that clears on its own, and it is the one thing about live mode that your sandbox run cannot show you. Confirm with Parity what venue execution is enabled for your deployment as part of this checklist, in writing, before the key changes.
The mechanics of each of those live on Environments.

