Multi-Fee Support
The Swap and Gasless APIs support collecting fees for multiple recipients in a single transaction. This is useful for use cases like revenue sharing between a protocol and a frontend, splitting fees between partners, or distributing fees across multiple treasury addresses — all without requiring multiple transactions or custom contracts.
Overview
Both swapFeeRecipient and swapFeeBps accept comma-separated lists, allowing you to define multiple fee recipients, each with their own fee rate.
Each fee is:
- Collected in the
swapFeeToken(the buy token by default) - Delivered directly to the specified recipient address
- Reported individually in the response under
fees.integratorFees
Parameters
The wallet address(es) to receive trading fees. Accepts a single address or multiple comma-separated addresses.
Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045,0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359
When providing multiple values, the list must be the same length as swapFeeBps. You must also specify swapFeeBps to use this parameter.
The fee amount(s) in basis points (Bps) to charge per recipient. Accepts a single value or multiple comma-separated values.
Example: 5,10
When providing multiple values, the list must be the same length as swapFeeRecipient. The default maximum is 1000 Bps per recipient. Contact us if your integration requires a higher limit.
swapFeeRecipient and swapFeeBps are co-dependent — you must specify both
together. When using multiple fees, both lists must be the same length and
positionally matched (index 0 of swapFeeBps applies to index 0 of
swapFeeRecipient, and so on).
Example Request
The following examples split fees between two recipient addresses — 5 Bps to 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 and 10 Bps to 0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359.
Example Response
When multiple fees are configured, the response includes both the legacy integratorFee field (containing the first fee, for backwards compatibility) and the new integratorFees array (containing all fees):
fees.integratorFee is retained for backwards compatibility and always
reflects the first fee in the list. Use fees.integratorFees to access
the full breakdown of all fees.
Each entry in integratorFees corresponds positionally to the swapFeeRecipient and swapFeeBps values in your request: