Skip to main content
POST
/
{network}
/
v2
/
calldata
curl -X POST "https://api.fibrous.finance/{network}/v2/calldata" \
  -H "Content-Type: application/json" \
  -d '{
    "route": {
      "success": true,
      "routeSwapType": 0,
      "inputToken": {
        "name": "Wrapped Ether",
        "address": "0x4200000000000000000000000000000000000006",
        "decimals": 18,
        "price": 2949.717076112869
      },
      "inputAmount": "1000000000000000000",
      "outputToken": {
        "name": "USD Coin",
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "decimals": 6,
        "price": 0.999597487941284
      },
      "outputAmount": "2951108576",
      "route": []
    },
    "slippage": 0.5,
    "destination": "0x1234567890123456789012345678901234567890"
  }'
{
  "route": {
    "token_in": "0x4200000000000000000000000000000000000006",
    "token_out": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "amount_in": "1000000000000000000",
    "amount_out": "2951108576",
    "min_received": "2936407033",
    "destination": "0x1234567890123456789012345678901234567890",
    "swap_type": 0
  },
  "swap_parameters": [
    {
      "token_in": "0x4200000000000000000000000000000000000006",
      "token_out": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "rate": "2951108576",
      "protocol_id": "3",
      "pool_address": "0xb2cc224c1c9fee385f8ad6a55b4d94e92359dc59",
      "swap_type": 0,
      "extra_data": "0x0064"
    }
  ],
  "router_address": "0x274602a953847d807231d2370072f5f4e4594b44",
  "meta": {
    "apiVersion": "2.0",
    "timestamp": "2026-01-24T21:46:40.000Z"
  }
}

Overview

The Calldata V2 endpoint generates transaction calldata for executing a swap using a pre-calculated route. This endpoint is useful when you already have a route from the /v2/route endpoint and want to generate the execution calldata with specific slippage and destination parameters. Currently available on EVM networks.
V2 API is currently available on EVM networks. V1 endpoints remain available for backward compatibility.

Endpoint

https://api.fibrous.finance/{network}/v2/calldata
Generate transaction calldata for executing a swap using a pre-calculated route. This endpoint is useful when you already have a route and want to generate calldata with different slippage or destination parameters.

Request Body Parameters

route
object
required
The complete route response object from the /v2/route endpoint. This contains all the necessary information about the optimal route.
slippage
number
required
Maximum acceptable slippage percentage (0-49, e.g., 0.5 for 0.5%).
destination
string
required
Recipient address for the output tokens.
API Key Required: Integrator features (integratorAddress, integratorFeePercentageBps or integratorSurplusPercentageBps) require an API key. Partners must obtain an API key from Fibrous to use these monetization features. Include the API key in the request headers as X-API-Key.

Response

route
object
Route information for the calldata.
swap_parameters
array
Array of swap parameters for each hop in the route.
router_address
string
Router contract address for executing the swap.
meta
object
required
API metadata including version and timestamp.
curl -X POST "https://api.fibrous.finance/{network}/v2/calldata" \
  -H "Content-Type: application/json" \
  -d '{
    "route": {
      "success": true,
      "routeSwapType": 0,
      "inputToken": {
        "name": "Wrapped Ether",
        "address": "0x4200000000000000000000000000000000000006",
        "decimals": 18,
        "price": 2949.717076112869
      },
      "inputAmount": "1000000000000000000",
      "outputToken": {
        "name": "USD Coin",
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "decimals": 6,
        "price": 0.999597487941284
      },
      "outputAmount": "2951108576",
      "route": []
    },
    "slippage": 0.5,
    "destination": "0x1234567890123456789012345678901234567890"
  }'
{
  "route": {
    "token_in": "0x4200000000000000000000000000000000000006",
    "token_out": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "amount_in": "1000000000000000000",
    "amount_out": "2951108576",
    "min_received": "2936407033",
    "destination": "0x1234567890123456789012345678901234567890",
    "swap_type": 0
  },
  "swap_parameters": [
    {
      "token_in": "0x4200000000000000000000000000000000000006",
      "token_out": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "rate": "2951108576",
      "protocol_id": "3",
      "pool_address": "0xb2cc224c1c9fee385f8ad6a55b4d94e92359dc59",
      "swap_type": 0,
      "extra_data": "0x0064"
    }
  ],
  "router_address": "0x274602a953847d807231d2370072f5f4e4594b44",
  "meta": {
    "apiVersion": "2.0",
    "timestamp": "2026-01-24T21:46:40.000Z"
  }
}