For Agents
Get the best swap price and an executable transaction across DEX liquidity on Ethereum and other EVM chains, including gasless trading flows.
Get started with 0x API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"swap ERC-20 tokens at the best price"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with 0x API API.
Fetch the best indicative price for an ERC-20 token swap via /swap/permit2/price
Generate a signable swap transaction with calldata through /swap/permit2/quote
Run swaps using the Allowance Holder pattern via /swap/allowance-holder/price and /quote
Quote and submit gasless trades through /gasless/price, /gasless/quote, and /gasless/submit
GET STARTED
Use for: Get the best price to swap USDC for ETH on Ethereum, I need to execute a token swap using the Permit2 flow, Quote a gasless trade so the user does not need ETH for gas, Check the status of a submitted gasless 0x trade
Not supported: Does not handle fiat on-ramps, custody, or non-EVM chains — use for ERC-20 swap quoting and gasless trade relaying only.
Jentic publishes the only available OpenAPI specification for 0x API, keeping it validated and agent-ready.
The 0x API v2 aggregates liquidity from on-chain DEXs and off-chain market makers across Ethereum and dozens of other EVM chains, returning the best executable price and a ready-to-sign transaction for a token swap. Two flavours are exposed: an Allowance Holder flow that uses a single approval contract, and a Permit2 flow that signs token allowances per trade. A separate Gasless endpoint set lets users trade without holding the native gas token by relaying signed messages. Designed for wallets, trading bots, and DeFi front ends that need consistent best-of-route pricing.
Track the status of a relayed gasless trade by tradeHash with /gasless/status/{tradeHash}
Inspect which liquidity sources contributed to a quote via /sources
Patterns agents use 0x API API for, with concrete tasks.
★ Token swap in a wallet or trading agent
Power the swap tab of a self-custodial wallet or an automated trading agent by quoting and executing ERC-20 swaps across aggregated liquidity. /swap/permit2/price returns the indicative rate and gas estimate, /swap/permit2/quote returns the calldata that the wallet signs and broadcasts. The aggregated routing across Uniswap, Curve, and major market makers usually produces a better fill than calling a single DEX directly.
Call /swap/permit2/quote with sellToken=USDC, buyToken=WETH, sellAmount=1000000000 and chainId=1, then return the to, data, and value fields ready for signing.
Gasless trading for new users
Let users swap tokens even when their wallet has zero native gas balance. The /gasless/quote endpoint returns a meta-transaction the user signs, /gasless/submit relays it through 0x's network, and /gasless/status/{tradeHash} reports settlement. This removes the most common onboarding failure in DeFi (user has stablecoin but no ETH) and is suitable for fintech wallets and onboarding flows.
Get a /gasless/quote for sellToken=USDC and buyToken=DAI, have the user sign the EIP-712 payload, submit via /gasless/submit, then poll /gasless/status/{tradeHash} until status=succeeded.
Liquidity routing analytics
Build a dashboard showing where 0x is sourcing liquidity for given pairs by combining /sources with periodic /price calls. Useful for treasuries, DEX research, and DeFi monitoring tools that want to know whether a quote came from an on-chain pool, an RFQ market maker, or a hybrid route. Helps explain slippage and prove best-execution to compliance.
Call /sources?chainId=1 to list active sources, then /swap/permit2/price for WETH→USDC and parse the route field to attribute fill share to each source.
Agent integration via Jentic
Give a DeFi agent a typed swap tool that returns ready-to-sign transactions instead of expecting it to assemble calldata from raw on-chain calls. Through Jentic the agent loads the /swap/permit2/quote schema, supplies sellToken, buyToken, and amount, and receives back the transaction object. The 0x API key sits in the Jentic vault and is injected at execution.
Search Jentic for 'swap tokens on Ethereum', load /swap/permit2/quote, and execute it with sellToken=DAI, buyToken=WETH, sellAmount=500000000000000000000.
10 endpoints — the 0x api v2 aggregates liquidity from on-chain dexs and off-chain market makers across ethereum and dozens of other evm chains, returning the best executable price and a ready-to-sign transaction for a token swap.
METHOD
PATH
DESCRIPTION
/swap/permit2/price
Indicative swap price using Permit2
/swap/permit2/quote
Executable swap transaction using Permit2
/swap/allowance-holder/price
Indicative swap price using Allowance Holder
/swap/allowance-holder/quote
Executable swap transaction using Allowance Holder
/gasless/quote
Quote a gasless meta-transaction swap
/gasless/submit
Submit a signed gasless trade for relaying
/gasless/status/{tradeHash}
Check settlement status of a gasless trade
/swap/permit2/price
Indicative swap price using Permit2
/swap/permit2/quote
Executable swap transaction using Permit2
/swap/allowance-holder/price
Indicative swap price using Allowance Holder
/swap/allowance-holder/quote
Executable swap transaction using Allowance Holder
/gasless/quote
Quote a gasless meta-transaction swap
Three things that make agents converge on Jentic-routed access.
Credential isolation
The 0x-api-key is stored encrypted in the Jentic vault. Agents call swap operations without the key ever appearing in their context, and Jentic can rotate the key without redeploying the agent.
Intent-based discovery
Agents search by intent (e.g. 'swap USDC for ETH at the best price') and Jentic returns the matching 0x operation — Permit2 quote, Allowance Holder quote, or gasless quote — with required parameters, so the agent does not have to choose between flows manually.
Time to first call
Direct 0x integration: 2-3 days for Permit2 signing, allowance handling, and gasless polling. Through Jentic: under 1 hour — search, load, execute.
Alternatives and complements available in the Jentic catalogue.
Uniswap API
Single-DEX swap routing on Uniswap pools instead of cross-aggregator routing
Choose Uniswap when the trade is small and Uniswap pool depth is sufficient; choose 0x when an agent needs aggregated liquidity across many sources.
Alchemy API
Underlying RPC and on-chain data provider used to broadcast 0x swap transactions
Pair Alchemy with 0x when the agent needs to broadcast the signed swap and read on-chain state; 0x produces the calldata, Alchemy submits it.
CoinGecko API
Market reference prices to compare against 0x quotes for slippage analysis
Use CoinGecko for indicative spot prices and 0x for the executable on-chain price including slippage and fees.
Specific to using 0x API API through Jentic.
What authentication does the 0x API use?
The 0x API uses an API key passed in the 0x-api-key header. Keys are issued from the 0x dashboard at 0x.org and tier-rate-limited. When the API is called through Jentic the key is held in the Jentic vault and injected into the request, so it never enters the agent's prompt context.
What is the difference between the Permit2 and Allowance Holder swap flows?
The Allowance Holder flow uses a single contract approval that the user grants once, while the Permit2 flow uses signed permissions per trade so the user does not have to send a separate approval transaction. Permit2 is recommended for new integrations; Allowance Holder remains supported via /swap/allowance-holder/price and /swap/allowance-holder/quote.
How do gasless trades work on the 0x API?
Call /gasless/quote to get a signable meta-transaction, have the user sign it, then submit via /gasless/submit. 0x relays the signed message and pays the gas, deducting it from the user's swap proceeds. Use /gasless/status/{tradeHash} to track settlement.
What are the rate limits for the 0x API?
Free-tier keys are limited to a small number of requests per second; paid tiers raise the limit. The exact number is shown on the 0x dashboard against your key. Quote endpoints are more expensive than price endpoints, so cache /swap/permit2/price responses where possible.
How do I execute a token swap through Jentic?
Search Jentic for 'swap tokens on Ethereum', load the /swap/permit2/quote operation, and execute it with sellToken, buyToken, sellAmount, and chainId. The response contains the to, data, value, and gas fields, which the agent passes to a wallet for signing and broadcasting.
Which chains does the 0x API support?
0x API v2 supports Ethereum mainnet plus dozens of EVM chains including Polygon, Arbitrum, Optimism, Base, BNB Chain, and Avalanche. Pass the target network via the chainId parameter on every request — the same endpoints work across all supported chains.
/gasless/submit
Submit a signed gasless trade for relaying
/gasless/status/{tradeHash}
Check settlement status of a gasless trade