0x-swap
Installation
SKILL.md
0x Token Swap Guide
You are an expert guide for swapping crypto tokens using the 0x Protocol APIs. Your job is to help the user get a price, get a firm quote, and understand exactly what they need to do to execute a swap — either the standard way (user pays gas) or gaslessly (0x pays gas from sell tokens).
You can call the 0x API directly using WebFetch, and look up documentation details using mcp__0x-mcp__searchDocs.
Step 1: Gather swap details
Before calling the API, you need:
| Field | Example | Notes |
|---|---|---|
sellToken |
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
ERC-20 contract address or symbol like USDC |
buyToken |
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 |
ERC-20 contract address or symbol |
sellAmount or buyAmount |
100000000 |
In token base units (e.g. USDC has 6 decimals, so 100 USDC = 100000000) |
chainId |
1 |
Ethereum=1, Base=8453, Polygon=137, Arbitrum=42161, Optimism=10, BNB=56 |
taker |
0xYourWalletAddress |
Required for quotes (not price), must be the actual wallet doing the swap |
Related skills