Convert between USDX and EURX
This guide converts one token into another. It is not Convert received funds, which is about turning a received wire into tokens.
Each asset keeps its own reserve. A conversion burns nothing and mints nothing: it moves value between the two assets' balances, and the reserve behind each asset stays with that asset. Amounts are decimal strings. This guide uses Testnet only.
Ask for a quote
POST /v1/quotes returns a firm rate. Fix exactly one side: send source_amount to say what you spend, or destination_amount to say what you receive.
POST /v1/quotes
authorization: Bearer {{KEY}}
idempotency-key: {{uuid}}
content-type: application/json
{
"source": { "asset": "USDX" },
"destination": { "asset": "EURX" },
"source_amount": "100.00"
}
The quote carries an expires_at. Until then the rate is firm. A quote is single-use: once a transfer has executed it, it cannot be used again. Read it back with GET /v1/quotes/{id}; after expires_at its status is expired.
Execute the quote
Pass the quote's id as quote_id to POST /v1/transfers, with a balance source and a wallet destination in the other asset.
POST /v1/transfers
authorization: Bearer {{KEY}}
idempotency-key: {{uuid}}
content-type: application/json
{
"quote_id": "qt_...",
"source": { "type": "balance", "asset": "USDX" },
"destination": { "type": "stellar", "asset": "EURX", "counterparty_id": "cpty_..." }
}
The assets must match the quote's. The destination wallet needs a trust line for the destination asset.
Handle an expired quote
If expires_at has passed, the transfer is refused with quote_expired (422) and nothing is created. Ask for a new quote and execute that one. Do not retry the same request: it will keep failing. Subscribe to the quote.expired webhook if you want to know when a quote you were holding lapses.
Delivery
The conversion is delivered to the destination wallet as a path payment on Stellar, so the wallet receives the destination asset. Follow the transfer through its states with GET /v1/transfers/{id} or the transfer webhooks.