Prefer to watch a video or see a code demo instead? Jump to 0x Videos or 0x Code Examples.
Swap API is a professional-grade DEX aggregation and smart order routing API that lets you add crypto trading with a single API. It sources the best real-time prices from 150+ public and private liquidity providers across supported chains.
Want to build a gasless trading app? Check out Gasless API instead.
Swap API is designed to protect your users, streamline integration for developers, and unlock new revenue opportunities for your team.
Run the request below to get a live quote for selling 100,000 WETH for DAI:
You’ll receive an unsigned Ethereum transaction that can be signed and submitted directly to a node. Learn more about the response parameters in the API docs.
Swap API is a professional-grade DEX aggregator and smart order-routing API. It pulls prices from 150+ liquidity sources—both public AMMs and private market makers—across multiple blockchains to return the best executable price.
Below is a high-level diagram showing how Swap API works under the hood:

For more details about how 0x orders are executed, check out How does 0x work?
Under the hood, Swap API performs a series of tasks:
/swap similarly helps you find the best price across DeFi liquidity sources.Swap API supports multiple blockchain networks. Refer to the Supported Chains page for the full list of currently supported networks and chain IDs.
Create an account and get live API keys on the 0x Dashboard.