API reference
Every endpoint, in one place, checked against what the build actually serves.
Import the API into Postman. The environment holds the variables to fill in: your host, your sandbox key and a test player id.
Postman collectionSandbox environmentTwo surfaces
| Surface | Auth | What it is for |
|---|---|---|
/api/v1/* | Operator key + scope | The partner contract. Opaque contract ids, exact money, keyset cursors, no venue named anywhere. |
/api/* | None | The public catalogue and the public demo. It powers a page anyone can open; it is not a contract. |
Swipe the table sideways for more columns.
They are separate routes with separate rules: the public surface takes no auth so the demo works, and the partner surface requires it so only you can place your orders.
Authorization: Bearer pk_test_... # or sk_live_... in production
X-Parity-User: your-own-player-id # on every quote and order
Content-Type: application/jsonA machine-readable OpenAPI 3.1 document covering every path on this page is at /openapi.json.
One page per endpoint
Each endpoint has its own page with every header, parameter and body field typed, and a sample request and responses beside it. The pages are generated from the same OpenAPI document, so they always match what is served.
Catalogue
Trading
- POSTCreate quotePrice a trade, and hold that price
- GETList ordersOrder history, newest first
- POSTSubmit orderSpend a quote. Idempotent on clientOrderId
- GETGet orderRead one order back. THE RECOVERY PATH
- GETGet trade confirmationThe trade confirmation for one order
- POSTConfirm order reserveConfirm the customer’s funds are held. The order becomes executable
- POSTCancel orderWithdraw an order that was never transmitted. Returns a release instruction
Settlement
Reconciliation
Account
Embed
Sandbox
- GETGet sandbox balanceA Parity-held balance. SANDBOX ONLY
- GETList sandbox movementsThe statement behind that balance. SANDBOX ONLY
- GETList sandbox scenariosWhat you have armed. SANDBOX ONLY
- POSTArm sandbox scenarioArm a deterministic partial fill for your next order. SANDBOX ONLY
- POSTResolve sandbox positionSettle one of your positions on demand. SANDBOX ONLY
- GETList supported assetsFundable asset/chain pairs, read live. SANDBOX ONLY
- POSTCreate deposit addressOpen a funding route for one customer. SANDBOX ONLY
- GETGet depositWhere one deposit has got to. SANDBOX ONLY
Users
- GETGet user wager limitsOne customer's wager limits, and what actually applies
- PUTSet user wager limitsSet one customer's wager limits
- PATCHUpdate user wager limitsChange some of one customer's wager limits, keeping the rest
- DELClear user wager limitsClear one customer's account-rung limits
- GETGet user statusOne customer's status: active, or suspended and why
- PUTSet user statusSuspend, self-exclude or reinstate one customer
- GETGet user statementOne customer's statement for a period, live or sandbox
- GETGet user jurisdictionWhat you told us, and what we observed
- PUTAssert user jurisdictionState where one of your customers is
Status
Players
Catalogue
markets:read. category, sport, league, sort, dir, search, tradable, closesAfter, closesBefore, limit (1 to 100, default 25), locale (en, es, pt, hr), cursor. An unrecognised filter value is a 400, not a silently unfiltered catalogue.{id} is an event id or its slug. Optional locale. Scope markets:read.?category= accepts, with live event counts. Scope markets:read.{id} is the event id. Unauthenticated, because it is a URL a browser loads from an <img> tag.?contracts= is a comma-separated list of opaque ctr_… ids. No API key ever, because a browser cannot hold one. Every frame is normalised, names no venue and is not user-specific. An embed session token in Authorization: Embed <token> is optional and decides one thing: whose offering policy filters the feed before delivery. A token that is presented and refused closes the connection rather than downgrading it to anonymous. One connection per page; Parity multiplexes the venue side, so a thousand viewers of one contract cost one upstream subscription. Never render a price without reading tradeable.Embed
markets:read, quotes:write and orders:write together, because a session can browse, quote and order, so the key that mints one must be able to do all three itself. Body: externalUserId (required), returnOrigin, ttlSeconds (60 to 3600, default 900), locale, region, jurisdiction (country and optional subdivision, recorded against the customer) and theme. Unknown fields are refused. The token is returned once. Send it as Authorization: Embed <token>; a token in a query string is refused outright. Full walkthrough on Parity Embed.Trading
quotes:write. Exactly one of stake (sizes a buy) or contracts (sizes a sell). Requires X-Parity-User.orders:write. Idempotent on clientOrderId: 201 on creation, 200 with idempotentReplay: true on a replay. Requires X-Parity-User.orders:read. externalUserId, clientOrderId (with externalUserId), status, since, until, limit (1-200, default 50), cursor. Returns orders, count, nextCursor and hasMore. Each order carries settlementState and transmissionState, from the same serializer as the single-order read; a clientOrderId lookup also carries intent, which paged results omit. ?status= is not validated, so an unknown value returns an empty page rather than a 400. An unreadable since or until is 400 invalid_date. Each order carries descriptor, what was traded, as the webhooks carry it.settlementState and transmissionState. Scope orders:read. ?fills=true includes the individual executions, and that exact spelling is what is matched: ?fills=1 and ?fills=TRUE do not enable it. It also carries the order's intent and descriptor.orders:read. An order that traded nothing is 409 not_executed.orders:write. Idempotent: the same call twice yields one executable order and a 200, never a conflict. Until it is made, a recorded order is reserve_pending and cannot execute.orders:write. Issued exactly once: a second call replays the same cancellationId and the same releaseAmount. Refused with 409 for any order whose transmissionState is not not_transmitted.Positions
Settlement and reconciliation
settlements:read. externalUserId, outcome, settledFrom, settledTo, limit (1-500, default 100), cursor. Each settlement carries descriptor.settledAt. Superseded by /api/v1/settlements, which its own response says in supersededBy: this one pages with no tiebreaker, and settlements written in one transaction share a timestamp exactly.ledger:read. Optional from.ledger:read. cursor, type (repeatable), externalUserId, limit (1-500, default 100).apiKeyId and carries your note. ledger:read or orders:read. since, until, limit (1-500), cursor, and format=csv.Customers
orders:write. Body: country (ISO 3166-1 alpha-2, required) and optionally subdivision (the part of an ISO 3166-2 code after the hyphen, or null for country level). You ran the KYC and hold the licence, so the assertion is yours; Parity does not authenticate your end users and does not geolocate them. It takes effect once jurisdiction enforcement is enabled for your account, so you can populate assertions first and enforce after. A country that is not two letters is 400 invalid_jurisdiction.orders:read or orders:write. The reply names its unit: currency, and unit: "minor". Returns three objects: account (what you set on this customer), operator(the ceiling over every account you hold) and effective (what the quote and order seams will enforce, with the rung that decided each figure named). Read effective. The account rung can only ever tighten the operator rung, never loosen it, so an account ceiling set above the operator ceiling has no effect at all, and a caller reading only its own write would believe it had raised a limit it had not raised.orders:write. A PUT replaces the whole record: a field you leave out is cleared. Use PATCH to change one field. Body: maxWagerMinor caps one wager; periodStakeMinor with periodHours caps total stake across a rolling window. The pair travels together, because a stake ceiling with no window is not a rule anybody can enforce and a window with no ceiling bounds nothing, so the half-written form is 400 invalid_request. Amounts are exact integers of minor units. Send null at a field to withdraw the opinion at this rung. The reply is the same shape as the GET.null removes that one field. A change that would leave half a period limit is 400 incomplete_period_limit and changes nothing. Same scopes as the PUT.effective: a 200 here does not mean the customer is now unlimited. Scope orders:write. Every limit write is recorded in your audit trail with the API key that sent it.status (active or suspended), optionally reason (self_exclusion, cool_off, responsible_gambling, fraud, chargeback, operator_request, other) and note. A suspended customer can open nothing new on any path (403 user_suspended); their open positions settle as usual. Scope orders:write. Audited with the key that sent it.canTrade. Same read scopes as the limits.from (inclusive) and to (exclusive), at most 366 days, UTC; format=csv. Any of ledger:read, orders:read or settlements:read.markets:read.Limits and jurisdiction work in live mode
They work in live mode, with status and the statement. The balance and movement reads below are gated to sandbox tenants; limits, status and jurisdiction assertions are production machinery.
Setting a limit, end to end
PUT /api/v1/users/player-8421/limits
{
"maxWagerMinor": 5000, // $50.00 per wager
"periodStakeMinor": 20000, // $200.00...
"periodHours": 24, // ...per rolling 24 hours. Sent as a pair
"note": "player-set daily limit" // audit only, never shown to the player
}{
"externalUserId": "player-8421",
"currency": "USD",
"unit": "minor", // every figure is in cents
"account": { "maxWagerMinor": 5000, "periodStakeMinor": 20000, "periodHours": 24 },
"operator": { "maxWagerMinor": 50000, "periodStakeMinor": null, "periodHours": null },
"effective": {
"maxWagerMinor": 5000,
"maxWagerRung": "account", // which rung decided it
"periods": [ { "stakeMinor": 20000, "hours": 24, "rung": "account" } ]
}
}| Field | Type | Meaning |
|---|---|---|
maxWagerMinor | integer 1 to 1,000,000,000, or null | Ceiling on one wager, in minor units (cents). null withdraws the opinion at this rung. |
periodStakeMinor | integer 1 to 1,000,000,000, or null | Ceiling on total stake across periodHours. Must be sent with periodHours. |
periodHours | integer 1 to 8760, or null | The rolling window in whole hours, at most a year. |
note | string up to 500, or null | Why, for the audit trail. |
effective | object | What quotes and orders enforce: the strictest single-wager ceiling and its rung, and every window ceiling in force (all must hold). A refusal against it is over_wager_limit (with maxStake) or over_period_limit. |
Swipe the table sideways for more columns.
Jurisdiction and geo, precisely
PUT /api/v1/users/player-8421/jurisdiction
{ "country": "MT", "subdivision": null }{
"userId": "player-8421",
"jurisdiction": { "country": "MT", "subdivision": null },
"assertedAt": "2026-08-21T04:43:40.301Z",
"assertedSource": "api", // api | embed_session
"observedCountry": "MT", // from the player's own address, as evidence
"observedAt": "2026-08-21T05:10:02.114Z",
"mismatch": false // null when either half is missing
}- Asserted is what you tell Parity, on this route or as
jurisdictionon an embed session. Only this decides access. - Observed is the country of the player's browser address. It is evidence only and never grants or refuses access, since travel, a VPN or a mobile carrier can show a foreign address.
mismatchcompares the two. - Nothing is enforced until your jurisdiction mode is set to enforced (a Parity-side setting on your tenant). Then a customer with no asserted country, or one whose country your rules do not permit, is refused at quote and order, the embed shows a not-available panel, and
GET /api/v1/eventscarries a top-leveljurisdictionnote because it names no customer. Populate assertions first, readmismatchrates, then enforce.
Sandbox only
Every path in this section answers 403 sandbox_only in live mode
They model a per-user balance held by Parity, for learning the integration with simulated money. A live operator owns its customers' cash ledger, so there is nothing here for it. The live contract is operatorMoney, operatorExitMoney and settlementCredit.
ledger:read. Optional currency.ledger:read. limit (1 to 200, default 50, clamped), cursor.funding:write. symbol, symbols, chainId.funding:write. 201 on success.funding:write. ?sync=false skips the bridge poll.orders:write; GET lists what is armed under orders:read, and ?disarm=<scenarioId> removes one. It drives the real order code rather than a simulation of it. A scenario fires once and expires after an hour. See Sandbox.WIN, LOSS or VOID, relative to the position's own side. Scope settlements:read. It names a position, never a market, because resolving a market would settle every other operator's positions on it. Asking twice is idempotent; asking for a different resolution is 409 resolution_conflict.Public: no credentials
These serve the public site and demo. They are not the partner contract: they have no operator scoping, and the keyless ones may change shape. They name contracts by the same opaque ctr_… id /api/v1 uses, and they never name a liquidity pool.
/api/eventsNo auth/api/events/{key}API keyrange is 1d, 1w, 1m or all. Needs a key with markets:read: it is addressed by an internal grouping key and has no first-party reader, so it is not a public surface any more. Use GET /api/v1/events/{id}./api/marketsNo auth/api/markets/{id}No auth/api/markets/quotes?ids=…No auth/api/healthNo auth503 only when the database is down./api/demo/quotesNo auth/api/demo/ordersNo authDo not integrate against /api/demo/* or /api/*
The demo runs the production path, but it is unauthenticated, uses its own identity model and is not a contract. The public catalogue is likewise a website feed: partners read /api/v1/events.
Conventions that hold everywhere
- Auth.
Authorization: Bearer <key>on every/api/v1/*request except/api/v1/images/{id}and/api/v1/stream/prices. Scope is checked before the rate limit, so a scope mistake never shows up as a429. - Identity.
X-Parity-Usercarries your id for the player. Parity never authenticates end users and stores only that opaque value. A write path creates a user on first use; a read never does. - Idempotency.
clientOrderIdon orders, enforced by a unique index on (operator, user, clientOrderId). After a timeout, retry. - Money. Exact decimal strings inside
operatorMoney,operatorExitMoneyand a settlement. Numbers elsewhere are for display. Contract prices are 0-1, and sub-cent prices are real. - Cursors. Keyset, not offset. Stop on
hasMore: false. OnGET /api/v1/settlementsandGET /api/v1/reconciliation/feedthenextCursorstays set on the last page, as a watermark to poll with later, so a loop onnextCursoralone never ends there. Every paged feed refuses a malformed cursor with400 invalid_cursorrather than restarting at page one. A cursor that decodes cleanly and names a row that has since gone is a different case, and three feeds still answer it with page one. See Errors. - Errors. A JSON body with a machine-readable
error. Branch on the code, never on the message. - Rate limits. Two per-minute counters: one per key, one per operator across every key it holds.
RateLimit-Limit,RateLimit-RemainingandRateLimit-Resetreport the key and are on most responses, not all. See Rate limits. - Timestamps. ISO-8601, UTC, always as strings.
- Sourcing. A contract is a
ctr_…id, and no response names a venue. The deprecatedGET /api/v1/settlements/positionspublishescontractIdinstead of thevenueListingIdit once carried, and webhook payloads follow the same rule.
Scopes
| Scope | Reaches |
|---|---|
markets:read | events, events/{id}, categories, GET users/{id}/jurisdiction |
quotes:write | quotes |
orders:write | POST orders, POST orders/{id}/confirm-reserve, POST orders/{id}/cancel, PUT users/{id}/jurisdiction, users/{id}/limits and users/{id}/status (every method), POST embed-sessions (which also needs markets:read and quotes:write on the same key), and both sandbox controls |
orders:read | GET orders, orders/{id}, orders/{id}/confirmation, the reads of users/{id}/limits and users/{id}/status, users/{id}/statement, audit, and the sandbox scenario list |
positions:read | positions, positions/{id} |
settlements:read | settlements, settlements/positions, users/{id}/statement, and the sandbox resolution control |
ledger:read | reconciliation, reconciliation/feed, users/{id}/statement, audit, and the sandbox balance and ledger |
funding:write | all three funding routes, including the two reads |
players:read | players/activity and players/{id}/activity, minted on request only |
Swipe the table sideways for more columns.