Notus API
Liquidity pools

Get Pool Historical Data

Get detailed historical data for a specific pool including volume and fees over time

GET
/api/v1/liquidity/pools/{id}/historical-data
x-api-key<token>

In: header

Path Parameters

idstring

The unique identifier of the pool

Length1 <= length

Query Parameters

rangeInDays?integer

Number of days to look back for statistics (maximum 365 days)

Default30
Rangetrue < value <= 365
groupByInterval?string

Interval for grouping pool statistics. HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY

Default"DAILY"
Value in"HOURLY" | "DAILY" | "WEEKLY" | "MONTHLY" | "YEARLY"

Response Body

curl -X GET "https://api.notus.team/api/v1/liquidity/pools/string/historical-data?rangeInDays=30&groupByInterval=HOURLY"
fetch("https://api.notus.team/api/v1/liquidity/pools/string/historical-data?rangeInDays=30&groupByInterval=HOURLY")
package main

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

func main() {
  url := "https://api.notus.team/api/v1/liquidity/pools/string/historical-data?rangeInDays=30&groupByInterval=HOURLY"

  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/pools/string/historical-data?rangeInDays=30&groupByInterval=HOURLY"

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/pools/string/historical-data?rangeInDays=30&groupByInterval=HOURLY"))
  .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/pools/string/historical-data?rangeInDays=30&groupByInterval=HOURLY");
var responseBody = await response.Content.ReadAsStringAsync();
{
  "statistics": {
    "rangeInDays": 30,
    "groupByInterval": "DAILY",
    "poolId": "137-0x4CcD010148379ea531D6C587CfDd60180196F9b1",
    "items": [
      {
        "timestamp": 1678900000000,
        "volumeInUSD": "15000.50",
        "feesInUSD": "750.25",
        "closeInUSD": "0.00036046617504367228",
        "highInUSD": "0.00038494169673061318",
        "lowInUSD": "0.00035904368570694481",
        "totalValueLockedInUSD": "500000.75",
        "token0PriceInToken1": "1.25",
        "token1PriceInToken0": "1.25"
      }
    ]
  }
}
{
  "statusCode": 403,
  "id": "UNAVAILABLE_COMPUTE_UNITS",
  "message": "The project doesn't have enough compute units to perform this action. Please upgrade your plan."
}