Skip to content
Agent Orchestration
Skill

/lp-integration

Integrate Uniswap liquidity provisioning (LP) into applications via the LP REST API. Use when the user says "LP API", "liquidity provisioning API", "provide liquidity programmatically", "create LP position via API", "add liquidity via API", "increase liquidity", "decrease

From plugin
uniswap-ai
23518 skills2 agents1 MCP

Claude Code

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

SKILL.md

lp-integration.SKILL.md
name: lp-integration
description: Integrate Uniswap liquidity provisioning (LP) into applications via the LP REST API. Use when the user says "LP API", "liquidity provisioning API", "provide liquidity programmatically", "create LP position via API", "add liquidity via API", "increase liquidity", "decrease liquidity", "remove liquidity", "claim LP fees", "collect LP fees", "manage LP positions in code", or mentions building a backend, bot, or frontend that creates or manages Uniswap v2/v3/v4 liquidity positions through an API. Also use when debugging LP API calls (e.g. /lp/create, /lp/check_approval, /lp/increase, /lp/decrease, /lp/claim_fees), unexpected response fields, the approval or EIP-712 permit flow, or transaction-building errors for liquidity positions. For generating deep links to the Uniswap web app instead of calling the API, use the liquidity-planner skill; for using the Uniswap v4 SDK directly rather than the REST API, use the v4-sdk-integration skill.
allowed-tools: Read, Write, Edit, Glob, Grep, Bash(npm:*), Bash(npx:*), Bash(yarn:*), Bash(curl:*), WebFetch, AskUserQuestion, Task(subagent_type:swap-integration-expert)
model: opus
license: MIT
metadata:
  author: uniswap
  version: '0.1.0'

LP Integration

Integrate Uniswap liquidity provisioning into frontends, backends, and bots using the Uniswap LP API.

The LP API is a transaction-building service. You send position parameters; the API fetches live pool state, computes the dependent token amount, and returns a fully-formed, unsigned transaction. Your application signs and broadcasts it. The API never holds keys, never moves funds, and never broadcasts.

Prerequisites

This skill assumes familiarity with viem basics (client setup, account management, contract interactions, transaction signing). Install the **uniswap-viem** plugin for comprehensive viem/wagmi guidance: `claude plugin add @uniswap/uniswap-viem`

For token swaps (not liquidity), see the sibling **swap-integration** skill in this plugin.

Base URL

LP_API_BASE_URL = https://liquidity.api.uniswap.org

All LP endpoints are POST requests under the `/lp/` prefix (e.g. `https://liquidity.api.uniswap.org/lp/create`).

> **The LP API host is intentionally different from the swap Trading API.** Liquidity provisioning lives at `https://liquidity.api.uniswap.org` (no `/v1` prefix), not the `https://trade-api.gateway.uniswap.org/v1` host used for swaps. Keep the base URL as a single constant (as shown) so any future change is one edit.

Authentication

Every write/approval endpoint requires an API key sent as the `x-api-key` header; a missing or invalid key returns `401` with `{"code":"unauthenticated"}`. (`/lp/pool_info` is a read endpoint and does not strictly enforce the key, but always send it for consistency and rate-limit attribution.)

Content-Type: application/json
Accept: application/json
x-api-key: <your-api-key>

