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://testnet.api.euclidprotocol.com/api/v1/routes

Curl

curl -X 'POST' \
'https://testnet.api.euclidprotocol.com/api/v1/routes' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"amount_in": "100",
"token_in": "nibi",
"token_out": "stars"
}'
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":[
"nibi",
"fundenom",
"stars"
],
"amount_out":"1"
}
]
}