Skip to main content
GET

Endpoint

Generate the calldata required to execute a swap through the Fibrous’ router contract. This endpoint provides the raw transaction data that can be used to execute the swap directly through a Web3 provider.

Request Body Parameters

string
required
The complete response object from the /starknet/route endpoint. This contains all the necessary information about the optimal route.
string
required
The address of the input token.Example: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7" for ETH
string
required
The address of the output token.Example: "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8" for USDC
boolean
If true, the amount parameter represents the desired output amount instead of input amount. Default: false
boolean
If true, only direct swaps between the input and output tokens will be considered. Default: false
array[string]
Array of protocol names to exclude from routing. Default: []
number
required
Maximum acceptable slippage in percentage (0.1 to 49). Example: 0.5 for 0.5% slippage tolerance
string
required
The receiver address for the output token.

Response

RouteResponse
The complete response object from the /starknet/route endpoint. This contains all the necessary information about the optimal route.
string[]
The hex-encoded calldata to execute the swap through the router contract.

Response Types

Error Responses

Invalid Route

Invalid Slippage

Invalid Signer

Tips

  1. Always verify the min_received amount matches your expectations
  2. Check that the destination address is correct
  3. Consider gas costs when splitting across multiple protocols
  4. Store the route response before requesting calldata

Rate Limits

Please refer to our rate limiting documentation for details about request limits and quotas.