defi-swap
Get DEX swap quotes, price routes, and trade execution data across multiple chains. Use when asked about swapping tokens, best swap price, DEX aggregator quotes, token swap routes, trading on Uniswap/Jupiter/ParaSwap/1inch, slippage, or comparing swap rates across DEXes.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- defi-swap
- description
- Get DEX swap quotes, price routes, and trade execution data across multiple chains. Use when asked about swapping tokens, best swap price, DEX aggregator quotes, token swap routes, trading on Uniswap/Jupiter/ParaSwap/1inch, slippage, or comparing swap rates across DEXes.
02 资源文件 5
- 许可证LICENSE33.8 KB
- 参考文档references/evm-tokens.md4.4 KB
- 参考文档references/solana-tokens.md2.4 KB
- 参考文档SOURCE.md177 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
DeFi Swap
DEX swap quotes and routing across EVM chains and Solana using free aggregator APIs.
APIs
ParaSwap (Free, no auth)
Base: https://api.paraswap.io
Get swap quote (prices only, no tx data):
web_fetch url="https://api.paraswap.io/prices?srcToken=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&destToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&amount=1000000000000000000&srcDecimals=18&destDecimals=6&side=SELL&network=1"
Get transaction data (for execution):
exec command="curl -s -X POST 'https://api.paraswap.io/transactions/1' -H 'Content-Type: application/json' -d '{\"srcToken\":\"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\",\"destToken\":\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\"srcAmount\":\"1000000000000000000\",\"slippage\":100,\"userAddress\":\"0xUSER\",\"priceRoute\":PRICE_ROUTE_FROM_ABOVE}'"
Supported chains (network IDs):
| Chain | ID | Chain | ID |
|---|---|---|---|
| Ethereum | 1 | Arbitrum | 42161 |
| Optimism | 10 | Base | 8453 |
| Polygon | 137 | BSC | 56 |
| Avalanche | 43114 | Fantom | 250 |
Native token address (all EVM): 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
Jupiter / Solana (Free, no auth)
Base: https://quote-api.jup.ag/v6
Get swap quote:
web_fetch url="https://quote-api.jup.ag/v6/quote?inputMint=So11111111111111111111111111111111111111112&outputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=1000000000&slippageBps=50"
Get swap transaction (for execution):
exec command="curl -s -X POST 'https://quote-api.jup.ag/v6/swap' -H 'Content-Type: application/json' -d '{\"quoteResponse\":QUOTE_FROM_ABOVE,\"userPublicKey\":\"USER_PUBKEY\",\"wrapAndUnwrapSol\":true}'"
Token list (for mint address lookup):
web_fetch url="https://token.jup.ag/strict"
Uniswap Trading API (Requires API key)
Base: https://trade-api.gateway.uniswap.org/v1
Requires header
x-api-key: YOUR_API_KEY— get one at https://developers.uniswap.org/dashboard/
Check token approval:
exec command="curl -s -X POST 'https://trade-api.gateway.uniswap.org/v1/check_approval' -H 'Content-Type: application/json' -H 'x-api-key: YOUR_API_KEY' -d '{\"walletAddress\":\"0xUSER\",\"token\":\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\"amount\":\"1000000000\",\"chainId\":1}'"
Get swap quote:
exec command="curl -s -X POST 'https://trade-api.gateway.uniswap.org/v1/quote' -H 'Content-Type: application/json' -H 'x-api-key: YOUR_API_KEY' -d '{\"type\":\"EXACT_INPUT\",\"amount\":\"1000000000000000000\",\"tokenIn\":\"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\",\"tokenOut\":\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\"tokenInChainId\":1,\"tokenOutChainId\":1,\"swapper\":\"0xUSER\",\"slippageTolerance\":0.5}'"
Execute swap (gasful, on-chain):
exec command="curl -s -X POST 'https://trade-api.gateway.uniswap.org/v1/swap' -H 'Content-Type: application/json' -H 'x-api-key: YOUR_API_KEY' -d '{\"quote\":QUOTE_FROM_ABOVE,\"signature\":\"0xSIGNED_PERMIT2\",\"permitData\":PERMIT_DATA_FROM_QUOTE}'"
Execute swap (gasless, UniswapX):
exec command="curl -s -X POST 'https://trade-api.gateway.uniswap.org/v1/order' -H 'Content-Type: application/json' -H 'x-api-key: YOUR_API_KEY' -d '{\"quote\":QUOTE_FROM_ABOVE,\"signature\":\"0xSIGNED_ORDER\"}'"
Check swap status:
web_fetch url="https://trade-api.gateway.uniswap.org/v1/swaps?txHash=0xTX_HASH" headers="x-api-key: YOUR_API_KEY"
Supported chains (17+ mainnets):
| Chain | ID | Chain | ID |
|---|---|---|---|
| Ethereum | 1 | Arbitrum | 42161 |
| Optimism | 10 | Base | 8453 |
| Polygon | 137 | BSC | 56 |
| Avalanche | 43114 | zkSync | 324 |
| Blast | 81457 | Zora | 7777777 |
| Unichain | 130 | Celo | 42220 |
| Linea | 59144 | World Chain | 480 |
UniswapX gasless swaps available on: Ethereum (1), Arbitrum (42161), Base (8453), Unichain (130).
Native token address: 0x0000000000000000000000000000000000000000
1inch (Requires API key)
Base: https://api.1inch.dev/swap/v6.0/{chainId}
Get quote:
web_fetch url="https://api.1inch.dev/swap/v6.0/1/quote?src=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&dst=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&amount=1000000000000000000"
Requires header
Authorization: Bearer YOUR_API_KEY
0x / Matcha (Requires API key)
Get quote:
web_fetch url="https://api.0x.org/swap/v1/quote?buyToken=USDC&sellToken=ETH&sellAmount=1000000000000000000"
Requires header
0x-api-key: YOUR_KEY
Common Token Addresses
See references/evm-tokens.md and references/solana-tokens.md for full lists.
Quick Reference — Ethereum Mainnet
| Token | Address |
|---|---|
| WETH | 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 |
| USDC | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| USDT | 0xdAC17F958D2ee523a2206206994597C13D831ec7 |
| DAI | 0x6B175474E89094C44Da98b954EedeAC495271d0F |
| WBTC | 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599 |
Quick Reference — Solana
| Token | Mint |
|---|---|
| SOL (wrapped) | So11111111111111111111111111111111111111112 |
| USDC | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
| USDT | Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB |
External Tools (Optional)
- EVM MCP Server:
npx @mcpdotdirect/evm-mcp-server— swap execution across 60+ EVM chains - Solana Agent Kit:
github.com/sendaifun/solana-mcp— Solana swap execution via Jupiter
Usage Tips
- Always quote amounts in smallest unit (wei for ETH = 10^18, lamports for SOL = 10^9)
slippagein ParaSwap is basis points (100 = 1%). Jupiter usesslippageBps.- ParaSwap is best free option for EVM; Jupiter is best for Solana
- For price-only queries, use quote endpoints (no tx data needed)
- Compare ParaSwap vs 1inch quotes for best execution on large trades
- Native token address
0xEeee...is the same across all EVM chains in ParaSwap
04 同仓库更多 Skills
troves
Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.
trade
Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".
staking
Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.
send
Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".
portfolio
View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".
multi-swap
Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.