Access all DEX liquidity through one API Easily integrate with 0x API once to aggregate liquidity from 0x Mesh, Kyber, Uniswap, and more and swap tokens at the best price.
Focus on your product. Let 0x find the best prices. Our smart order routing splits up your transaction across decentralized exchange networks to be filled with the lowest slippage possible.
Swap tokens with a few lines of code Automatically create orders that can be passed directly through your smart contracts to be settled on-chain. -- Fetch Quotes -- Create Market & Limit Orders -- Swap Arbitrary Tokens
0x API’s /swap endpoint facilitates consuming the best-priced liquidity from the greater DEX ecosystem, including on-chain and off-chain liquidity networks. Under the hood, the API performs three tasks:
- Queries prices from multiple DEXs and market makers and aggregates the liquidity from the queried sources to provide the best price possible. Think of how Google flights aggregates flight prices for a certain time and date to help you find the best price, /swap similarly helps you find the best price across DeFi liquidity sources.
- 0x API’s smart order routing algorithm splits up your transaction across different sources to maximize the overall return on your swap. Read more about smart order routing here.
- API responses are returned in a format that can be easily executed using the Web3 library of your choice