Get Swap Price
Get Swap Price
Query Parameters
- sellToken string required
Possible values: Value must match regular expression
^0x[a-fA-F0-9]{40}$
- buyToken string required
Possible values: Value must match regular expression
^0x[a-fA-F0-9]{40}$
- sellAmount string required
Possible values: Value must match regular expression
^[0-9]+$
- slippagePercentage number
Default value:
0.01
- excludedSources string
- includedSources string
- maxHops number
Default value:
3
- takerAddress string
Possible values: Value must match regular expression
^0x[a-fA-F0-9]{40}$
- maxPaths number
Default value:
4
Responses
- 200
- 400
Default Response
- application/json
- Schema
- Example (from schema)
Schema
- price number required
- guarunteedPrice number required
- expectedOutput string required
- minimumOutput string required
- estimatedPriceImpact number required
{
"price": 0,
"guarunteedPrice": 0,
"expectedOutput": "string",
"minimumOutput": "string",
"estimatedPriceImpact": 0
}
Default Response
- application/json
- Schema
- Example (from schema)
Schema
- oneOf
- MOD1
- MOD2
error string requiredPossible values: [
No routes found
]error string requiredPossible values: [
Unsupported tokens
]tokens string[] requiredPossible values: Value must match regular expression
^0x[a-fA-F0-9]{40}$
{
"error": "No routes found"
}
Loading...