Notus API
Liquidity pools

Rebalance a liquidity position with a new price range

Collects the entire position, swaps assets as needed, and mints a fresh Uniswap v3 position in the requested range.

POST
/api/v1/liquidity/rebalance
x-api-key<token>

In: header

liquidityProvider?string

Optional provider for the rebalance operation. Defaults to Uniswap v3 if omitted.

Value in"UNISWAP_V3"
walletAddressstring

Wallet that owns the liquidity position NFT.

toAddressstring

Address that will own the new liquidity position NFT.

chainIdnumber

Target blockchain for the rebalance operation. Supported EVM chains:

  • Arbitrum One: 42161
  • Avalanche: 43114
  • Base: 8453
  • BNB Smart Chain: 56
  • Ethereum: 1
  • Gnosis: 100
  • OP Mainnet: 10
  • Polygon: 137
  • X Layer Mainnet: 196
tokenIdstring

NFT token ID representing the current liquidity position.

newPositionobject

New price range for the liquidity position after rebalance.

slippage?number

Maximum tolerated slippage for the underlying swaps (1 unit = 1%).

Default0.5
Range0 <= value <= 99
transactionFeePercent?number

Custom project fee percent to apply over the rebalance notional.

Default0
Range0 <= value <= 99.99
extraFee?object

Optional extra fee configuration that is charged once during rebalance.

metadata?object

Empty Object

Response Body

curl -X POST "https://api.notus.team/api/v1/liquidity/rebalance" \  -H "Content-Type: application/json" \  -d '{    "walletAddress": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464",    "toAddress": "0x1337133713371337133713371337133713371337",    "chainId": 42161,    "tokenId": "1234567890",    "newPosition": {      "minPrice": 1200.12,      "maxPrice": 1800.34    }  }'
{
  "operation": {
    "liquidityProvider": "UNISWAP_V3",
    "walletAddress": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464",
    "toAddress": "0x1337133713371337133713371337133713371337",
    "chainId": 42161,
    "tokenId": "1234567890",
    "newPosition": {
      "minPrice": 1200.12,
      "maxPrice": 1800.34
    },
    "slippage": 1,
    "transactionFeePercent": 2.5,
    "extraFee": {
      "percentage": 1.5,
      "toAddress": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464"
    },
    "metadata": {
      "key": "value"
    }
  }
}
{
  "statusCode": 400,
  "id": "NOT_AUTHORIZED_TOKENS",
  "message": ""
}
{
  "statusCode": 403,
  "id": "UNAVAILABLE_COMPUTE_UNITS",
  "message": "The project doesn't have enough compute units to perform this action. Please upgrade your plan."
}
{
  "statusCode": 404,
  "id": "ACCOUNT_ABSTRACTION_ADDRESS_NOT_REGISTERED_WITH_PROJECT",
  "message": "The requested wallet \"0x6e397ddf51d9f15dbe0414538e7529f51f2e5464\" is not registered with the project"
}
{
  "statusCode": 500,
  "id": "BLOCKCHAIN_ERROR",
  "message": "We had a problem fetching the data from the blockchain. If the problem persists, contact our support."
}