Introduction to 0x
Prefer to watch a video instead? Jump to 0x Videos.
What is 0x?
0x allows builders to embed swaps in their onchain apps. Tap into aggregated liquidity from 130+ sources, across 15+ EVM chains with the most efficient trade execution. Our suite of APIs has processed over 60M+ million transactions and $154B+ in volume from more than 9+ million users trading on apps like Matcha.xyz, Coinbase Wallet, Robinhood Wallet, Phantom, Metamask, Zerion, Zapper, and more.
Why use 0x?
At 0x, we believe all forms of value will eventually be tokenized and settle on-chain. But as more value becomes tokenized, liquidity becomes increasingly fragmented — across chains, across liquidity sources, and across protocols.
0x offers powerful APIs to simplify access to this fragmented liquidity:
- Swap API - The most efficient liquidity aggregator for ERC20 tokens through a single API.
- Gasless API - Never lose a user trade because of gas. Easily build frictionless apps with end-to-end gasless infra.
- Trade Analytics API - Programatically access historical trades initiated through your apps via 0x Swap and Gasless APIs.
ELI5 0x
Just like Google Flights compares prices across airlines to help you find the best flight deal, 0x API scans multiple decentralized exchanges to get you the best price when trading tokens. Instead of hopping between exchanges yourself, 0x does the hard work for you — all through a simple API that developers can plug into their apps. It’s fast, secure, and saves you time and money by finding the best route.
The 0x Ecosystem
0x Tech Stack
0x’s professional-grade APIs are built on the 0x Settler, a secure, audited smart contract. Builders using these APIs are part of the growing 0x ecosystem.
Makers and Takers
Within the 0x Ecosystem, there are two sides to a trade - Makers and Takers:
Supply Side (Makers)
This is the entity who creates 0x orders and provides liquidity into the system for the Demand side (Takers) to consume. 0x aggregates liquidity from multiple sources including:
- On-chain liquidity - DEXs, AMMs (e.g. Uniswap, Curve, Bancor)
- Off-chain liquidity - Professional Market Makers, 0x's Open Orderbook network
Relevant Docs:
- Market Makers - Professional Market Making With Limit Orders
Demand Side (Takers)
Takers consume token liquidity from Makers. They are applications or agents that initiate trades using the 0x protocol. This includes:
- Wallets
- Portfolio trackers
- SocialFi platforms
- AI agents
- Token screeners
- And more
Relevant Docs:
- Swap API - The most efficient liquidity aggregator for ERC20 tokens through a single API.
- Gasless API - enable developers to build frictionless apps with end-to-end gasless infrastructure
How does 0x work?
Here's how a 0x order is created and settled:
- Order Creation: A Maker creates a 0x order, a JSON object that follows a standard format.
- Maker Signature: The Maker signs the order to cryptographically commit to it.
- Order Sharing: The order is shared with potential Takers:
- Directly (e.g., via an app)
- Or through the Open Orderbook if no counterparty is known
- Aggregation: 0x API aggregates liquidity across all supply sources and surfaces the best price.
- This is done using off-chain relay, on-chain settlement, saving gas and improving flexibility.
- Order Submissions: A Taker fills the order onchain by signing it and submitting it along with the fill amount.
- Order Settlement: The 0x Settler verifies the signature, checks trade conditions, and atomically swaps assets between Maker and Taker.
What can I build on 0x?
0x powers a wide variety of web3 applications. Whether you're building a product where trading is central — like an exchange — or adding seamless token swaps to an app where trading is just one feature, 0x makes it easy to plug in liquidity.
🔗 For more inspiration, check out this blog post and our case studies.
Demand-Side Use Cases (Takers)
Exchanges & Marketplaces
- Decentralized exchange for a specific asset or vertical
- eBay-style marketplace for digital goods
- Over-the-counter (OTC) trading desk
Wallets & Interfaces
- Crypto wallets that support in-app token swaps
- Portfolio management dashboards
- Token screeners with built-in trade execution
DeFi Protocols
- Options, lending, and derivatives platforms needing deep liquidity
- Investment strategies like DeFi index funds or DCA (dollar-cost averaging) tools
- Prediction markets
Social & Consumer Apps
- SocialFi platforms with embedded token swaps
- Games with in-game currencies or tradable items
- NFT marketplaces
Data & Analytics
- Multi-chain analytics dashboards
- Real-time trade panels
Agents & Automation
- AI agents or bots that interact with DeFi
- On-chain automation or smart contract wallets
Supply-Side Integrations (Makers)
Liquidity Sources
- On-chain order books
- Automated market makers (AMMs)
- Proprietary market-making or arbitrage bots