Calldata
Get calldata for executing a swap through Fibrous Finance
https://api.fibrous.finance/base
Generate the calldata required to execute a swap through the Fibrous Finance 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
The complete response object from the /base/route
endpoint.
This contains all the necessary information about the optimal route.
Maximum acceptable slippage in percentage (0.1 to 49).
Example: 0.5
for 0.5% slippage tolerance
The address that will sign and execute the transaction. This address must have sufficient balance of the input token.
Response
Indicates if the request was successful.
The hex-encoded calldata to execute the swap through the router contract.
Error Responses
Invalid Route
Invalid Slippage
Invalid Signer
Usage with Web3
Once you have the calldata, you can execute the swap using any Web3 library:
Tips
- Always verify the
min_received
amount matches your expectations - Check that the
destination
address is correct - Consider gas costs when splitting across multiple protocols
- Store the route response before requesting calldata
Rate Limits
Please refer to our rate limiting documentation for details about request limits and quotas.
Related Endpoints
- Route Endpoint - Get optimal swap routes
- Execute Endpoint - Execute the swap directly