Get swap rates
Get informative swap rates from all available swappers. This does not create a transaction.
Query parameters
Exact amount of the sell asset to send, in base units. Required unless buyAmountCryptoBaseUnit is given.
Exact amount of the buy asset to receive, in base units. Each rate returns the sell amount needed to get it. Mutually exclusive with sellAmountCryptoBaseUnit; swappers that cannot quote an exact output come back with an ExactOutputNotSupported error.
Headers
Partner code for affiliate fee attribution. The API resolves the code to the registered affiliate address and BPS. Register a code at the affiliate dashboard.
Response
Swap rates
Example response
{
"rates": [
{
"allowanceContract": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
"affiliateBps": "60",
"partnerBps": "50",
"shapeshiftBps": "10"
}
]
}Changes
Changed in 1 of the 4 revisions of this API.2
- ○
added the new optional
queryrequest parameterbuyAmountCryptoBaseUnitnew-optional-request-parameter
- ○
the
queryrequest parametersellAmountCryptoBaseUnitbecame optionalrequest-parameter-became-optional
- ○