Skip to content

SDKs

PancakeSwap publishes a set of TypeScript packages under @pancakeswap/* for integrators who want to interact with the protocol programmatically.

Packages

PackageVersionDescription
@pancakeswap/smart-router7.6.0Best-route finder across V2, V3, and Infinity pools
@pancakeswap/v3-sdk3.10.0Concentrated liquidity pool math and position management
@pancakeswap/v2-sdk1.2.0V2 AMM pairs, trades, and routing
@pancakeswap/infinity-sdk1.0.8Infinity pool interactions (CL + Bin)
@pancakeswap/swap-sdk-core1.6.0Core primitives — Token, CurrencyAmount, Fraction, Price
@pancakeswap/chains0.8.0Chain IDs, names, and network configuration
@pancakeswap/tokens0.8.0Pre-configured token objects for all supported chains
@pancakeswap/universal-router-sdk1.5.0Build calldata for the Universal Router
@pancakeswap/permit2-sdk1.2.0Permit2 allowance and signature-transfer helpers
@pancakeswap/price-api-sdk12.0.0Fetch token prices from the PancakeSwap price API
@pancakeswap/pcsx-sdk1.1.0Exclusive Dutch order (PancakeSwap X) trades

Typical integration stack

Most integrations that execute swaps use these packages together:

@pancakeswap/chains          — pick chain ID
@pancakeswap/tokens          — get token objects
@pancakeswap/swap-sdk-core   — build CurrencyAmount inputs
@pancakeswap/smart-router    — find best route + build calldata

For low-level pool math or position management, add @pancakeswap/v3-sdk or @pancakeswap/infinity-sdk.