Arm a deterministic partial fill for your next order. SANDBOX ONLY
/api/v1/sandbox/scenariosSandbox only: 403 sandbox_only in live mode
This endpoint drives the simulation, so it answers sandbox tenants only. A live tenant gets 403 sandbox_only.
403 sandbox_only in live mode.
A clean fill is easy to test against the sandbox; a PARTIAL one is impossible, because it depends on a venue’s depth at a moment nobody controls. That leaves the single case where actualDebit is smaller than authorizationAmount, and the releaseAmount you must hand back, untested until it happens to a real customer.
Arm a scenario, then submit an order as usual. The next order fills partially and returns the ordinary money contract: authorizationAmount = actualDebit + releaseAmount, exactly.
Give one of fillFraction (0 < f < 1) or fillAmountMinor (whole minor units). A scenario fires once, expires after an hour, and is scoped to your tenant. Pass clientOrderId to arm one specific order rather than the next one, which is what you want if your tests run in parallel.
This is not a second accounting engine. It reduces the stake the simulated venue is asked to consume; every figure after that comes from the same code a real partial fill would use.
Header parameters
x-parity-operatorstringoptionalFor an aggregator: the operator this request is for, one of your direct child operators, by its id or its slug (
GET /api/v1/operators/childrenlists them). Omit it, or name yourself, to act as yourself. A key may act only for a direct child in the same mode as its own operator; anything else is403 operator_not_permittedor403 mode_mismatch, and an unknown name answers exactly like an operator that is not yours.
Bodyapplication/json
kindstring · enumoptionalPossible values:
partial_filldefault: "partial_fill"
fillFractionnumberoptionalexample: 0.5
fillAmountMinorintegeroptionalexample: 987
clientOrderIdstring · nullableoptional
Responses
- 201application/json
Armed.
Show response fieldsHide response fields
scenarioIdstringoptionalkindstringoptionalfillFractionnumber · nullableoptionalfillAmountstring · nullableoptionalexample: "9.87"
clientOrderIdstring · nullableoptionalexpiresAtstringoptionalformat: date-time
- 400application/json · Error
The scenario is not a partial fill (
scenario_invalid), or the body did not parse as JSON (invalid_json).Codes:
scenario_invalid,invalid_json.Show response fieldsHide response fields
errorstringrequiredMachine-readable code.
messagestringoptionaldetailanyoptionalPresent on validation failures and some refusals.
requiredstring | arrayoptionalOn
insufficient_scope: the scope this key needs. A single scope from the key gate; an array of every scope the call needs fromPOST /embed-sessionsandDELETE /embed-sessions/{id}.acceptedScopesstring[]optionalOn
insufficient_scopefrom a route that accepts any one of several scopes (the player limit, status, statement and audit routes): every scope that would pass.requiredis still the first of them.missingstring[]optionalOn
insufficient_scopefromPOST /embed-sessionsorDELETE /embed-sessions/{id}: the required scopes this key does not carry.supportedanyoptionalThe values that would have been accepted. On
invalid_typefromGET /reconciliation/feedand from both player activity feeds: the known item types, as an array of strings. Onstake_exceeds_available_depththe figure issupportedStakeinstead.statestring · nullableoptionalOn the refusals of
POST /orders/{id}/cancelandPOST /orders/{id}/confirm-reserve: the order's execution state when it was refused, or null for an unknown order.transmissionStatestring · enumoptionalOn the refusals of
POST /orders/{id}/cancel.unknownmeans keep holding the authorization;resolvedmeans the order's ownoperatorMoneyalready says what to apply.Possible values:
not_transmittedunknownresolvedearlieststringoptionalOn
updated_since_too_oldfrom the player activity feeds: the earliest instant the feed can answer from.format: date-time
noOrderForKeybooleanoptionalOn
quote_not_found,quote_expiredanduser_suspendedfromPOST /api/v1/orders: proof that no earlier request under thisclientOrderIdplaced an order.queuedbooleanoptionalOn
503 order_in_progress: this request was never run, because Parity was too busy to start it. Resend it unchanged.retryAfterSecondsnumberoptionalOn every
rate_limited: seconds until the window resets.Retry-Aftercarries the same figure.retryAfterMsnumberoptionalOn
over_tenant_exposure: milliseconds until the exposure window rolls over.maxStakenumberoptionalOn
over_wager_limitandstake_exceeds_stale_limit: the largest stake, in major units, that would be accepted.maxCentsnumberoptionalOn
line_not_available: the executable price, in cents, that put the line outside the wagerable band. A price, not an amount of money.requestedStakenumberoptionalOn
stake_exceeds_available_depth: the stake you asked for.supportedStakenumberoptionalOn
stake_exceeds_available_depth: the largest stake the book can fill at these terms. Re-quote at it to accept.orderIdstringoptionalOn
quote_already_usedandidempotency_conflictfromPOST /api/v1/orders: seeOrderConflict.executionRefstringoptionalOn a
POST /api/v1/ordersrefusal that closed an order Parity had already recorded (rejected,reconciliation_required,insufficient_collateral,insufficient_position): that order’s Parity execution reference. Quote it to Parity support.detailnever quotes a venue order id; this reference stands in for one.sellableContractsnumberoptionalOn
insufficient_positionandbelow_venue_minimumfrom a live cash out quote: the most contracts this customer could sell now, on the hundredth-of-a-contract grid.minimumContractsnumberoptionalOn the same two refusals: the smallest sale, in contracts, this market accepts.
- 401application/json · Error
The key is absent, unrecognised or revoked. Waiting does not help.
Codes:
missing_credentials,invalid_key,revoked_key.Show response fieldsHide response fields
errorstringrequiredMachine-readable code.
messagestringoptionaldetailanyoptionalPresent on validation failures and some refusals.
requiredstring | arrayoptionalOn
insufficient_scope: the scope this key needs. A single scope from the key gate; an array of every scope the call needs fromPOST /embed-sessionsandDELETE /embed-sessions/{id}.acceptedScopesstring[]optionalOn
insufficient_scopefrom a route that accepts any one of several scopes (the player limit, status, statement and audit routes): every scope that would pass.requiredis still the first of them.missingstring[]optionalOn
insufficient_scopefromPOST /embed-sessionsorDELETE /embed-sessions/{id}: the required scopes this key does not carry.supportedanyoptionalThe values that would have been accepted. On
invalid_typefromGET /reconciliation/feedand from both player activity feeds: the known item types, as an array of strings. Onstake_exceeds_available_depththe figure issupportedStakeinstead.statestring · nullableoptionalOn the refusals of
POST /orders/{id}/cancelandPOST /orders/{id}/confirm-reserve: the order's execution state when it was refused, or null for an unknown order.transmissionStatestring · enumoptionalOn the refusals of
POST /orders/{id}/cancel.unknownmeans keep holding the authorization;resolvedmeans the order's ownoperatorMoneyalready says what to apply.Possible values:
not_transmittedunknownresolvedearlieststringoptionalOn
updated_since_too_oldfrom the player activity feeds: the earliest instant the feed can answer from.format: date-time
noOrderForKeybooleanoptionalOn
quote_not_found,quote_expiredanduser_suspendedfromPOST /api/v1/orders: proof that no earlier request under thisclientOrderIdplaced an order.queuedbooleanoptionalOn
503 order_in_progress: this request was never run, because Parity was too busy to start it. Resend it unchanged.retryAfterSecondsnumberoptionalOn every
rate_limited: seconds until the window resets.Retry-Aftercarries the same figure.retryAfterMsnumberoptionalOn
over_tenant_exposure: milliseconds until the exposure window rolls over.maxStakenumberoptionalOn
over_wager_limitandstake_exceeds_stale_limit: the largest stake, in major units, that would be accepted.maxCentsnumberoptionalOn
line_not_available: the executable price, in cents, that put the line outside the wagerable band. A price, not an amount of money.requestedStakenumberoptionalOn
stake_exceeds_available_depth: the stake you asked for.supportedStakenumberoptionalOn
stake_exceeds_available_depth: the largest stake the book can fill at these terms. Re-quote at it to accept.orderIdstringoptionalOn
quote_already_usedandidempotency_conflictfromPOST /api/v1/orders: seeOrderConflict.executionRefstringoptionalOn a
POST /api/v1/ordersrefusal that closed an order Parity had already recorded (rejected,reconciliation_required,insufficient_collateral,insufficient_position): that order’s Parity execution reference. Quote it to Parity support.detailnever quotes a venue order id; this reference stands in for one.sellableContractsnumberoptionalOn
insufficient_positionandbelow_venue_minimumfrom a live cash out quote: the most contracts this customer could sell now, on the hundredth-of-a-contract grid.minimumContractsnumberoptionalOn the same two refusals: the smallest sale, in contracts, this market accepts.
- 403application/json · Error
A live tenant (
sandbox_only, which answers first), or a tenant that is not a sandbox (not_a_sandbox_operator), or a key refusal from the gate.Codes:
sandbox_only,not_a_sandbox_operator,insufficient_scope,operator_suspended,operator_not_permitted.Show response fieldsHide response fields
errorstringrequiredMachine-readable code.
messagestringoptionaldetailanyoptionalPresent on validation failures and some refusals.
requiredstring | arrayoptionalOn
insufficient_scope: the scope this key needs. A single scope from the key gate; an array of every scope the call needs fromPOST /embed-sessionsandDELETE /embed-sessions/{id}.acceptedScopesstring[]optionalOn
insufficient_scopefrom a route that accepts any one of several scopes (the player limit, status, statement and audit routes): every scope that would pass.requiredis still the first of them.missingstring[]optionalOn
insufficient_scopefromPOST /embed-sessionsorDELETE /embed-sessions/{id}: the required scopes this key does not carry.supportedanyoptionalThe values that would have been accepted. On
invalid_typefromGET /reconciliation/feedand from both player activity feeds: the known item types, as an array of strings. Onstake_exceeds_available_depththe figure issupportedStakeinstead.statestring · nullableoptionalOn the refusals of
POST /orders/{id}/cancelandPOST /orders/{id}/confirm-reserve: the order's execution state when it was refused, or null for an unknown order.transmissionStatestring · enumoptionalOn the refusals of
POST /orders/{id}/cancel.unknownmeans keep holding the authorization;resolvedmeans the order's ownoperatorMoneyalready says what to apply.Possible values:
not_transmittedunknownresolvedearlieststringoptionalOn
updated_since_too_oldfrom the player activity feeds: the earliest instant the feed can answer from.format: date-time
noOrderForKeybooleanoptionalOn
quote_not_found,quote_expiredanduser_suspendedfromPOST /api/v1/orders: proof that no earlier request under thisclientOrderIdplaced an order.queuedbooleanoptionalOn
503 order_in_progress: this request was never run, because Parity was too busy to start it. Resend it unchanged.retryAfterSecondsnumberoptionalOn every
rate_limited: seconds until the window resets.Retry-Aftercarries the same figure.retryAfterMsnumberoptionalOn
over_tenant_exposure: milliseconds until the exposure window rolls over.maxStakenumberoptionalOn
over_wager_limitandstake_exceeds_stale_limit: the largest stake, in major units, that would be accepted.maxCentsnumberoptionalOn
line_not_available: the executable price, in cents, that put the line outside the wagerable band. A price, not an amount of money.requestedStakenumberoptionalOn
stake_exceeds_available_depth: the stake you asked for.supportedStakenumberoptionalOn
stake_exceeds_available_depth: the largest stake the book can fill at these terms. Re-quote at it to accept.orderIdstringoptionalOn
quote_already_usedandidempotency_conflictfromPOST /api/v1/orders: seeOrderConflict.executionRefstringoptionalOn a
POST /api/v1/ordersrefusal that closed an order Parity had already recorded (rejected,reconciliation_required,insufficient_collateral,insufficient_position): that order’s Parity execution reference. Quote it to Parity support.detailnever quotes a venue order id; this reference stands in for one.sellableContractsnumberoptionalOn
insufficient_positionandbelow_venue_minimumfrom a live cash out quote: the most contracts this customer could sell now, on the hundredth-of-a-contract grid.minimumContractsnumberoptionalOn the same two refusals: the smallest sale, in contracts, this market accepts.
- 429application/json · Error
Over the per-key limit, or over the ceiling shared by every key the operator holds (
messagesays which).Retry-AfterandretryAfterSecondscarry the wait; theRateLimit-*headers always describe the key.Codes:
rate_limited.Show response fieldsHide response fields
errorstringrequiredMachine-readable code.
messagestringoptionaldetailanyoptionalPresent on validation failures and some refusals.
requiredstring | arrayoptionalOn
insufficient_scope: the scope this key needs. A single scope from the key gate; an array of every scope the call needs fromPOST /embed-sessionsandDELETE /embed-sessions/{id}.acceptedScopesstring[]optionalOn
insufficient_scopefrom a route that accepts any one of several scopes (the player limit, status, statement and audit routes): every scope that would pass.requiredis still the first of them.missingstring[]optionalOn
insufficient_scopefromPOST /embed-sessionsorDELETE /embed-sessions/{id}: the required scopes this key does not carry.supportedanyoptionalThe values that would have been accepted. On
invalid_typefromGET /reconciliation/feedand from both player activity feeds: the known item types, as an array of strings. Onstake_exceeds_available_depththe figure issupportedStakeinstead.statestring · nullableoptionalOn the refusals of
POST /orders/{id}/cancelandPOST /orders/{id}/confirm-reserve: the order's execution state when it was refused, or null for an unknown order.transmissionStatestring · enumoptionalOn the refusals of
POST /orders/{id}/cancel.unknownmeans keep holding the authorization;resolvedmeans the order's ownoperatorMoneyalready says what to apply.Possible values:
not_transmittedunknownresolvedearlieststringoptionalOn
updated_since_too_oldfrom the player activity feeds: the earliest instant the feed can answer from.format: date-time
noOrderForKeybooleanoptionalOn
quote_not_found,quote_expiredanduser_suspendedfromPOST /api/v1/orders: proof that no earlier request under thisclientOrderIdplaced an order.queuedbooleanoptionalOn
503 order_in_progress: this request was never run, because Parity was too busy to start it. Resend it unchanged.retryAfterSecondsnumberoptionalOn every
rate_limited: seconds until the window resets.Retry-Aftercarries the same figure.retryAfterMsnumberoptionalOn
over_tenant_exposure: milliseconds until the exposure window rolls over.maxStakenumberoptionalOn
over_wager_limitandstake_exceeds_stale_limit: the largest stake, in major units, that would be accepted.maxCentsnumberoptionalOn
line_not_available: the executable price, in cents, that put the line outside the wagerable band. A price, not an amount of money.requestedStakenumberoptionalOn
stake_exceeds_available_depth: the stake you asked for.supportedStakenumberoptionalOn
stake_exceeds_available_depth: the largest stake the book can fill at these terms. Re-quote at it to accept.orderIdstringoptionalOn
quote_already_usedandidempotency_conflictfromPOST /api/v1/orders: seeOrderConflict.executionRefstringoptionalOn a
POST /api/v1/ordersrefusal that closed an order Parity had already recorded (rejected,reconciliation_required,insufficient_collateral,insufficient_position): that order’s Parity execution reference. Quote it to Parity support.detailnever quotes a venue order id; this reference stands in for one.sellableContractsnumberoptionalOn
insufficient_positionandbelow_venue_minimumfrom a live cash out quote: the most contracts this customer could sell now, on the hundredth-of-a-contract grid.minimumContractsnumberoptionalOn the same two refusals: the smallest sale, in contracts, this market accepts.
- 500application/json · Error
Unexpected server failure. Safe to retry a read.
Codes:
internal_error.Show response fieldsHide response fields
errorstringrequiredMachine-readable code.
messagestringoptionaldetailanyoptionalPresent on validation failures and some refusals.
requiredstring | arrayoptionalOn
insufficient_scope: the scope this key needs. A single scope from the key gate; an array of every scope the call needs fromPOST /embed-sessionsandDELETE /embed-sessions/{id}.acceptedScopesstring[]optionalOn
insufficient_scopefrom a route that accepts any one of several scopes (the player limit, status, statement and audit routes): every scope that would pass.requiredis still the first of them.missingstring[]optionalOn
insufficient_scopefromPOST /embed-sessionsorDELETE /embed-sessions/{id}: the required scopes this key does not carry.supportedanyoptionalThe values that would have been accepted. On
invalid_typefromGET /reconciliation/feedand from both player activity feeds: the known item types, as an array of strings. Onstake_exceeds_available_depththe figure issupportedStakeinstead.statestring · nullableoptionalOn the refusals of
POST /orders/{id}/cancelandPOST /orders/{id}/confirm-reserve: the order's execution state when it was refused, or null for an unknown order.transmissionStatestring · enumoptionalOn the refusals of
POST /orders/{id}/cancel.unknownmeans keep holding the authorization;resolvedmeans the order's ownoperatorMoneyalready says what to apply.Possible values:
not_transmittedunknownresolvedearlieststringoptionalOn
updated_since_too_oldfrom the player activity feeds: the earliest instant the feed can answer from.format: date-time
noOrderForKeybooleanoptionalOn
quote_not_found,quote_expiredanduser_suspendedfromPOST /api/v1/orders: proof that no earlier request under thisclientOrderIdplaced an order.queuedbooleanoptionalOn
503 order_in_progress: this request was never run, because Parity was too busy to start it. Resend it unchanged.retryAfterSecondsnumberoptionalOn every
rate_limited: seconds until the window resets.Retry-Aftercarries the same figure.retryAfterMsnumberoptionalOn
over_tenant_exposure: milliseconds until the exposure window rolls over.maxStakenumberoptionalOn
over_wager_limitandstake_exceeds_stale_limit: the largest stake, in major units, that would be accepted.maxCentsnumberoptionalOn
line_not_available: the executable price, in cents, that put the line outside the wagerable band. A price, not an amount of money.requestedStakenumberoptionalOn
stake_exceeds_available_depth: the stake you asked for.supportedStakenumberoptionalOn
stake_exceeds_available_depth: the largest stake the book can fill at these terms. Re-quote at it to accept.orderIdstringoptionalOn
quote_already_usedandidempotency_conflictfromPOST /api/v1/orders: seeOrderConflict.executionRefstringoptionalOn a
POST /api/v1/ordersrefusal that closed an order Parity had already recorded (rejected,reconciliation_required,insufficient_collateral,insufficient_position): that order’s Parity execution reference. Quote it to Parity support.detailnever quotes a venue order id; this reference stands in for one.sellableContractsnumberoptionalOn
insufficient_positionandbelow_venue_minimumfrom a live cash out quote: the most contracts this customer could sell now, on the hundredth-of-a-contract grid.minimumContractsnumberoptionalOn the same two refusals: the smallest sale, in contracts, this market accepts.