Skip to main content

Get Routes

Gets all swap routes available when swapping the specified asset_in to receive the specified asset_out.

Request URL

https://api.euclidprotocol.com/api/v1/routes

Curl

curl -X 'POST' \
'https://api.euclidprotocol.com/api/v1/routes' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"amount_in": "100",
"token_in": "usdt",
"token_out": "nibi"
}'
FieldTypeDescription
amount_inStringThe amount of tokens being swapped in.
asset_inStringThe identifier of the asset being swapped in.
asset_outStringThe identifier of the desired asset out.

Example Response

{
"paths":[
{
"route":["usdt","nibi"],
"amount_out":100
},
{
"route":["usdt","usdc","eth","nibi"],
"amount_out":100
}
]
}