Get swap rates
Changed onGet informative swap rates from all available swappers. This does not create a transaction.
Request
- Base URLhttps://api.shapeshift.com
- URLhttps://api.shapeshift.com/v1/swap/rates
- Authnone declared
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",
"supportsExternalPayment": true,
"affiliateBps": "60",
"partnerBps": "50",
"shapeshiftBps": "10"
}
]
}Changes
- info
added the required property
//to the response with the status
- info
- info
added the new optional
queryrequest parameterbuyAmountCryptoBaseUnit - info
the
queryrequest parametersellAmountCryptoBaseUnitbecame optional
- info