Monetize crypto trading in your app with Swap API

Discover how you can leverage Swap API to unlock new revenue streams.

October 26, 2023

Learn & Build

As Web3 matures from small projects to robust businesses, companies are not only thinking about building the best experience but also how to generate revenue to sustainably invest in their technology and deliver the most value to users.

Swap API offers Web3 teams low-friction ways to monetize their products. With Swap API, you can unlock new revenue streams by easily tapping into swap fee features. Regardless of whether you’re on a free or paid plan, monetization options are available to all integrators.

Swap API enables your users to easily and conveniently trade tokens at the best prices directly in your app. With one simple integration, 0x unlocks thousands of tokens on the most popular blockchains and aggregated liquidity from 100+ AMMs and professional market makers.

In this guide, we will highlight the primary monetization option available through Swap API - collecting affiliate fees. We will also discuss pricing considerations and show code samples and a demo app for how to easily implement this option.

How to monetize trades

Swap API offers monetization options out-of-the-box.

Affiliate fees

Swap API integrators have the ability to collect an affiliate fee on all trades made through their app.

Pro tip: We recommend setting the fee in a way that strengthens your bottom line while aligning it with the value you provide to customers. Note that the addition of an affiliate fee will impact the price for the end user, so try finding a fee structure where pricing remains competitive while still generating revenue.

Setting up an affiliate fee is easy. Just include the following two parameters when making a Swap API request:

  • feeRecipient - The ETH address that should receive affiliate fees
  • buyTokenPercentageFee - The percentage of the buyAmount (tokens received by the user) that should be attributed to feeRecipient (your wallet) as affiliate fees. Denoted as a decimal between 0 - 1.0 where 1.0 represents 100%.

When the transaction has gone through, the fee amount will be sent to the feeRecipient address you've set. The fee is received in the buyToken (the token that the user will receive).

Demo

Want to see these monetization practices implemented in a live demo? Checkout this demo app to see how to implement collecting affiliate fees in practice:

Conclusion

With Swap API, you can easily power trading in your app. Access thousands of tokens on the most popular blockchains and monetize your users’ trading activity, all with one simple integration. 

Check out the full tutorial on how to monetize your app here.

New to 0x? Sign-up for an account on the 0x Dashboard to integrate and monetize swaps in your app today.

Contents

Subscribe to newsletter

By submitting you're confirming that you agree with our Terms and Conditions.
Yay! You’re signed up.
Oops! Something went wrong, but it's not your fault.

Up next