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.
Show child attributes
string
The token’s name (e.g., “Wrapped Ether”)
string
The token’s contract address
number
Number of decimals the token uses
number
Current price of the token in USD
string
Input amount in wei format.
object
Details about the output token.
Show child attributes
string
The token’s name (e.g., “USD Coin”)
string
The token’s contract address
number
Number of decimals the token uses
number
Current price of the token in USD
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.
Show child attributes
string
API version (e.g., “2.0”)
string
Response timestamp in ISO 8601 format
array
Array of route segments with detailed swap information.
Show child attributes
string
Percentage of input amount going through this route
array
Array of swap steps in this route segment
Show child attributes
number
Protocol identifier (e.g., 5 for Uniswap V3)
string
Name of the liquidity pool
string
Address of the liquidity pool
string
Percentage of the segment amount through this pool