Skip to main content
GET
Find the optimal trading route for a token swap through Fibrous’s liquidity pools on Starknet. This endpoint analyzes multiple protocols, pool depths, and potential paths to deliver the most efficient swap execution for your tokens.

Query Parameters

string
required
Input token amount in wei format. For tokens with 18 decimals, multiply the amount by 10^18.Example: "1000000000000000000" (1 ETH)
string
required
Input token address.Example: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7" (ETH)
string
required
Output token address.Example: "0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8" (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.Example: ["JediSwap", "10kSwap"]

Response

boolean
Indicates if the request was successful.
object
Details about the input token
object
Details about the output token
array
Array of route segments, each containing:
number
Time taken to find the route in seconds
string
Estimated gas that will be used for the swap
number
Estimated gas cost in USD