Notus API
Liquidity pools

Collect fees from liquidity

Collects the fees received by the liquidty NFT. This will both create a user operation to be executed and will show how much will be collected, so you can choose if you really want to collect it or not. Always collects the full amount.

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

In: header

liquidityProvider?string

Optional provider for entering a liquidity pool. If not provided, Uniswap v3 will be used.

Value in"UNISWAP_V3"
chainIdnumber

The blockchain network where the liquidity will be provided. Supported chains:

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

ID of the NFT that represents the liquidity

walletAddressstring

The wallet address (in hexadecimal format) who owns the liquidity.

Match^0x[a-fA-F0-9]{40}$
payGasFeeTokenstring

The token address (in hexadecimal format) used to pay the transaction fee.

Match^0x[a-fA-F0-9]{40}$
metadata?object

Custom metadata for the transaction. Key-value pairs with string values. Max 1KB size.

Empty Object

Response Body

curl -X POST "https://api.notus.team/api/v1/liquidity/collect" \
  -H "Content-Type: application/json" \
  -d '{
    "chainId": 0,
    "nftId": "string",
    "walletAddress": "string",
    "payGasFeeToken": "string"
  }'
const body = JSON.stringify({
  "chainId": 0,
  "nftId": "string",
  "walletAddress": "string",
  "payGasFeeToken": "string"
})

fetch("https://api.notus.team/api/v1/liquidity/collect", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://api.notus.team/api/v1/liquidity/collect"
  body := strings.NewReader(`{
    "chainId": 0,
    "nftId": "string",
    "walletAddress": "string",
    "payGasFeeToken": "string"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.notus.team/api/v1/liquidity/collect"
body = {
  "chainId": 0,
  "nftId": "string",
  "walletAddress": "string",
  "payGasFeeToken": "string"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;

var body = BodyPublishers.ofString("""{
  "chainId": 0,
  "nftId": "string",
  "walletAddress": "string",
  "payGasFeeToken": "string"
}""");
HttpClient client = HttpClient.newBuilder()
  .connectTimeout(Duration.ofSeconds(10))
  .build();

HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
  .uri(URI.create("https://api.notus.team/api/v1/liquidity/collect"))
  .header("Content-Type", "application/json")
  .POST(body)
  .build();

try {
  HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
  System.out.println("Status code: " + response.statusCode());
  System.out.println("Response body: " + response.body());
} catch (Exception e) {
  e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;

var body = new StringContent("""
{
  "chainId": 0,
  "nftId": "string",
  "walletAddress": "string",
  "payGasFeeToken": "string"
}
""", Encoding.UTF8, "application/json");

var client = new HttpClient();
var response = await client.PostAsync("https://api.notus.team/api/v1/liquidity/collect", body);
var responseBody = await response.Content.ReadAsStringAsync();
{
  "operation": {
    "metadata": {
      "key": "value"
    },
    "userOperationHash": "0x2aac7a66d5331454eafc9b981be3596ad08a40dad24883e3b9c4a5362cd7f7e1",
    "walletAddress": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464",
    "expiresAt": "2025-10-26T13:27:49.542Z",
    "amounts": "7239.2",
    "chain": 42161,
    "liquidityProvider": "UNISWAP_V3",
    "nftAddress": "0xc36442b4a4522e871399cd717abdd847ab11fe88"
  }
}
{
  "statusCode": 400,
  "id": "NOT_AUTHORIZED_TOKENS",
  "message": "The tokens '[0x]' are not authorized yet."
}
{
  "statusCode": 403,
  "id": "UNAVAILABLE_COMPUTE_UNITS",
  "message": "The project doesn't have enough compute units to perform this action. Please upgrade your plan."
}
{
  "statusCode": 500,
  "id": "BLOCKCHAIN_ERROR",
  "message": "We had a problem fetching the data from the blockchain. If the problem persists, contact our support."
}