Prerequisites
Before you begin, make sure that you’ve:- Contacted your Circle representative to activate Cross-Currency Exchange on your Circle Mint account.
- Linked a bank account to Circle Mint for the local fiat side of the trade (not required for USDC and EURC swaps).
- Configured API authentication per the
Getting Started quickstart. The
examples below use a
$API_KEYenvironment variable for the bearer token and the sandbox base URL,https://api-sandbox.circle.com.
Step 1. Register a fiat trading account
For BRL or MXN pairs, register the linked fiat account as the settlement account for that currency by sending aPUT request to
/v1/exchange/fxConfigs/accounts.
This is a one-time setup per currency. Skip this step for USDC and EURC swaps
and for HKD trades whose fiat account is configured offline.
currency to BRL and use
the PIX bank account id returned by your account setup.
Step 2. Check the daily limit
Verify that the trade you plan to create has enough daily headroom by callingGET /v1/exchange/fxConfigs/dailyLimits.
The endpoint returns the per-currency limit, the amount used so far in the
current day, and the amount still available. Trades that would exceed the
available amount are rejected at submission.
Step 3. Request a tradable quote
Send aPOST request to
/v1/exchange/quotes
with type set to tradable to lock a rate for 3 seconds. Reference quotes are
indicative only and cannot be accepted in Step 4; see the
quote types section
for the distinction.
from
and to set to USDC and EURC (in either direction). The request requires
the same idempotencyKey and tradable quote type.
Step 4. Accept the quote by creating a trade
Lock the quoted rate by sending aPOST request to
/v1/exchange/trades
with the quoteId from Step 3 and a new idempotencyKey. Only tradable
quotes are accepted; submitting a reference quote returns an error.
id. You use it in Step 6 to poll the trade status.
Step 5. Retrieve settlement instructions and send funds
This step applies to fiat pairs. For USDC and EURC swaps, no inbound transfer is required; see the note at the end of this step. Fetch the per-currency beneficiary details by sending aGET request to
/v1/exchange/trades/settlements/instructions/{currency}.
The endpoint accepts BRL and MXN as path parameters. Settlement instructions
are static for a given currency and can be cached and reused across trades.
trackingRef in
the wire reference field so Circle can match the inbound transfer to the trade.
trackingRef in the PIX reference field.
USDC and EURC swaps do not require an inbound transfer. Both legs are debited
and credited against the Mint balance per the settlement schedule configured
offline with Circle. See
delivery-versus-payment settlement
for details.
Step 6. Poll the trade status
Send aGET request to
/v1/exchange/trades/{id}
to track the trade as it moves toward settlement. The trade transitions through
pending, confirmed, pending_settlement, and complete (or failed) as it
progresses. See the
trade and settlement lifecycle
for the full state machine.
Step 7. Retrieve the settlement batch
Once the trade reachescomplete, retrieve the settlement batch that holds the
trade’s legs by sending a GET request to
/v1/exchange/trades/settlements.
Use the type query parameter to filter for the inbound (account_receivable)
or outbound (account_payable) side. Each batch lists its legs in the details
array, marked as payable and receivable.
type=account_payable to retrieve the outbound leg.
- Getting Started: Authenticate to the Mint API and set up an API key.