{"uid":"cap_ioV2vnZ1rIkIJUj3biWwa","slug":"ozmium-uniswap-v3-lp-remove-fee-collect-80b8fab4","name":"Ozmium Uniswap V3 LP Remove / Fee Collect","description":"Uniswap V3 exit and fee-claim calldata: multicall([decreaseLiquidity?, collect, unwrapWETH9, sweepToken]). POST /v1/tx/lp/uni/remove { owner, tokenId, liquidity? }. liquidity 0 (or omitted) COLLECTS FEES ONLY - the claim path; any other value decreases first then collects. The WETH side is unwrapped back to native ETH rather than left as wrapped dust.","url":"https://ozmium.org/v1/tx/lp/uni/remove","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","properties":{}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"to":{"type":"string"},"data":{"type":"string"},"value":{"type":"string"}}}},"network":{"type":"string"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wAtHYgRmo76L1LKFMrFqQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates Uniswap V3 exit and fee-claim calldata (multicall of decreaseLiquidity, collect, unwrapWETH9, sweepToken) to remove liquidity or collect fees from a V3 position, unwrapping WETH to native ETH.","exampleAgentPrompt":"Generate the calldata to remove all my liquidity from Uniswap V3 position token ID 12345 — my wallet is 0xAbC...123 — and make sure the WETH gets unwrapped back to ETH.","exampleUseCases":[{"title":"Full exit from Uniswap V3 position","prompt":"I want to fully exit my Uniswap V3 LP position — token ID 99876, my wallet is 0xDe4...beef. Generate the calldata to pull all liquidity and unwrap any WETH back to ETH."},{"title":"Collect fees only without removing liquidity","prompt":"I just want to harvest the trading fees from my Uniswap V3 position token ID 54321 without actually removing any of my liquidity. My owner address is 0xFa9...321 — give me the calldata for a fees-only collect."},{"title":"Partial liquidity decrease on Uni V3","prompt":"Reduce my Uniswap V3 position token ID 77001 by exactly 5000000000000000 units of liquidity — owner is 0xB00...c0de — and give me the multicall transaction to do it with WETH unwrapped to native ETH."}],"resultDescription":"Returns an array of transaction steps (to, data, value) forming a multicall that encodes decreaseLiquidity (if liquidity > 0), collect, unwrapWETH9, and sweepToken calls, along with the target network identifier. The agent submits these steps on-chain to withdraw liquidity and/or collect accrued fees, receiving native ETH instead of wrapped WETH.","failureModes":["Invalid or non-existent tokenId returns an error or empty calldata","Owner address does not match the NFT owner — transaction will revert on-chain","Liquidity value exceeds position's available liquidity — on-chain revert","Malformed owner address (not a valid EVM address) causes a 400-level error","Zero liquidity with no accrued fees still generates a collect call but yields zero tokens","Network mismatch between the position chain and expected network may produce invalid calldata"],"whenToPreferThis":"Use this endpoint when an agent needs to generate ready-to-submit Uniswap V3 remove-liquidity or fee-collection calldata without constructing the multicall manually. It is the right choice when the position uses WETH (ensuring automatic unwrap to native ETH) and when you need a single bundled multicall rather than separate contract calls. Prefer this over generic swap or transfer endpoints when the goal is LP position management specifically on Uniswap V3.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:49:53.001Z","isFirstParty":false}