Get Pool Details
Obtain metadata about the pool to show the user details about it. The pool can be in a broken state, like having nearly no liquidity. Use the data returned by this endpoint to asses if the pool is worth investing into.
curl -X GET "https://api.notus.team/api/v1/liquidity/pool?=%5Bobject+Object%5D"
fetch("https://api.notus.team/api/v1/liquidity/pool?=%5Bobject+Object%5D")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.notus.team/api/v1/liquidity/pool?=%5Bobject+Object%5D"
req, _ := http.NewRequest("GET", url, nil)
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/pool?=%5Bobject+Object%5D"
response = requests.request("GET", url)
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;
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://api.notus.team/api/v1/liquidity/pool?=%5Bobject+Object%5D"))
.GET()
.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 client = new HttpClient();
var response = await client.GetAsync("https://api.notus.team/api/v1/liquidity/pool?=%5Bobject+Object%5D");
var responseBody = await response.Content.ReadAsStringAsync();
{
"provider": {
"name": "XY",
"logoUrl": "https://assets.notus.team/Lifi.png",
"explorerURL": "https://explorer.li.fi"
},
"address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"chain": {
"id": 137,
"name": "POLYGON",
"logo": "https://polygonlogo.com"
},
"feeTier": 0.05,
"totalValueLockedUSD": "10000.453",
"tokens": [
{
"name": "Wrapped Bitcoin",
"symbol": "WBTC",
"decimals": 18,
"address": "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",
"logoURL": "https://assets.notus.team/wbtc.png"
}
],
"graph": [
{
"timestamp": 1678900000,
"feesUSD": "1000.2333",
"volumeUSD": "50000.76222",
"transactions": "100",
"open": "100200.36423",
"close": "98200.36423",
"high": "110000.36423",
"low": "95200.36423"
}
]
}
{
"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": "DB_API_FAILED",
"message": "We had a problem fetching the data from our metadata servers. If the problem persists, contact our support."
}
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.
List Liquidity Pools GET
List liquidity pools that exist on the blockchain. The pool can be in a broken state, like having nearly no liquidity. Use the data returned by this endpoint to asses if the pool is worth investing into.