Create Liquidity
This endpoint creates liquidity for a liquidity pool
In: header
Optional provider for entering a liquidity pool. If not provided, Uniswap v3 will be used.
"UNISWAP_V3"
The wallet address (in hexadecimal format) that will provide the liquidity.
^0x[a-fA-F0-9]{40}$
The address (in hexadecimal format) receiving the token that represents the provided liquidity.
^0x[a-fA-F0-9]{40}$
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
Percentage fee applied to the transaction (e.g., 5 for 5%).
value <= 99.99
The token address (in hexadecimal format) used to pay the transaction fee.
^0x[a-fA-F0-9]{40}$
Defines how the fee will be paid: "ADD_TO_AMOUNT" adds it to the input amount, while "DEDUCT_FROM_AMOUNT" subtracts it from the input amount.
"ADD_TO_AMOUNT" | "DEDUCT_FROM_AMOUNT"
The address (in hexadecimal format) of one of the tokens of the pool.
^0x[a-fA-F0-9]{40}$
The address (in hexadecimal format) of the other token of the pool.
^0x[a-fA-F0-9]{40}$
Defines the fee earned by providing liquidity. Lower values are recommended for more stable tokens, while higher values are better suited for volatile assets. The values allowed depend on the provider, so check the provider docs too to know which fee tiers are allowed.
0.01 <= value <= 100
The amount of token0 to add to the liquidity pool, expressed as a decimal string.
The amount of token1 to add to the liquidity pool, expressed as a decimal string.
Minimum price the liquidity will be active. If the price goes below this, the liquidity won't be active and will generate no revenues. This will allow to concentrate the liquidity to a price range, thus enhancing the gains. Price is always p = token1 / token0
Maximum price the liquidity will be active. If the price goes above this, the liquidity won't be active and will generate no revenues. This will allow to concentrate the liquidity to a price range, thus enhancing the gains. Price is always p = token1 / token0
Optional parameter controlling the maximum deviation allowed of the expected price of a trade and the actual price at which the trade is executed, with a minimum value of 0.5 and a maximum value of 99, default is 0.5, where 1 unit equals 1%.
0.5
0.5 <= value <= 99
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/create" \
-H "Content-Type: application/json" \
-d '{
"walletAddress": "string",
"toAddress": "string",
"chainId": 0,
"payGasFeeToken": "string",
"gasFeePaymentMethod": "ADD_TO_AMOUNT",
"token0": "string",
"token1": "string",
"poolFeePercent": 0.01,
"token0Amount": "string",
"token1Amount": "string",
"minPrice": 0,
"maxPrice": 0
}'
const body = JSON.stringify({
"walletAddress": "string",
"toAddress": "string",
"chainId": 0,
"payGasFeeToken": "string",
"gasFeePaymentMethod": "ADD_TO_AMOUNT",
"token0": "string",
"token1": "string",
"poolFeePercent": 0.01,
"token0Amount": "string",
"token1Amount": "string",
"minPrice": 0,
"maxPrice": 0
})
fetch("https://api.notus.team/api/v1/liquidity/create", {
body
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.notus.team/api/v1/liquidity/create"
body := strings.NewReader(`{
"walletAddress": "string",
"toAddress": "string",
"chainId": 0,
"payGasFeeToken": "string",
"gasFeePaymentMethod": "ADD_TO_AMOUNT",
"token0": "string",
"token1": "string",
"poolFeePercent": 0.01,
"token0Amount": "string",
"token1Amount": "string",
"minPrice": 0,
"maxPrice": 0
}`)
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/create"
body = {
"walletAddress": "string",
"toAddress": "string",
"chainId": 0,
"payGasFeeToken": "string",
"gasFeePaymentMethod": "ADD_TO_AMOUNT",
"token0": "string",
"token1": "string",
"poolFeePercent": 0.01,
"token0Amount": "string",
"token1Amount": "string",
"minPrice": 0,
"maxPrice": 0
}
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("""{
"walletAddress": "string",
"toAddress": "string",
"chainId": 0,
"payGasFeeToken": "string",
"gasFeePaymentMethod": "ADD_TO_AMOUNT",
"token0": "string",
"token1": "string",
"poolFeePercent": 0.01,
"token0Amount": "string",
"token1Amount": "string",
"minPrice": 0,
"maxPrice": 0
}""");
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://api.notus.team/api/v1/liquidity/create"))
.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("""
{
"walletAddress": "string",
"toAddress": "string",
"chainId": 0,
"payGasFeeToken": "string",
"gasFeePaymentMethod": "ADD_TO_AMOUNT",
"token0": "string",
"token1": "string",
"poolFeePercent": 0.01,
"token0Amount": "string",
"token1Amount": "string",
"minPrice": 0,
"maxPrice": 0
}
""", Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.PostAsync("https://api.notus.team/api/v1/liquidity/create", 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": 404,
"id": "ACCOUNT_ABSTRACTION_ADDRESS_NOT_REGISTERED_WITH_PROJECT",
"message": "The requested wallet \"0x6e397ddf51d9f15dbe0414538e7529f51f2e5464\" is not registered with the project"
}
Collect fees from liquidity POST
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.
Get Liquidity Amounts GET
Get the amounts of tokens needed to provide liquidity to a pool based on the maximum you want to spend in one token. You can pass the max amount for both tokens and receive quotes for the two possible scenarios, this way you can check in a single call what option works based on the amounts your user has. E.g. your user wants to provide liquidity to the ETH-USDC pool, and they have 100 USDC and 100 ETH in their wallet. By passing both as the max amounts in `tokenXMaxAmount` you'll get two quotes. One telling how much ETH you need to provided if you send 100 USDC and another telling how much USDC you need to provide given 100 ETH. Then you can choose which one actually fits the liquidity your user has. **Note**: If only one of them is returned it means the price range is outside the current price, so only one token can be provided to create liquidity, the other will always be zero.