POST /exchange-rates with type set to LOCKED, rail set to PIX, sourceCurrency set to USDC and targetCurrency set to BRL. The response gives you an id and an expiresAt. Pass that id as exchangeRateId to POST /transactions/off-ramp before the lock expires, and the conversion settles at the quoted rate.
A locked quote has three lock durations (30s, 1m and 5m), is consumed by one transaction, and is not a hedge. The sections below cover each part.
Floating or locked
If you skip the quote and send
sourceAmount straight to the off-ramp, the transaction uses a floating rate and the final rate can differ slightly from what you displayed. See Exchange Rates for the full comparison.
Before you start
- An approved customer. A customer that is not approved gets
KYC_NOT_APPROVED. - USDC or USDT in the customer’s wallet. Off-ramps debit that wallet.
- A BRL destination for the recipient. The Pix payout guide shows how to register one.
1. Request the quote
Send aPOST request to /exchange-rates.
Request
Response
The numbers above are illustrative. The response also carries a
fees object with lumx, partner and total entries, left out here for brevity.Request fields
The locked off-ramp request has no
blockchain field, so set the network on the quote. See Coverage for which stablecoins and networks convert to BRL.
Response fields
2. Know how long it lasts
The lock starts when the quote is created and ends atexpiresAt.
For a flow where your service quotes and executes back to back,
30s is enough. If a person has to read the price and confirm, use 1m or 5m and show a countdown from expiresAt.
3. Execute the off-ramp with the quote
Send aPOST request to /transactions/off-ramp with the quote’s id as exchangeRateId. Do not send sourceCurrency or sourceAmount. The quote already fixes them.
Request
Response (202)
purpose is required and must match what the funds are for. See Purpose codes.
4. Follow the transaction
The off-ramp moves throughTRANSFERRING_STABLECOIN, TRADING and TRANSFERRING_FIAT to SUCCESS, or to FAILED. Subscribe to the offramp.* webhooks instead of polling, or read GET /transactions/{id}. The offramp.success event carries the receipt with the final amounts, rate, fees and transactionHash. The Pix payout guide walks through the full lifecycle.
If the quote expires
A transaction that arrives afterexpiresAt is rejected with 422 and EXCHANGE_RATE_EXPIRED. Nothing is converted. Request a new quote, show the new price if a person has to approve it, and send the off-ramp again.
Other quote errors you can hit on the transaction call:
Each quote settles one transaction. To pay several recipients, request one quote per payout.
What a locked quote does not do
- It locks the rate, not the wallet balance. The balance is checked when you create the off-ramp, which fails with
INSUFFICIENT_BALANCEif the wallet is short. Fund the wallet and request a new quote. - It fixes the price for the lock window only. It is not a forward or a hedge, and Lumx does not offer hedging instruments today.
- Autoconversion rules always convert at the market rate. They do not accept
exchangeRateId. - It does not change settlement time. Pix settles on its own timeline, covered in Payment rail cut-off times.
Related resources
Pix payout guide
Register a Pix destination and pay out USDC or USDT in BRL.
Exchange Rates
Floating and locked rates side by side.
Transactions
Off-ramp lifecycle and purpose values.
Errors
The full error catalog.