Estimate a swap
Get a quote for swapping one merchant asset into another. The estimate is held for **30 minutes** and is single-use — creating a swap from it consumes the quote.
Parameter
Type
Required
Description
curl -X POST "/2.0/swap/estimate" \
-H "Content-Type: application/json" \
-H "apiKey: <yourApiKey>" \
-d '{"assetIdFrom":"{assetIdFrom}","assetIdTo":"{assetIdTo}","amount":"{amount}"}'{
"id": "estimage-uuid", // Estimate ID — pass this to "Create a swap"
"serviceId": "1inch", // Internal routing service identifier
"routeType": "dex", // Route type: "dex" or "cex"
"estimatedAmount": "99500000" // Estimated amount you will receive (target base units)
}Last updated