LLMs.txt: agent-readable Markdown index of this site at /llms.txt
POSTClaim LP position fees

Claim LP position fees

Claims accumulated trading fees from a V3 or V4 LP position. If simulateTransaction is set to true, the response will include the gas fee for the claim transaction.

Note: V2 positions do not have claimable fees. V2 trading fees are automatically added to your LP token balance.

npx skills add uniswap/uniswap-ai --skill liquidity-planner

Plan LP positions with deep links. Works with Claude Code, Cursor, and other AI coding tools.

Authorization

x-api-keystringrequiredheader
Playground key
You're using a shared playground keyCreate a free account and get your own API keys from the dashboard.
Get your keys

Body

application/json
protocolenumrequired
V2V3V4

The protocol of the pool.

walletAddressstringrequired
chainIdenumrequireddefault:1
1105613013714319632448018684217432646635042845310143421614222043114570735914481457777777713018453211155111

The unique ID of the blockchain. For a list of supported chains see the FAQ.

tokenIdstringrequired

The NFT token ID identifying the position.

simulateTransactionboolean

If true, the response will include the gas fee.

collectAsWethboolean

If true, native tokens will be collected as WETH instead of unwrapping to ETH.

Response

Claim fees successful.

requestIdstringrequired

A unique ID for the request.

token0objectrequired

A token with its address and amount, used in LP operations.

token1objectrequired

A token with its address and amount, used in LP operations.

claimobjectrequired
gasFeestring

The total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) in the base unit of the chain.