swap-integration
Swap Integration
Integrate PancakeSwap swaps into frontends, backends, and smart contracts.
Quick Decision Guide
| Building... | Use This Method |
|---|---|
| Quick quote or prototype | PancakeSwap Routing API (Method 1) |
| Frontend with React/Next.js | Smart Router SDK + Universal Router (Method 2) |
| Backend script or trading bot | Smart Router SDK + Universal Router (Method 2) |
| Simple V2 swap, smart contract | Direct V2 Router contract calls (Method 3) |
| Need exact Universal Router encoding | Universal Router SDK directly (Method 2) |
| Swap through Infinity (v4) CL or Bin pools | Routing API (Method 1) or Smart Router SDK with Infinity pool types (Method 2) |
Protocol Types
| Protocol | Description | Fee Tiers (bps) | Chains |
|---|
More from pancakeswap/pancakeswap-ai
farming-planner
Plan yield farming and CAKE staking on PancakeSwap. Use when user says "farm on pancakeswap", "stake CAKE", "unstake CAKE", "stake LP", "unstake LP", "yield farming", "syrup pool", "pancakeswap farm", "earn CAKE", "farm APR", "harvest rewards", "deposit LP", "withdraw LP", or describes wanting to stake, unstake, or earn yield on PancakeSwap. Do NOT use this skill when the user has a token pair and asks how to earn yield or best profit with those tokens (prefer liquidity-planner instead).
83swap-planner
Plan and generate deep links for token swaps on PancakeSwap. Use when user says "swap on pancakeswap", "buy [token] with BNB", "pancakeswap swap", "I want to swap", "cross-chain swap", "bridge swap", or describes wanting to exchange tokens on PancakeSwap without writing code.
83liquidity-planner
Plan liquidity provision on PancakeSwap. Use when user says "add liquidity on pancakeswap", "provide liquidity", "LP on pancakeswap", or describes wanting to deposit tokens into liquidity pools without writing code. Also use when a user holds two tokens and asks how to earn yield, get best profit, or put tokens to work — especially on Solana or any chain where farming is unavailable.
80collect-fees
Check and collect LP fees from PancakeSwap V3 and Infinity (v4) positions. Use when user says "collect my fees", "claim LP fees", "how much fees have I earned", "pending fees", "uncollected fees", "/collect-fees", "harvest LP fees", or asks about fees from a specific token pair position.
65harvest-rewards
>
58hub-swap-planner
Plan swaps through PCS Hub and generate a channel-specific handoff link. Use when user says "swap via PCS Hub", "hub swap", "/hub-swap-planner", "swap via Binance Wallet", "swap via Trust Wallet", "find best PCS Hub route", or describes wanting to swap tokens through a specific partner channel or distribution interface.
57