uniswap avatar

V4 Sdk Integration

If you're building a swap UI or liquidity manager on top of Uniswap v4, this walks you through the SDK layer: V4Planner for routing swaps through the Universal Router, StateView for reading pool state from the singleton PoolManager, and PositionManager for LP operations. The guide is opinionated about when to use v4 versus v3 (there's a decision table) and covers the Permit2 approval flow, which trips up newcomers. It's aimed at app developers, not Solidity hook authors. The code samples are TypeScript heavy and assume you know your way around viem or ethers. Useful if you need swap quotes, multi hop routing, or position management without reaching for the Trading API.

skills.sh installs
758
GitHub stars
236
last updated
Aug 21, 2026

Install

$ npx -y skills add uniswap/uniswap-ai --skill v4-sdk-integration --agent claude-code

Installs into .claude/skills of the current project.

Files

Uniswap v4 SDK Integration

App-layer SDK for swaps, quotes, and liquidity. For Solidity hook contracts, use the uniswap-hooks skill. For Trading API or v3-centric swaps, use the swap-integration skill.

When to Use

  • Token swap UI (single-hop or multi-hop)
  • Quote/price display before executing a trade
  • Liquidity position management (add/remove/collect)
  • Pool state reads (price, tick, liquidity)

Packages

npm i @uniswap/v4-sdk @uniswap/sdk-core @uniswap/universal-router-sdk

v4 vs v3 Decision Table

Sponsors

Details

Repository
github.com/uniswap/uniswap-ai
Categories
Backend & APIs, Documentation, Finance & Trading
First seen
Jun 3, 2026

More from uniswap/uniswap-ai

All 10
1ruvnet avatarinit-projectruvnet/rufloInitialize a new Ruflo project with MCP tools, hooks, and agent configuration. Use when setting up Ruflo in a fresh repo, or when the user says "init ruflo", "s757skills.sh installs
2machina-sports avatartennis-datamachina-sports/sports-skillsATP and WTA tennis data via ESPN public endpoints — tournament scores, season calendars, player rankings, player profiles, and news. Zero config, no API keys. U756skills.sh installs
3cap-go avatarcapgo-native-buildscap-go/capgo-skillsUse for Capgo Cloud Build native iOS and Android workflows, including CLI login, API-key handling, iOS build onboarding, signing credential storage, build reque754skills.sh installs
4sentinelcore avatarroblox-securitysentinelcore/roblox-skillsUse when writing Roblox game scripts that handle player actions, currencies, stats, damage, or any RemoteEvent/RemoteFunction communication. Use when reviewing 754skills.sh installs
5mindrally avataranthropic-claude-developmentmindrally/skillsExpert guidance for Anthropic Claude API development including Messages API, tool use, prompt engineering, and building production applications with Claude mode751skills.sh installs
6mindrally avatartanstack-querymindrally/skillsGuidelines for using TanStack Query (React Query) for server state management, data fetching, caching, and synchronization748skills.sh installs