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.
In the live environment, T1 and T2 are currently available only for pairs of EUR or MXN against USD, USDC, or USDT, in either direction. For example, EUR/USD, USDC/EUR, MXN/USDT, and USD/MXN. The sandbox accepts all pairs. If you need T1 or T2 for another pair, reach out to your Customer Success representative or to support@mail.openfx.com.
  • IMMEDIATE trades settle synchronously, so the execute response already reads EXECUTED.
  • T0 trades are not future-dated. The window opens at execution. On an AUTO account the execute response already reads EXECUTED. On a MANUAL account it reads READY_TO_SETTLE until you settle or reverse the trade.
  • T1 and T2 trades are future-dated. They sit in LOCKED until the window opens: 24 market hours after execution for T1, and 48 for T2.
Once a window opens, it stays open for 24 market hours: T0 from execution, T1 from 24 to 48 market hours after execution, and T2 from 48 to 72. The rate locks at execution for every window. The windows differ only in when they open. If you miss the window, the trade stays settleable at the locked rate, and the settlement terms of the trade apply. Contact your OpenFX account manager for those terms. Window timing runs on market hours. The clock follows the FX market week, which opens Sunday 5:00 PM and closes Friday 5:00 PM New York time. Hours while the market is closed, and major market holidays, do not count. A trade placed while the market is closed keeps its time of day and starts counting when the market reopens, so a T1 trade placed Friday morning opens on Monday. Do not compute window timing in your own code. Watch the trade status and the trade webhooks instead. What happens at settlement depends on your organization’s settlement model, an account-level setting rather than a request option. The tradeSettlementMode field holds it. IMMEDIATE trades never reach READY_TO_SETTLE, on either model, because they are already EXECUTED when the execute call returns. You can’t settle or reverse them. On an AUTO account, an IMMEDIATE or T0 trade settles at execution even when your sell-side balance is short, and the shortfall counts against your exposure limit. On a MANUAL account, execution returns TRADE_INSUFFICIENT_BALANCE unless the sell-side balance covers the trade, in every window. 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. As with trade quotes, holds longer than 15 seconds are priced higher to account for market volatility.
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

  • The account cannot fund or support the trade. For 409 TRADE_INSUFFICIENT_BALANCE, use error.details to check the required and available amounts. For 409 TRADE_CREDIT_LIMIT_EXCEEDED, check the account’s exposure. After you resolve the condition, check the quote’s expiresAt. If it has passed, request a fresh quote and use its ID. Submit the trade with a new idempotency key.
  • 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.