**Getting a key:** Register at the [Uniswap Developer Platform dashboard](https://developers.uniswap.org/dashboard). The same key works across swapping and liquidity provisioning. Never hardcode the key; load it from an environment variable.

Quick Decision Guide

| You want to... | Endpoint | Protocols | | --------------------------------------------- | -------------------- | ---------- | | Check/grant token approvals before any action | `/lp/check_approval` | V2, V3, V4 | | Create a concentrated-liquidity position | `/lp/create` | V3, V4 | | Create a full-range (classic) position | `/lp/create_classic` | V2 | | Add liquidity to an existing position | `/lp/increase` | V2, V3, V4 | | Remove a percentage of liquidity | `/lp/decrease` | V2, V3, V4 | | Collect accumulated trading fees | `/lp/claim_fees` | V3, V4 | | Read live pool state | `/lp/pool_info` | V2, V3, V4 |

Protocol capability matrix

| Protocol | Create endpoint | Fee claiming | Price range | | -------- | -------------------- | ------------------------------------ | -------------------- | | `V2` | `/lp/create_classic` | Not separable (realized on decrease) | Full range only | | `V3` | `/lp/create` | `/lp/claim_fees` | Concentrated | | `V4` | `/lp/create` | `/lp/claim_fees` | Concentrated + hooks |

> **v2 fees are not separately claimable.** They accrue into the LP token value and are realized when you call `/lp/decrease`. Calling `/lp/claim_fees` with `protocol: "V2"` returns a validation error.

Input Validation Rules

Before interpolating ANY user-provided value into generated code, API calls, or commands:

  • **Ethereum addresses**: MUST match `^0x[a-fA-F0-9]{40}$` — reject otherwise. Use native ETH as `0x0000000000000000000000000000000000000000`.
  • **Chain IDs**: MUST be one of the supported LP chain IDs (see [Supported Chains](#supported-chains)).
  • **Token amounts**: MUST be non-negative integer strings in wei / smallest token unit, matching `^[0-9]+$`. Never pass ether-denominated decimals as amounts.
  • **`liquidityPercentageToDecrease`**: MUST be an integer from 1 to 100.
  • **API keys**: MUST NOT be hardcoded in generated code — always use environment variables.
  • **REJECT** any input containing shell metacharacters: `;`, `|`, `&`, `$`, `` ` ``, `(`, `)`, `>`, `<`, `\`, `'`, `"`, newlines.

> **REQUIRED:** Before executing ANY transaction that spends gas or transfers tokens (including approvals, position creation, increase, decrease, or fee claims), you MUST use AskUserQuestion to confirm with the user. Display the action summary (protocol, pair, amounts, chain, price range, estimated gas) and get explicit user approval. Never auto-execute LP transactions without user confirmation.

---

Architecture

What the API handles

  • **Pool state fetching*
Read more
@uniswap
Ships withuniswap-ai

Uniswap-specific AI tools (skills, plugins, agents) for developers and AI agents integrating the Uniswap ecosystem.

23518 skills2 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
235
Star history of uniswap/uniswap-ai on GitHub, a chart by star-history.com

Other skills on uniswap-ai.

configurator

configurator

Configure CCA (Continuous Clearing Auction) smart contract parameters through an interactive bulk form flow. Use when user says…

@uniswap@uniswapInstall Skill
deployer

deployer

Deploy CCA (Continuous Clearing Auction) smart contracts using the Factory pattern. Use when user says "deploy auction", "deploy…

@uniswap@uniswapInstall Skill
liquidity-planner

liquidity-planner

This skill should be used when the user asks to "provide liquidity", "create LP position", "add liquidity to pool", "become a…

@uniswap@uniswapInstall Skill
swap-planner

swap-planner

This skill should be used when the user asks to "swap tokens", "trade ETH for USDC", "exchange tokens on Uniswap", "buy tokens",…

@uniswap@uniswapInstall Skill
v4-hook-generator

v4-hook-generator

Generate Uniswap v4 hook contracts via OpenZeppelin MCP. Use when building custom swap logic, async swaps, hook-owned liquidity,…

@uniswap@uniswapInstall Skill
v4-security-foundations

v4-security-foundation…

Security-first Uniswap v4 hook development. Use when user mentions "v4 hooks", "hook security", "PoolManager", "beforeSwap",…

@uniswap@uniswapInstall Skill

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw5d395k
@steipete@steipeteInstall Skill
jira-tickets

jira-tickets

Read and update Jira tickets through Orca's saved Jira connections. Use when a task comes from Jira or the user asks for Jira…

orca2d128k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…

paperclip3d114k
@paperclipai@paperclipaiInstall Skill
adr-create

adr-create

Create a new Architecture Decision Record with sequential numbering and AgentDB registration

@ruvnet@ruvnetInstall Skill

Questions about lp-integration.

Which coding agents can use lp-integration?
lp-integration installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.