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 HYPE
string
required
The address of the input token.Example: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" for HYPE
string
required
The address of the output token.Example: "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb" for USDC
boolean
If true, the amount parameter represents the desired output amount instead of input amount. Default: false
boolean
If true, only direct swaps between the input and output tokens will be considered. Default: false
array[string]
Array of protocol names to exclude from routing. Default: []

Response

boolean
Indicates if the request was successful.
number
Type of swap route
object
Details about the input token.
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.
array
Array of route segments with detailed swap information.