GET
/
base
/
route
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": 1590.87
  },
  "inputAmount": "1000000000000000000",
  "outputToken": {
    "name": "USD Coin",
    "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "decimals": 6,
    "price": 0.999982
  },
  "outputAmount": "1596313860",
  "time": 1.1,
  "estimatedGasUsed": "212280540264",
  "estimatedGasUsedInUsd": 0.0013627561562787743,
  "route": [
    {
      "percent": "89%",
      "swaps": [
        [
          {
            "protocol": 5,
            "poolName": "Uniswap V3",
            "poolAddress": "0xd0b53d9277642d899df5c87a3966a349a798f224",
            "fromTokenAddress": "0x4200000000000000000000000000000006",
            "toTokenAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "percent": "48.31%",
            "extraData": {
              "fee": 500
            }
          },
          {
            "protocol": 7,
            "poolName": "SushiSwap V3",
            "poolAddress": "0x57713f7716e0b0f65ec116912f834e49805480d2",
            "fromTokenAddress": "0x4200000000000000000000000000000006",
            "toTokenAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "percent": "34.83%",
            "extraData": {
              "fee": 500
            }
          }
        ]
      ]
    }
  ],
  "bestQuotesByProtocols": []
}

https://api.fibrous.finance/base

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

amount
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

tokenInAddress
string
required

The address of the input token.

Example: "0x4200000000000000000000000000000000000006" for ETH

tokenOutAddress
string
required

The address of the output token.

Example: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" for USDC

Response

success
boolean

Indicates if the request was successful.

routeSwapType
number

Type of swap route (e.g., 2 for split routes).

inputToken
object

Details about the input token.

outputToken
object

Details about the output token.

outputAmount
string

The estimated amount of output tokens in wei format.

estimatedGasUsed
string

Estimated gas cost for the swap in wei.

estimatedGasUsedInUsd
number

Estimated gas cost in USD.

route
array

Array of route segments with detailed swap information.

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": 1590.87
  },
  "inputAmount": "1000000000000000000",
  "outputToken": {
    "name": "USD Coin",
    "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "decimals": 6,
    "price": 0.999982
  },
  "outputAmount": "1596313860",
  "time": 1.1,
  "estimatedGasUsed": "212280540264",
  "estimatedGasUsedInUsd": 0.0013627561562787743,
  "route": [
    {
      "percent": "89%",
      "swaps": [
        [
          {
            "protocol": 5,
            "poolName": "Uniswap V3",
            "poolAddress": "0xd0b53d9277642d899df5c87a3966a349a798f224",
            "fromTokenAddress": "0x4200000000000000000000000000000006",
            "toTokenAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "percent": "48.31%",
            "extraData": {
              "fee": 500
            }
          },
          {
            "protocol": 7,
            "poolName": "SushiSwap V3",
            "poolAddress": "0x57713f7716e0b0f65ec116912f834e49805480d2",
            "fromTokenAddress": "0x4200000000000000000000000000000006",
            "toTokenAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "percent": "34.83%",
            "extraData": {
              "fee": 500
            }
          }
        ]
      ]
    }
  ],
  "bestQuotesByProtocols": []
}