Endpoint https://api.fibrous.finance/base/route Find the optimal trading route through Fibrous Finance’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 The amount of input tokens in wei format. For tokens with 18 decimals, multiply the amount by 10^18. Example: "1000000000000000000" for 1 ETH 
The address of the input token. Example: "0x4200000000000000000000000000000000000006" for ETH 
The address of the output token. Example: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" for 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.
Default: [] 
Response Indicates if the request was successful. 
Details about the input token. The token’s name (e.g., “Wrapped Ether”) 
The token’s contract address 
Number of decimals the token uses 
Current price of the token in USD 
Details about the output token. The token’s name (e.g., “USD Coin”) 
The token’s contract address 
Number of decimals the token uses 
Current price of the token in USD 
The estimated amount of output tokens in wei format. 
Estimated gas cost for the swap in wei. 
Estimated gas cost in USD. 
Array of route segments with detailed swap information. Percentage of input amount going through this route 
Array of swap steps in this route segment Protocol identifier (e.g., 5 for Uniswap V3) 
Name of the liquidity pool 
Address of the liquidity pool 
Percentage of the segment amount through this pool 
Protocol-specific parameters 
curl  -L  \   "https://api.fibrous.finance/base/route?amount=1000000000000000000&tokenInAddress=0x4200000000000000000000000000000000000006&tokenOutAddress=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"  \   --header  "Accept: */*" 
{   "success" :  true ,   "routeSwapType" :  2 ,   "inputToken" : {     "name" :  "Wrapped Ether" ,     "address" :  "0x4200000000000000000000000000000000000006" ,     "decimals" :  18 ,     "price" :  4337.55   },   "inputAmount" :  "1000000000000000000" ,   "outputToken" : {     "name" :  "USD Coin" ,     "address" :  "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913" ,     "decimals" :  6 ,     "price" :  0.999796   },   "outputAmount" :  "4303439184" ,   "route" : [     {       "percent" :  "100%" ,       "swaps" : [         [           {             "protocol" :  9 ,             "poolName" :  "PancakeSwap V3" ,             "poolAddress" :  "0x72ab388e2e2f6facef59e3c3fa2c4e29011c2d38" ,             "fromTokenAddress" :  "0x4200000000000000000000000000000000000006" ,             "toTokenAddress" :  "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913" ,             "percent" :  "100%" ,             "extraData" : {               "fee" :  100             }           }         ]       ]     }   ],   "estimatedGasUsed" :  "347407383168" ,   "estimatedGasUsedInUsd" :  0.0031034457390210508 ,   "bestQuotesByProtocols" : [],   "time" :  0.858 ,   "initial" :  true }