Get Swap Quote
Get Swap Quote
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
- skipValidation boolean
- includeRawParams boolean
- feeCurrency string
Possible values: Value must match regular expression
^0x[a-fA-F0-9]{40}$
- 200
- 400
Default Response
- application/json
- Schema
- Example (from schema)
Schema
- price number required
- guarunteedPrice number required
validationCheck object
status string requiredPossible values: [
success
,reverted
,deferred
]message stringtransaction object
from stringto string requiredvalue stringdata string requiredgasLimit stringgasPrice stringnonce stringchainId numbermaxFeePerGas stringmaxPriorityFeePerGas stringfeeCurrency stringtype number- expectedOutput string required
- minimumOutput string required
- allowanceTarget string required
- estimatedPriceImpact number required
rawParams object
path array[] requiredpairs array[] requiredextras array[] requireddivisors array[] requiredinputAmounts string[] requiredexpectedOutputAmount string requiredminOutputAmount string requiredto string requireddeadline string requiredpartner number requiredsig string required
{
"price": 0,
"guarunteedPrice": 0,
"validationCheck": {
"status": "success",
"message": "string"
},
"transaction": {
"from": "string",
"to": "string",
"value": "string",
"data": "string",
"gasLimit": "string",
"gasPrice": "string",
"nonce": "string",
"chainId": 0,
"maxFeePerGas": "string",
"maxPriorityFeePerGas": "string",
"feeCurrency": "string",
"type": 0
},
"expectedOutput": "string",
"minimumOutput": "string",
"allowanceTarget": "string",
"estimatedPriceImpact": 0,
"rawParams": {
"path": [
[
"string"
]
],
"pairs": [
[
"string"
]
],
"extras": [
[
"string"
]
],
"divisors": [
[
{
"toIdx": 0,
"divisor": 0,
"token": "string"
}
]
],
"inputAmounts": [
"string"
],
"expectedOutputAmount": "string",
"minOutputAmount": "string",
"to": "string",
"deadline": "string",
"partner": 0,
"sig": "string"
}
}
Default Response
- application/json
- Schema
- Example (from schema)
Schema
- oneOf
- MOD1
- MOD2
- MOD3
- MOD4
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 string requiredPossible values: [
Fee currency not supported on this chain
]error string requiredPossible values: [
Unsupported fee currency
]message string requiredsupportedFeeCurrencies string[] requiredPossible values: Value must match regular expression
^0x[a-fA-F0-9]{40}$
{
"error": "No routes found"
}