Skip to main content
POST
/
ramp
/
swap
Swap assets
curl --request POST \
  --url https://api.etherfuse.com/ramp/swap \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "orderId": "123e4567-e89b-12d3-a456-426614174000",
  "quoteId": "844393ca-be57-4817-a58a-5b60e2792c06",
  "publicKey": "GDUKMGUGD3V6VXTU2RLAUM7A2FABLMHCPWTMDHKP7HHJ6FCZKEY4PVWL",
  "blockchain": "stellar"
}
'
{
  "orderId": "123e4567-e89b-12d3-a456-426614174000",
  "customerId": "34fcc67a-2454-4578-8435-e2bf03b4dc30",
  "sendTransaction": "AQAAAA...encoded_tx",
  "sendTransactionHash": "",
  "status": "created",
  "createdAt": "2025-01-15T10:00:00Z",
  "updatedAt": "2025-01-15T10:00:00Z"
}

Authorizations

Authorization
string
header
required

API key for authentication

Body

application/json
orderId
string<uuid>
required

Order ID for the swap (generated by the client)

quoteId
string<uuid>
required

Quote ID to use for the swap

publicKey
string
required

Source wallet public key for the swap

blockchain
enum<string>
required

Blockchain type for the swap

Available options:
stellar,
solana,
base,
polygon,
monad
targetWallet
string | null

Target wallet address for the swap. If not provided, defaults to publicKey.

Response

Swap initiated successfully. The response body is empty.

Subscribe to swap_updated webhooks to receive swap progress updates with the following payload:

Swap response payload sent via the swap_updated webhook. This is not returned directly from the POST /ramp/swap endpoint (which returns an empty body).

orderId
string<uuid>
required

Unique identifier for the swap order

customerId
string<uuid>
required

ID of the customer who initiated the swap

sendTransaction
string
required

Encoded transaction for the user to sign and submit

sendTransactionHash
string
required

Transaction hash of the send transaction once submitted

status
enum<string>
required

Current status of the swap

Available options:
created,
funded,
completed,
failed
createdAt
string<date-time>
required

Timestamp when the swap was created

updatedAt
string<date-time>
required

Timestamp when the swap was last updated

receiveTransactionHash
string | null

Transaction hash of the receive transaction (if applicable)