Skip to main content
GET

Endpoint

Find the optimal trading route through Fibrous’s liquidity pools to maximize output and minimize slippage. This endpoint analyzes multiple protocols, pool depths, and potential paths to deliver the most efficient swap execution for your tokens.

Query Parameters

string
required
The amount of input tokens in wei format. For tokens with 18 decimals, multiply the amount by 10^18.Example: "1000000000000000000" for 1 ETH
string
required
The address of the input token.Example: "0x4200000000000000000000000000000000000006" for ETH
string
required
The address of the output token.Example: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" for USDC
boolean
Not supported yet - reserved for future use. Default: false
boolean
If true, only direct routes (single hop) will be considered. Default: false
array[number]
Comma-separated list of protocol IDs to exclude from routing (e.g., “1,2,3”). Default: []
string
Integrator address for fee distribution.
number
Integrator fee percentage in basis points (0-500) maximum 5%. Example: 100 for 1%
number
Integrator surplus percentage in basis points (0-5000) maximum 50%. Example: 1000 for 10%

Response

boolean
Indicates if the route calculation was successful.
object
Details about the input token.
string
Input amount in wei format.
object
Details about the output token.
string
The estimated amount of output tokens in wei format.
string
Estimated gas cost for the swap in wei.
number
Estimated gas cost in USD.
number
Timestamp of route calculation.
array[string]
Best quotes by protocols.
boolean
Whether this is an initial route.
number
Route swap type.
string
Integrator address.
number
Integrator fee percentage in basis points (0-500) maximum 5%.
number
Integrator surplus percentage in basis points (0-5000) maximum 50%.
object
API metadata including version and response timestamp.
array
Array of route segments with detailed swap information.