NEW
0x v2 Pricing Engine is live! — Best prices & trade execution

Embed swaps

in your

onchain app

smart wallet

portfolio tracker

DAO tooling

Access 7+ million tokens with liquidity from 130+ exchanges, with the best prices and the smoothest trading experience.

Battle-tested APIs for your onchain apps

Blazing fast!

<500ms

Median Response Time

Tx Relay API

99.82%

Uptime

Historical uptime for 0x services

Lowest in DeFi

4.4%

Revert Rates

521+

Projects powered by 0x APIs

See case studies ↗

71M+

Transactions

148B+

Volume USD

Tx Relay APITx Relay API

8M+

Unique wallets

Swap API

Swap

API

Turn any app into a trading platform

Power crypto trading for millions of tokens with the deepest aggregated liquidity.

Available on

Tx Relay API

Gasless

API

Say goodbye to “insufficient gas”

Never lose a user trade because of gas. Remove the biggest challenge in the trading funnel.

Available on

for thousands of tokens

Swap APITx Relay APIToken Registry API

Modular DeFi
solutions

Composable DeFi building blocks designed to work seamlessly together.

Keep track of what
matters to your business

Track revenue and usage trends

Track key trading and revenue metrics with in-depth charts and data from onchain trades.

Debug faster

Quickly review API usage and spot spikes in errors.

Spin up and manage apps

Create new apps in minutes and manage them all from your dashboard.

Data-driven insights and analytics

Gain actionable insights into user trading behavior in real-time.

Avg users swapped 3 times this month

Avg users swapped 3 times this month

Avg users swapped 3 times this month

Flexibility built-in

Add new products to each one of your apps with just one-click.

Self manage API keys

Instantly generate and manage API keys directly from the dashboard.

Seamless integration

Build your app in days, not months
with seamless app integration.

Here for the tech, but also
for the dev experience

Top-tier routing

Best-in-class liquidity aggregation and smart order routing. Try it live on Matcha.

Dev friendly

Fastest way to tap into 130+ exchanges.

Battle-tested since 2017

Secure and audited DEX infrastructure with 99.82% uptime.

Integrate in 5 minutes or less

Embed crypto trading in your app with just a few lines of code.

Play


const main = async () => {

	 const sellAmount = parseUnits("1000", await usdc.read.decimals());

  	// fetch quote
  	const quoteParams = new URLSearchParams({
  		chainId: client.chain.id.toString(),
    	sellToken: usdc.address,
    	buyToken: weth.address,
    	sellAmount: sellAmount.toString(),
      taker: client.account.address,
    });

  const quoteResponse = await fetch(
    "https://api.0x.org/swap/permit2/quote?" + quoteParams.toString(),
    {
      headers,
    }
  );

  const quote = await quoteResponse.json();
  console.log("Quote to swap 1000 USDC for WETH: ", quote);

}
main();

Play


const main = async () => {

	 const sellAmount = parseUnits("1000", await usdc.read.decimals());

  	// fetch quote
  	const quoteParams = new URLSearchParams({
  		chainId: client.chain.id.toString(),
    	sellToken: usdc.address,
    	buyToken: weth.address,
    	sellAmount: sellAmount.toString(),
      taker: client.account.address,
    });

  const quoteResponse = await fetch(
    "http://api.0x.org/gasless/quote?" + quoteParams.toString(),
    {
      headers,
    }
  );

  const quote = await quoteResponse.json();
  console.log("Quote to swap 1000 USDC for WETH: ", quote);

}
main();

Developer Guides

0x has one of the most extensive and reliable DEX API services in the Web3 ecosystem, backed by a professional and responsive team.

Sid Coelho-Prabhu

Coinbase Wallet

Sid Coelho-Prabhu, Sr. Director of
Product at Coinbase

Loved by our customers
and their users alike

Loved by

Frequently asked questions

How do I get started?

Get started in less than five minutes! To get started, simply create an account on the 0x Dashboard, choose a plan, set up your app, and generate your API keys.

How can I monetize my app with 0x?

0x offers two options for monetizing your order flow so you can build a sustainable Web3 business. You can set a percentage fee and a fee recipient on trades initiated within your application via Swap API requests. Additionally, you may take the positive slippage generated from your swaps. You can find details on both approaches in our API references.

What chains does 0x support?

0x supports Ethereum, Base, Arbitrum, Optimism, Polygon, Binance Smart Chain, Avalanche, Scroll, Linea and Blast.

What plans does 0x offer?

We offer two transparent, flexible tiers for Web3 businesses of all sizes. You can get started with them here. If you are a high volume app or have a unique business model, please contact us to discuss a custom plan.