curl --request POST \
--url https://api.sand.etherfuse.com/ramp/swap \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"blockchain": "solana",
"orderId": "9c7b3f1a-2e4d-4b6a-8c1d-0f9e8d7c6b5a",
"publicKey": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"quoteId": "3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c",
"targetWallet": null
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
blockchain: 'solana',
orderId: '9c7b3f1a-2e4d-4b6a-8c1d-0f9e8d7c6b5a',
publicKey: 'GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN',
quoteId: '3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c',
targetWallet: null
})
};
fetch('https://api.sand.etherfuse.com/ramp/swap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sand.etherfuse.com/ramp/swap"
payload = {
"blockchain": "solana",
"orderId": "9c7b3f1a-2e4d-4b6a-8c1d-0f9e8d7c6b5a",
"publicKey": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"quoteId": "3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c",
"targetWallet": None
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)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: pending → funds_received → completed (or failed). funds_received fires on Stellar and Monad only; on Solana the swap goes straight from pending to completed.
curl --request POST \
--url https://api.sand.etherfuse.com/ramp/swap \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"blockchain": "solana",
"orderId": "9c7b3f1a-2e4d-4b6a-8c1d-0f9e8d7c6b5a",
"publicKey": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"quoteId": "3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c",
"targetWallet": null
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
blockchain: 'solana',
orderId: '9c7b3f1a-2e4d-4b6a-8c1d-0f9e8d7c6b5a',
publicKey: 'GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN',
quoteId: '3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c',
targetWallet: null
})
};
fetch('https://api.sand.etherfuse.com/ramp/swap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sand.etherfuse.com/ramp/swap"
payload = {
"blockchain": "solana",
"orderId": "9c7b3f1a-2e4d-4b6a-8c1d-0f9e8d7c6b5a",
"publicKey": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"quoteId": "3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c",
"targetWallet": None
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)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