# Claim LP position fees (POST /lp/claim_fees)

Operation `claim_fees` of the Uniswap API. Base URL: `https://trade-api.gateway.uniswap.org/v1`.

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.

Parameters: 1 header, 6 body · Request: `application/json` · Auth: apiKey · Responses: 200, 400, 401, 404, 429, 500, 504

## Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `x-api-key` | string | yes | Your API key for authentication. |

## Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `protocol` | enum | yes | The protocol of the pool. |
| `walletAddress` | string | yes |  |
| `chainId` | enum | yes | The unique ID of the blockchain. For a list of supported chains see the [FAQ](https://api-docs.uniswap.org/guides/faqs). |
| `tokenId` | string | yes | The NFT token ID identifying the position. |
| `simulateTransaction` | boolean | no | If true, the response will include the gas fee. |
| `collectAsWeth` | boolean | no | If true, native tokens will be collected as WETH instead of unwrapping to ETH. |

## Responses

- `200` — Claim fees successful.
- `400` — RequestValidationError, Bad Input
- `401` — UnauthorizedError eg. Account is blocked.
- `404` — ResourceNotFound eg. Cant Find LP Position.
- `429` — Ratelimited
- `500` — Unexpected error
- `504` — Request duration limit reached.

Interactive playground: https://developers.uniswap.org/docs/api-reference/claim_fees
All endpoints: https://developers.uniswap.org/docs/api-reference
