0x API

Step-by-step guide for executing token swaps using the 0x API (Swap API v2 and Gasless API v2). Use this skill when a user wants to: swap tokens on any EVM chain (e.g. "swap 0.5 ETH for USDC on Arbitrum", "sell 1000 ARB and get a quote", "how much WBTC for 5000 USDC on Base"); do a gasless swap without holding ETH for gas; integrate 0x into a dApp in TypeScript or Python (permit2 flow, allowanceholder flow); use 0x with a Gnosis Safe or multisig wallet; migrate from 0x Swap v1 to v2; debug 0x API errors like INSUFFICIENT_ASSET_LIQUIDITY or allowance issues; or understand when to use AllowanceHolder vs Permit2. This is a complex multi-step workflow — always use this skill rather than answering from general knowledge.

0xproject 0ae83fe 12.4 KB Updated

File contents

0xproject/0x-ai/tree/main/skills/0x-api commit 0ae83fe43e

Frequently asked questions

npx skillmds@latest add 0xproject/0x-api