GET
/
starknet
/
routeBatch
curl -L \
  "https://api.fibrous.finance/starknet/routeBatch?amounts=null&tokenInAddresses=null&tokenOutAddresses=null" \
  --header "Accept: */*"
{
  "success": true,
  "routes": [
    {
      "inputToken": {
        "name": "Ethereum",
        "address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
        "decimals": 18,
        "price": 1590.87
      },
      "outputToken": {
        "name": "USD Coin",
        "address": "0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",
        "decimals": 6,
        "price": 0.999982
      },
      "route": [
        {
          "percent": "100%",
          "swaps": [
            {
              "protocol": 5,
              "poolName": "JediSwap",
              "poolAddress": "0x...",
              "percent": "100%",
              "extraData": {
                "fee": 500
              }
            }
          ]
        }
      ]
    }
  ],
  "time": 1.2,
  "estimatedGasUsed": "350000",
  "estimatedGasUsedInUsd": 0.002
}
https://api.fibrous.finance/starknet Find optimal trading routes for multiple token swaps 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

amounts
array[string]
required
Array of input token amounts in wei format. For tokens with 18 decimals, multiply each amount by 10^18.Example: ["1000000000000000000", "2000000000"]
tokenInAddresses
array[string]
required
Array of input token addresses.Example: ["0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5eb06f3ecf368a8"]
tokenOutAddresses
array[string]
required
Array of output token addresses.Example: ["0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"]

Response

success
boolean
Indicates if the request was successful.
routes
array
Array of route objects, each containing:
curl -L \
  "https://api.fibrous.finance/starknet/routeBatch?amounts=null&tokenInAddresses=null&tokenOutAddresses=null" \
  --header "Accept: */*"
{
  "success": true,
  "routes": [
    {
      "inputToken": {
        "name": "Ethereum",
        "address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
        "decimals": 18,
        "price": 1590.87
      },
      "outputToken": {
        "name": "USD Coin",
        "address": "0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",
        "decimals": 6,
        "price": 0.999982
      },
      "route": [
        {
          "percent": "100%",
          "swaps": [
            {
              "protocol": 5,
              "poolName": "JediSwap",
              "poolAddress": "0x...",
              "percent": "100%",
              "extraData": {
                "fee": 500
              }
            }
          ]
        }
      ]
    }
  ],
  "time": 1.2,
  "estimatedGasUsed": "350000",
  "estimatedGasUsedInUsd": 0.002
}