Create a swap
Execute a swap from a previously obtained estimate. The source amount is immediately reserved from the asset’s available balance, and the swap starts processing asynchronously. Track its progress with
{
"estimateId": "{estimateId}"
}Field
Type
Required
Description
curl -X POST "/2.0/swap/create" \
-H "Content-Type: application/json" \
-H "apiKey: <yourApiKey>" \
-d '{"estimateId":"{estimateId}"}'{
"id": "{swap-uuid}", // Swap ID
"amountFrom": "100000000", // Source amount in base units
"amountFromInUsd": "100.00", // Source amount in USD (or null)
"amountTo": null, // Received amount in base units (null until finished)
"amountToInUsd": null, // Received amount in USD (or null)
"assetIdFrom": "{assetIdFrom}", // Source merchant asset ID
"assetIdTo": "{assetIdTo}", // Target merchant asset ID
"cryptoIdFrom": "{cryptoIdFrom}", // Source cryptocurrency ID
"cryptoIdTo": "{cryptoIdTo}", // Target cryptocurrency ID
"hashFrom": null, // Source transaction hash (null until available)
"hashTo": null, // Target transaction hash (null until available)
"status": "new", // new | in_progress | finished | rejected
"createdAt": "2025-03-11T14:30:16+00:00" // RFC3339, UTC+0
}Last updated