Route
Find optimal route for a token swap through Fibrous Finance on Starknet
https://api.fibrous.finance/starknet
Find the optimal trading route for a token swap through Fibrous Finance’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
Input token amount in wei format. For tokens with 18 decimals, multiply the amount by 10^18.
Example: "1000000000000000000"
(1 ETH)
Input token address.
Example: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"
(ETH)
Output token address.
Example: "0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"
(USDC)
If true, the amount parameter represents the desired output amount instead of input amount.
Default: false
If true, only direct swaps between the input and output tokens will be considered.
Default: false
Array of protocol names to exclude from routing.
Example: ["JediSwap", "10kSwap"]
Response
Indicates if the request was successful.
Details about the input token
Details about the output token
Array of route segments, each containing:
Time taken to find the route in seconds
Estimated gas that will be used for the swap
Estimated gas cost in USD