Skip to main content
A trade moves money between two of your currency balances at the rate locked in its quote. This page covers what happens after you execute a trade: the statuses it passes through, what moves it forward, and the two actions you can take on it. How you request a rate and execute against it is on Quotes.
Funds move when a trade reaches EXECUTED, not when you create it. A trade created with a T1 or T2 window waits, and on a per-trade settlement account it then waits for you. Read status before you assume a balance has changed.

Endpoints

State machine

Trade.status is a closed enum, and a trade ends in EXECUTED or REVERSED.

Settlement window

Every trade carries a settlementWindow that you choose on the quote request: IMMEDIATE, T0, T1, or T2. It defaults to T0.
  • IMMEDIATE and T0 trades settle synchronously, so the execute response already reads EXECUTED.
  • T1 and T2 trades are future-dated. They sit in LOCKED until the window opens.
What happens when the window opens depends on your organization’s settlement model, an account-level setting rather than a request option. The models are compared on Settlement models.

Settle a trade

Settling applies only to a trade in READY_TO_SETTLE on a MANUAL account. It completes the trade at the locked rate and populates settledAt and settlementStartTime.
cURL
A successful response wraps a TradeSettlement in data. The trade is now EXECUTED:

Reverse a trade

A reversal unwinds a trade in READY_TO_SETTLE instead of settling it. It takes two calls, so you see the cost before you commit.
1

Generate a reverse quote

POST /v3/fx/trades/{id}/reverse-quote returns a time-limited quote. quoteForSeconds takes the same closed set of durations as a trade quote: 3, 15, 30, 45, or 60.
cURL
Read reversalDetails before you act. direction says whether the reversal would DEBIT or CREDIT your balance, and differentialAmount is the unsigned magnitude in currency.
2

Execute the reversal

POST /v3/fx/trades/{id}/reverse names the reverse quote’s id as quoteId. Send it before expiresAt. An optional clientReferenceId labels the reversal.
cURL
The response is a new trade, created already EXECUTED. Its originalTradeId points at the trade it unwound, and the original trade reads REVERSED.
A trade that is outside its reversal window, or already reversed or settled, returns 409 TRADE_NOT_REVERSIBLE.

Track a trade

Trade webhooks report each transition, so you don’t need to poll. The three events map one-to-one onto the statuses a trade reaches under your own action or OpenFX’s. An AUTO account only receives fx.trade.settled. A MANUAL account can receive all three. The webhook data is close to the Trade resource but not identical. It adds tradeSettlementMode and settledAt, and on fx.trade.reversed it adds reversalTradeId and reversalDetails. settledAt is null on a reversal, because a reversal only ever unwinds a trade that was never settled. Webhooks setup covers delivery and signature verification. If you can’t receive webhooks yet, poll GET /v3/fx/trades/{id} and read status.

Effect on balances and exposure

A trade changes your balances when it reaches EXECUTED. Read GET /v3/fx/balances afterward; the trade response does not carry the balance impact. Before then, an open trade counts against your exposure limit. A LOCKED trade counts as settlableLater exposure and a READY_TO_SETTLE trade as settlableNow. See Exposure.

Common mistakes

  • Expecting EXECUTED from a future-dated trade. A T1 or T2 trade returns before its window opens, so its funds have not moved.
  • Calling settle on an automatic account. It returns 409 TRADE_NOT_MANUAL. Netted accounts never settle by hand.
  • Letting a reverse quote lapse. The reversal must reach POST /v3/fx/trades/{id}/reverse before expiresAt; generate a new reverse quote with a new idempotency key.
  • Reading the reversal as the original. The reversal is a separate trade with its own id. Match it to the original through originalTradeId, or reversalTradeId on the webhook.
  • Retrying a failed execution blind. After TRADE_EXECUTION_FAILED, call GET /v3/fx/trades/{id} to check state first.

What’s next

Settlement models

Netted and per-trade settlement, side by side.

Balances

What changes in each currency when a trade executes.

Trade webhooks

Ready-to-settle, settled, and reversed events.

Exposure

Exposure-limit usage from trades that have not settled.