Skip to main content
POST
Reverse a trade

Authorizations

Authorization
string
header
required

ES256-signed JWT bearer token, single-use, 60-second TTL. See Authentication for how to mint one.

X-Request-Signature
string
header
required

ES256 signature over the request, bound to the bearer JWT. Required on every request. See Authentication → Request signing.

Headers

Idempotency-Key
string
required

Client-generated unique key to make a write operation safely retryable. UUID recommended. See Idempotency.

Required string length: 1 - 255
Pattern: ^[a-zA-Z0-9_-]{1,255}$
Example:

"550e8400-e29b-41d4-a716-446655440000"

X-Request-Id
string

Optional, client-supplied correlation ID for this request. Echoed verbatim on the response when supplied; the response omits it when the request did not supply one. Distinct from X-Trace-Id (server-generated, always present). See Metadata & tracing.

Example:

"my-req-abc-123"

X-App-Mode
enum<string>
default:SANDBOX

Environment selector, matching the API key's bound environment. Defaults to SANDBOX when omitted. See Environments. When present, the value must be SANDBOX or LIVE, matched without regard to case. Any other value, including an empty one, returns 400 INVALID_APP_MODE; details.received echoes the value you sent.

Available options:
SANDBOX,
LIVE
Example:

"SANDBOX"

Path Parameters

id
string
required

Unique identifier of the trade to reverse. Accepts an ID in either of two forms: the current readable, typed-prefix ID (see ResourceId), for example tde_5W7guYdHT24JFnRQrZN9y8, or a legacy bare UUID, for example 550e8400-e29b-41d4-a716-446655440000, kept for backward compatibility with IDs persisted before v3 introduced readable IDs. Both forms resolve to the same underlying record. Responses always return the readable form — see Resource IDs.

Pattern: ^([a-z]{3,5}_[1-9A-HJ-NP-Za-km-z]{1,22}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
Example:

"tde_5W7guYdHT24JFnRQrZN9y8"

Body

application/json

Executes a reversal of the trade identified by id against a reverse quote.

quoteId
string
required

ID of the reversal quote to execute the reversal against.

Pattern: ^([a-z]{3,5}_[1-9A-HJ-NP-Za-km-z]{1,22}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
Example:

"qte_TmHeAhdFLes63uGgDjcJRx"

clientReferenceId
string

Client-supplied reference for the trade. Present as null when unset; maximum 255 characters.

Maximum string length: 255
Example:

"order-123-reversal"

Response

Reverse a trade.

data
object
required

A trade reversal is itself a Trade — created by POST /v3/fx/trades/{id}/reverse against a reverse quote — with two additional fields: originalTradeId (the trade it unwinds) and reversalDetails (the differential applied).