DevelopersOsai website ↗
API v1
Exchange / API reference

Direct submission disabled: create an approval request from a frozen preview

Request and response reference for POST /v1/exchange/markets/{market}/orders/{order}/replace.

POST/v1/exchange/markets/{market}/orders/{order}/replace
Authentication: Console sessionPermission: exchange.replace
Use the base URL and access configuration provided to your institution. Examples are request templates, not transaction results. Field tables focus on client fields; preserve additional metadata returned by the configured service.

Request

Execution of this instruction is controlled by the approved dispatch workflow. Calling it directly does not bypass maker-checker and can return MAKER_CHECKER_APPROVAL_REQUIRED.

Parameters

NameLocationRequirementDescription
marketpath · stringRequiredUse the value defined for this resource.
orderpath · stringRequiredUse the value defined for this resource.
Originheader · stringRequiredUse the value defined for this resource.
X-CSRF-Tokenheader · stringRequiredUse the value defined for this resource.

Request body

Send JSON with Content-Type: application/json. Nested field names identify their parent object; required markers apply within that object. Replace template values using the relevant resource and configured instrument rules.

FieldTypeDescription & constraints
command_idRequired in parent objectstringDefined by the resource contract.
account_idRequired in parent objectstringDefined by the resource contract.
client_order_idRequired in parent objectstringDefined by the resource contract.
sideRequired in parent objectstringDefined by the resource contract.
typeRequired in parent objectstringDefined by the resource contract.
time_in_forceRequired in parent objectstringDefined by the resource contract.
quantityRequired in parent objectstringExact nonnegative base-10 integer; never a JSON number.Pattern: ^(0|[1-9][0-9]*)$
limit_priceRequired in parent objectstringExact nonnegative base-10 integer; never a JSON number.Pattern: ^(0|[1-9][0-9]*)$
protection_priceRequired in parent objectstringExact nonnegative base-10 integer; never a JSON number.Pattern: ^(0|[1-9][0-9]*)$
expected_versionRequired in parent objectstringExact nonnegative base-10 integer; never a JSON number.Pattern: ^(0|[1-9][0-9]*)$
preview_idRequired in parent objectstringDefined by the resource contract.
preview_terms_hashRequired in parent objectstringDefined by the resource contract.

Responses

Inspect HTTP status before parsing a body. These tables describe client response fields rather than invented successful transaction payloads.

400 · Invalid bounded instruction

No client body fields are defined for this response.

401 · Authentication required

No client body fields are defined for this response.

403 · Permission, recent verified MFA or CSRF denied

No client body fields are defined for this response.

409 · Maker-checker approval required; use approval-requests

No client body fields are defined for this response.

503 · Unavailable or unknown commit outcome; query the original command before retrying

No client body fields are defined for this response.

Retries & recovery

Keep the original request identifiers and any required idempotency key. A timeout does not establish failure. Read the original resource or command before another financial write; use expected versions for concurrent changes.

16 suggested pages

Get startedIntroductionIntegrate institutional FX and stablecoin trading with quotes, orders, market data, account records and settlement reporting.Get startedQuickstartMake an authenticated read, request a quote and follow an instruction without losing its original references.Get startedAuthenticationUse the correct authentication scheme for API credentials, Console sessions and market-data feeds.Get startedErrorsDistinguish invalid inputs, denied access, conflicts, rate limits and uncertain outcomes.Get startedRate limitsUse response headers, bounded concurrency and backoff rather than repeated bursts.Get startedAmounts & precisionKeep minor-unit money, fixed-point FX rates and instrument-scaled quantities exact.Get startedPagination & recoveryUse each resource’s pagination model and preserve stable recovery checkpoints.Financial workflowsQuotes & acceptanceRequest explicit FX economics, review conditions and retain accepted terms.Financial workflowsTrade lifecycleTrack funding, execution and settlement as distinct business transitions.Financial workflowsBalances & transactionsRead institutional financial positions and reconcile movements by currency.Financial workflowsBeneficiariesRegister beneficiaries and coordinate their institutional approval lifecycle.Financial workflowsCredential managementCreate, inspect, rotate and revoke application credentials without exposing secrets.Events & reliabilityIdempotencyPrevent duplicate financial effects across retries and uncertain outcomes.Events & reliabilityWebhooks & verificationVerify deliveries, persist original events and make downstream processing idempotent.Events & reliabilityEvent payloadsUnderstand the customer event envelope and business transitions behind subscriptions.Events & reliabilityDelivery retries & replayRepair webhook delivery without creating a second business event.