# 0x Docs > Developer documentation for the 0x API. Embed swaps in your onchain app. Access 10+ million tokens with liquidity from 150+ exchanges with a single API. ## Instructions for AI Agents - For clean Markdown of any page, append `.md` to the page URL - For section-specific indexes, append `/llms.txt` to any section URL - For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.0x.org/_mcp/server ## Docs - [0x Docs](https://docs.0x.org/docs/introduction/welcome.md) - [Create a 0x API Key](https://docs.0x.org/docs/introduction/quickstart/getting-started.md): Set up an account on the [0x Dashboard](https://dashboard.0x.org/apps), get an API key, manage your apps, tap into more developer resources. - [Get Started with Swap API](https://docs.0x.org/docs/introduction/quickstart/swap-tokens-with-0x-swap-api.md): Learn how to send your first Swap API (AllowanceHolder) request. - [Using AI with 0x](https://docs.0x.org/docs/introduction/develop-with-ai/using-ai-with-0x.md): Use built-in AI integrations and copy options in 0x Docs to work efficiently with LLMs - [0x Agent Skills](https://docs.0x.org/docs/introduction/develop-with-ai/agent-skills.md): Give your AI coding agent full knowledge of the 0x APIs with a single command. - [0x CLI](https://docs.0x.org/docs/introduction/develop-with-ai/0x-cli.md): Trade tokens across EVM chains and Solana from your terminal — built for both human traders and AI agents. - [MCP Server Setup](https://docs.0x.org/docs/introduction/develop-with-ai/mcp-setup.md): Connect AI tools to 0x documentation for an enhanced development experience. - [Autonomous Agent Payments](https://docs.0x.org/docs/introduction/develop-with-ai/autonomous-agent-payments.md): Access 0x swap APIs from AI agents using per-request USDC payments — no API keys required. Supports x402 (Base, Solana) and MPP via Tempo. - [AI Project Showcase](https://docs.0x.org/docs/introduction/develop-with-ai/ai-tools.md): Explore AI tools, SDKs, and consumer applications built using 0x. - [Supported Chains and Providers](https://docs.0x.org/docs/introduction/supported-chains.md): This page provides a list of chains and bridge providers supported by 0x APIs. - [FAQ](https://docs.0x.org/docs/introduction/faq.md): Common issues and troubleshooting tips for 0x APIs - [Issues & Error Codes](https://docs.0x.org/docs/introduction/api-issues.md): Learn about 0x API issues and error codes and how to resolve them. - [Support](https://docs.0x.org/docs/introduction/need-help.md): Need help with 0x? Explore documentation, AI tools, and direct support options. - [What is 0x?](https://docs.0x.org/docs/core-concepts/introduction-to-0x.md): Overview of how 0x works, the 0x APIs, and what you can build on 0x. - [0x Cheat Sheet](https://docs.0x.org/docs/core-concepts/0x-cheat-sheet.md): A resource for supported chains, example calls, contracts, and order types supported by 0x. - [Contracts](https://docs.0x.org/docs/core-concepts/contracts.md): Learn about 0x Settler, AllowanceHolder, and Permit2 contracts. - [Order Types](https://docs.0x.org/docs/core-concepts/order-types.md): Learn about 0x order types. - [Glossary](https://docs.0x.org/docs/core-concepts/glossary.md): A list of commonly encountered terms when developing with 0x - [White Paper](https://docs.0x.org/docs/core-concepts/white-paper.md): Read the original 0x white Paper. - [Access 0x Transaction Data](https://docs.0x.org/docs/core-concepts/transaction-data.md): Learn how to get transaction data via Trade Analytics API and 0x-parser. - [Bounties](https://docs.0x.org/docs/developer-resources/bounties.md) - [Rate Limits](https://docs.0x.org/docs/developer-resources/rate-limits.md): Understand how rate limits work for the 0x APIs - [Overview](https://docs.0x.org/docs/upgrading/overview.md) - [Upgrading to Swap API v2](https://docs.0x.org/docs/upgrading/upgrading-to-swap-v2.md): Learn how to upgrade to the latest version (v2) of Swap API. - [Upgrading to Gasless API v2](https://docs.0x.org/docs/upgrading/upgrading-to-gasless-v2.md): Learn how to upgrade to the latest version (v2) of Gasless API. - [Introduction](https://docs.0x.org/evm/0x-swap-api/introduction.md): Easily embed crypto trading in your app with Swap API - [Onchain Swaps for Exchanges](https://docs.0x.org/evm/0x-swap-api/guides/onchain-swaps-for-exchanges.md): Learn how centralized exchanges and institutions can integrate onchain trading using Swap API. - [Build a Token Swap App (AllowanceHolder)](https://docs.0x.org/evm/0x-swap-api/guides/build-token-swap-dapp-nextjs.md): Walkthrough how to build a Next.js with 0x Swap API - [Monetize Your App on EVM](https://docs.0x.org/evm/0x-swap-api/guides/monetize-your-app-using-swap.md): This guide covers how you can monetize your app by using the 0x Swap API. - [Troubleshooting Swap API](https://docs.0x.org/evm/0x-swap-api/guides/troubleshooting-swap-api.md): Addressing common issues that come up with Swap API. - [Get Started with Permit2 (Advanced)](https://docs.0x.org/evm/0x-swap-api/guides/permit2/swap-tokens-with-0x-swap-api-permit2.md): Advanced guide covering how to get started using 0x Swap API (Permit2) to securely swap ERC-20 tokens. - [Build a Token Swap App (Permit2)](https://docs.0x.org/evm/0x-swap-api/guides/permit2/build-token-swap-dapp-nextjs-permit2.md): Advanced guide covering how to build a token swap app using 0x Swap API (Permit2). - [Set Token Allowances](https://docs.0x.org/evm/0x-swap-api/additional-topics/how-to-set-your-token-allowances.md): Learn how to set token allowances when making swaps - [Handle Native Tokens](https://docs.0x.org/evm/0x-swap-api/additional-topics/handling-native-tokens.md): This guide explains how to properly handle native tokens properly in swaps. - [Display Final Swap Amounts](https://docs.0x.org/evm/0x-swap-api/additional-topics/0x-parser.md): This guide showcases how display final swapped amounts of a 0x transaction using the 0x-parser library. - [Sell Entire Balance](https://docs.0x.org/evm/0x-swap-api/additional-topics/sell-entire-balance.md): Learn how to use the sellEntireBalance parameter in the 0x Swap API to automatically sell a taker’s full token balance at execution time. - [Buy/Sell Tax Support](https://docs.0x.org/evm/0x-swap-api/additional-topics/buy-sell-tax-support.md): Learn best practices for how to implement 0x's buy/sell tax support. - [Multi-Fee Support](https://docs.0x.org/evm/0x-swap-api/additional-topics/multi-fee-support.md): Collect fees for multiple recipients in a single swap using the Swap and Gasless APIs. - [Swap and Send](https://docs.0x.org/evm/0x-swap-api/additional-topics/swap-and-send.md): Send swapped tokens directly to any address using the recipient parameter. - [Exact Buy (Exact Out)](https://docs.0x.org/evm/0x-swap-api/additional-topics/exact-buy.md): Guarantee an exact output amount (exact out) for your swap using the buyAmount parameter. - [RFQ System Overview](https://docs.0x.org/evm/0x-swap-api/additional-topics/about-the-rfq-system.md): Learn about 0x's RFQ liquidity, how it works, and how your project can apply to access it from the Swap API. - [Introduction](https://docs.0x.org/evm/gasless-api/introduction.md): Gasless API enables developers to build gasless swaps and approvals into their App and workflows. - [Get Started with Gasless API](https://docs.0x.org/evm/gasless-api/guides/get-started-with-gasless-api.md): Learn how to send your first Gasless API request. - [Understanding Gasless API](https://docs.0x.org/evm/gasless-api/guides/understanding-gasless-api.md): Learn how Gasless API works, key terms, and technical flow charts for how to implement in-app. - [Technical Appendix](https://docs.0x.org/evm/gasless-api/guides/gasless-api-technical-appendix.md): Learn how to sign the trade & approval objects, split signatures, submit, and compute the trade hash for a gasless trade. - [Introduction](https://docs.0x.org/evm/trade-analytics-api/introduction.md) - [Introduction](https://docs.0x.org/svm/solana-swap-api/introduction.md): Programmatic access to Solana DEX liquidity with ready-to-sign swap instructions for any app or wallet. - [Get Started](https://docs.0x.org/svm/solana-swap-api/guides/get-started-with-solana-swap-api.md): Learn how to use the 0x Solana Swap API endpoint to get a quote, build swap instructions, and send a swap transaction. - [Monetize Your App on Solana](https://docs.0x.org/svm/solana-swap-api/guides/monetize-your-app.md): This guide covers how you can monetize your app by using the 0x Solana Swap API. - [Important Integration Notes](https://docs.0x.org/svm/solana-swap-api/guides/important-integration-notes.md): Key differences in how the 0x Solana API returns swap instructions, and what integrators are responsible for handling. - [Integrator Byte Costs](https://docs.0x.org/svm/solana-swap-api/guides/integrator-byte-costs.md): A step-by-step guide to estimating byte costs for custom instructions added to a 0x Solana swap transaction. - [Best Practices to Add Solana to EVM Projects](https://docs.0x.org/svm/solana-swap-api/guides/evm-to-solana.md): Design patterns, integration tips, and architectural considerations for teams adding Solana (SVM) support to an existing EVM-based application. - [Troubleshooting](https://docs.0x.org/svm/solana-swap-api/troubleshooting.md): Common issues, error types, and debugging tips for the 0x Solana Swap API. - [Introduction](https://docs.0x.org/cross-chain/cross-chain-api/introduction.md): Programmatically access tokens across blockchains with the 0x Cross-Chain API. - [Get started](https://docs.0x.org/cross-chain/cross-chain-api/guides/get-started.md): Learn how to use the 0x Cross Chain API endpoint to get a quote, set allowance, and send a cross chain swap transaction. - [Cross Chain Swaps from Solana](https://docs.0x.org/cross-chain/cross-chain-api/guides/cross-chain-swaps-from-solana.md): Learn how to use the 0x Cross Chain API endpoint to get a quote and send a cross chain swap transaction from Solana. - [Cross Chain Swaps from Tron](https://docs.0x.org/cross-chain/cross-chain-api/guides/cross-chain-swaps-from-tron.md): Learn how to use the 0x Cross Chain API endpoint to get a quote and send a cross chain swap transaction from Tron. - [Cross Chain Swaps to HyperCore](https://docs.0x.org/cross-chain/cross-chain-api/guides/cross-chain-swaps-to-hypercore.md): Learn how to use the 0x Cross Chain API to bridge tokens from an EVM chain into HyperCore (Hyperliquid). - [Streaming Quotes](https://docs.0x.org/cross-chain/cross-chain-api/guides/streaming-quotes.md): Stream cross-chain quotes progressively via Server-Sent Events for faster, more responsive UX. - [Monetize Your App](https://docs.0x.org/cross-chain/cross-chain-api/guides/monetize-your-app.md): Collect a percentage-based fee on every cross-chain swap your users make. - [Tracking Transaction Status](https://docs.0x.org/cross-chain/cross-chain-api/key-concepts/tracking-transaction-status.md): Understand the status lifecycle of a cross-chain transaction returned by /status. - [Handling Failures and Recovery](https://docs.0x.org/cross-chain/cross-chain-api/key-concepts/handling-failures-and-recovery.md): What happens when a bridge fails, how recovery works, and what your integration should do for each scenario. - [Native Tokens Handling](https://docs.0x.org/cross-chain/cross-chain-api/key-concepts/native-tokens-handling.md): How native tokens (ETH, SOL, TRX) work in cross-chain swaps. - [Understanding Bridging Costs](https://docs.0x.org/cross-chain/cross-chain-api/key-concepts/understanding-bridging-costs.md): All the costs related to executing a cross-chain swap, and where each appears in the quote response. - [Troubleshooting](https://docs.0x.org/cross-chain/cross-chain-api/troubleshooting.md): Common issues, error types, and debugging tips for the 0x Cross Chain API. - [API Overview](https://docs.0x.org/api-reference/api-overview.md): Getting started with the 0x API - [Download OpenAPI Spec](https://docs.0x.org/api-reference/download-open-api-spec.md): Download the 0x OpenAPI 3.1 spec to import into Postman, generate SDKs, or use with AI coding tools - [Liquidity Integration Requests](https://docs.0x.org/liquidity-integration/liquidity-integrations.md): Liquidity Integration Request Forms - [Changelog](https://docs.0x.org/changelog.md): Stay updated on 0x API changes and new features ## API Docs - EVM APIs > Swap [getPrice (Allowance Holder)](https://docs.0x.org/api-reference/evm-ap-is/swap/allowanceholder-getprice.md) - EVM APIs > Swap [getQuote (Allowance Holder)](https://docs.0x.org/api-reference/evm-ap-is/swap/allowanceholder-getquote.md) - EVM APIs > Swap [getPrice (Permit2)](https://docs.0x.org/api-reference/evm-ap-is/swap/permit-2-getprice.md) - EVM APIs > Swap [getQuote (Permit2)](https://docs.0x.org/api-reference/evm-ap-is/swap/permit-2-getquote.md) - EVM APIs > Swap [getChains](https://docs.0x.org/api-reference/evm-ap-is/swap/chains.md) - EVM APIs > Gasless [getPrice](https://docs.0x.org/api-reference/evm-ap-is/gasless/getprice.md) - EVM APIs > Gasless [getQuote](https://docs.0x.org/api-reference/evm-ap-is/gasless/getquote.md) - EVM APIs > Gasless [submit](https://docs.0x.org/api-reference/evm-ap-is/gasless/submit.md) - EVM APIs > Gasless [getStatus](https://docs.0x.org/api-reference/evm-ap-is/gasless/getstatus.md) - EVM APIs > Gasless [getChains](https://docs.0x.org/api-reference/evm-ap-is/gasless/chains.md) - EVM APIs > Sources [getSources](https://docs.0x.org/api-reference/evm-ap-is/sources/getsources.md) - EVM APIs > Trade Analytics [getSwapTrades](https://docs.0x.org/api-reference/evm-ap-is/trade-analytics/trade-analytics-swap.md) - EVM APIs > Trade Analytics [getGaslessTrades](https://docs.0x.org/api-reference/evm-ap-is/trade-analytics/trade-analytics-gasless.md) - Solana Swap APIs > Sources [Get Enabled Sources](https://docs.0x.org/api-reference/solana-swap-ap-is/sources/enabled-sources.md) - Solana Swap APIs > Swap [Create Swap Instructions](https://docs.0x.org/api-reference/solana-swap-ap-is/swap/instructions.md) - Cross-Chain APIs > Cross Chain [getQuotes](https://docs.0x.org/api-reference/cross-chain-ap-is/cross-chain/cross-chain-get-quotes.md) - Cross-Chain APIs > Cross Chain [getStatus](https://docs.0x.org/api-reference/cross-chain-ap-is/cross-chain/cross-chain-get-status.md) - Cross-Chain APIs > Cross Chain [listSources](https://docs.0x.org/api-reference/cross-chain-ap-is/cross-chain/cross-chain-list-sources.md) - Cross-Chain APIs > Cross Chain [streamQuotes](https://docs.0x.org/api-reference/cross-chain-ap-is/cross-chain/cross-chain-stream-quotes.md) ## OpenAPI Specification The raw OpenAPI 3.1 specification for this API is available at: - [OpenAPI JSON](https://docs.0x.org/openapi.json) - [OpenAPI YAML](https://docs.0x.org/openapi.yaml)