Default
One of amountIn or amountOut is required. Exact out calculation is not supported by some aggregators.
Path parameters
chainstring · enumRequiredPossible values:
Chain identifier
aggstring · enumRequiredPossible values:
Aggregator identifier
Query parameters
tokenInstringRequired
Input token address
tokenOutstringRequired
Output token address
amountInstringOptional
Input token amount
amountOutstringOptional
Output token amount
Responses
200
Successful response
application/json
400
Bad request
application/json
get
GET /v2/aggregator/routes/{chain}/{agg}/quote HTTP/1.1
Host: router-api.lfj.dev
Accept: */*
{
"tokenIn": {
"address": "text",
"symbol": "text",
"swaps": [
{
"pair": "text",
"tokenIn": {
"address": "text",
"symbol": "text"
},
"tokenOut": {
"address": "text",
"symbol": "text",
"swaps": [
{}
]
},
"amountBp": 1
}
]
},
"tokenOut": {
"address": "text",
"symbol": "text"
},
"amountIn": "text",
"amountOut": "text",
"aggregator": "text"
}
Path parameters
chainstring · enumRequiredPossible values:
Chain identifier
aggstring · enumRequiredPossible values:
Aggregator identifier
Query parameters
tokenInstringRequired
Input token address
tokenOutstringRequired
Output token address
amountInstringRequired
Input token amount
userAddressstringRequired
User's wallet address
slippageBpsinteger · max: 10000Required
Maximum slippage tolerance in basis points (1 bps = 0.01%)
feeBpsinteger · max: 10000Required
Fee in basis points (1 bps = 0.01%)
feeRecipientAddressstringOptional
Fee recipient's wallet address. Required if feeBps is not zero.
Responses
200
Successful response
application/json
400
Bad request
application/json
get
GET /v2/aggregator/routes/{chain}/{agg}/swap HTTP/1.1
Host: router-api.lfj.dev
Accept: */*
{
"from": "text",
"to": "text",
"data": "text",
"value": "text",
"gas": "text",
"gasPrice": "text"
}