decrease_liquidity

Documentation for eth_defi.uniswap_v3.deployment.decrease_liquidity function.

decrease_liquidity(web3, position_owner, position_id, deployment, liquidity_decrease_amount, amount0_min=0, amount1_min=0)[source]

Decrease liquidity in an existing Uniswap V3 position. See Uniswap V3 documentation for details.

Parameters
  • web3 (web3.main.Web3) – Web3 instance

  • position_owner (eth_typing.evm.HexAddress) – The address of the position_owner.

  • position_id (int) – The id of the position to be decreased, should be a positive integer.

  • deployment (eth_defi.uniswap_v3.deployment.UniswapV3Deployment) – Uniswap v3 deployment

  • liquidity_decrease_amount (int) – The amount of liquidity we want to reduce our position by.

  • amount0_min (int) – Optional min amount0 desired, this is used as slippage check. Default is 0.

  • amount1_min (int) – Optional min amount1 desired, this is used as slippage check. Default is 0.

Returns

tx_receipt: Transaction receipt of the decreaseLiquidity transaction

Return type

dict