Swap assets
Swaps two different crypto assets. Asynchronous — returns 200 OK with an
empty body; track progress via webhooks.
Flow:
- Call
POST /ramp/quotewithquoteAssets.type: "swap"to get pricing. - Call this endpoint with the returned
quoteIdto initiate the swap. - Listen for
swap_updatedwebhook events to track progress and receive the transaction to sign.
Webhooks: because the response body is empty, register a swap_updated webhook
(via POST /ramp/webhook) to receive SwapResponse payloads as the swap
progresses: swap_created → swap_funded → swap_completed (or swap_failed).
Authorizations
API key sent in the Authorization header.
Body
Request body for initiating an asset swap from a swap-type quote.
Blockchain the swap executes on.
stellar, solana, base, polygon, monad Client-generated order ID (UUID) for this swap.
Customer's wallet public key on blockchain.
Quote ID from a prior /ramp/quote call made with quoteAssets.type: "swap".
Optional destination wallet; defaults to publicKey when omitted.
Response
Swap accepted; track completion via swap_updated webhooks