How to monetize your app with 0x Swap API
Last updated: June 25, 2026
0x Swap API has built-in monetization, so you can earn revenue on the trades flowing through your app. Out of the box, there are two options: affiliate fees (a trading fee or commission), available on all pricing plans; and trade surplus (positive slippage), available to select integrators on custom plans.
This article explains both at a conceptual level. For exact parameters, response fields, and code, integrators should refer to the monetization guide in the docs.
1. Affiliate fees
An affiliate fee is a commission you collect on any trade made through your application. It's available on every plan — free or paid — and you can charge the fee on either the buyToken or the sellToken, which lets you aggregate your revenue into a few preferred tokens.
You set this up by passing three parameters in your Swap API request:
swapFeeRecipient— the wallet address that receives the fees. Supports a single address or multiple comma-separated addresses.swapFeeBps— the fee amount in basis points. The maximum is 1000 Bps (0–1000 Bps = 0–10%). If you need a higher limit, contact 0x support.swapFeeToken— the token the fee is collected in. This must be set to either thebuyTokenor thesellToken.
Do I need to register my fee wallet?
No. You use your own external EVM wallet address — 0x does not provision a recipient wallet or smart contract for your account. There's no dashboard configuration or registration step required before using the address; just include it in your API calls and you can start collecting fees immediately. Use any EVM wallet you control.
Splitting fees across multiple recipients
If you need to split fees — for example, between a platform treasury and a partner — you can pass comma-separated values for both swapFeeRecipient and swapFeeBps. The two lists must be the same length and are matched positionally (the first recipient gets the first Bps value, and so on).
Seeing the fee in the response
When swapFeeRecipient, swapFeeBps, and swapFeeToken are all set, the response returns a fees.integratorFee object with an amount property you can display to your end users. For multiple recipients, the response also includes a fees.integratorFees array. You're responsible for ensuring your users are aware of any fees you charge.
2. Trade surplus (positive slippage)
Trade surplus is the positive slippage that can occur when a trade executes at a better price than quoted. Instead of that surplus going back to the user by default, you can opt to collect it. Collecting trade surplus is only available to select integrators on a custom pricing plan — to set one up, contact support. Surplus is always denominated in the buyToken; if you want it in a different token, you'd handle that conversion yourself.
A note on the 0x fee
Separately from the fees you collect, 0x charges its own fee on certain trades depending on your plan. On the standard plan, 0x earns a 0.15% fee on swaps involving select token pairs. For current specifics, always check the 0x pricing page rather than relying on figures that may change.
Getting started
Affiliate fees require no setup beyond adding the parameters to your requests, so you can begin on any plan. For trade surplus or a higher fee cap, contact 0x support about a custom plan. Full implementation details and code samples live in the monetization guide.