API Reference
Cross-chain swap routes
Suave Aggregator
- Overview
- SDK Guide
- API Reference
Suave Checkout
- Introduction
- Use Cases
- API Documentation
- SDK Documentation
API Reference
Cross-chain swap routes
Get cross-chain routes between tokens
POST
/
v1
/
routes
curl --request POST \
--url https://api.suave.ag/v1/routes \
--header 'Content-Type: application/json' \
--data '{
"fromToken": "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
"toToken": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",
"fromChainId": "10",
"toChainId": "137",
"inputAmount": "2000000"
}'
{
"id": "<string>",
"steps": [
{
"protocol": "Across",
"fromToken": {
"chain_to_address": {},
"symbol": "<string>",
"decimals": 123,
"chains": [
{}
],
"name": "<string>",
"logoURI": "<string>"
},
"toToken": {
"chain_to_address": {},
"symbol": "<string>",
"decimals": 123,
"chains": [
{}
],
"name": "<string>",
"logoURI": "<string>"
},
"fromChainId": 123,
"toChainId": 123,
"inputAmount": "<string>",
"outputAmount": "<string>",
"estimatedTime": "<string>",
"fees": [
{
"amount": "<string>",
"currency": {
"chain_to_address": {},
"symbol": "<string>",
"decimals": 123,
"chains": [
{}
],
"name": "<string>",
"logoURI": "<string>"
}
}
]
}
],
"estimatedTime": "<string>",
"totalFees": [
{
"amount": "<string>",
"currency": {
"chain_to_address": {},
"symbol": "<string>",
"decimals": 123,
"chains": [
{}
],
"name": "<string>",
"logoURI": "<string>"
}
}
]
}
Body
application/json
Example:
"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"
Example:
"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063"
Response
200 - application/json
Generated Routes
Available options:
Across
, Relay
, Matcha
Construct a type with a set of properties K of type T
Construct a type with a set of properties K of type T
Construct a type with a set of properties K of type T
Construct a type with a set of properties K of type T
curl --request POST \
--url https://api.suave.ag/v1/routes \
--header 'Content-Type: application/json' \
--data '{
"fromToken": "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
"toToken": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",
"fromChainId": "10",
"toChainId": "137",
"inputAmount": "2000000"
}'
{
"id": "<string>",
"steps": [
{
"protocol": "Across",
"fromToken": {
"chain_to_address": {},
"symbol": "<string>",
"decimals": 123,
"chains": [
{}
],
"name": "<string>",
"logoURI": "<string>"
},
"toToken": {
"chain_to_address": {},
"symbol": "<string>",
"decimals": 123,
"chains": [
{}
],
"name": "<string>",
"logoURI": "<string>"
},
"fromChainId": 123,
"toChainId": 123,
"inputAmount": "<string>",
"outputAmount": "<string>",
"estimatedTime": "<string>",
"fees": [
{
"amount": "<string>",
"currency": {
"chain_to_address": {},
"symbol": "<string>",
"decimals": 123,
"chains": [
{}
],
"name": "<string>",
"logoURI": "<string>"
}
}
]
}
],
"estimatedTime": "<string>",
"totalFees": [
{
"amount": "<string>",
"currency": {
"chain_to_address": {},
"symbol": "<string>",
"decimals": 123,
"chains": [
{}
],
"name": "<string>",
"logoURI": "<string>"
}
}
]
}