Pool Aggregates (Bars)

Get pool aggregates returns real-time or historical candlestick bars for a liquidity pool.

Get Liquidity Pool Aggregates (Bars)

GET https://api.abyiss.com/v2/dex/{exchange}/{blockchain}/pool/{pool}/aggregate?timeframe={interval}

Returns an object of real-time or historical candlestick bars for a liquidity pool on a decentralized exchange.

Path Parameters

NameTypeDescription

exchange*

string

Decentralized exchange Id

blockchain*

string

Blockchain that supports the decentralized exchange.

pool*

string

Liquidity Pool contract address.

Query Parameters

NameTypeDescription

apiKey*

string

Your Abyiss API Key

limit

int

Number of results per request. Maximum 1,0000 (default 100)

orderBy

string

Sort the returned data by any field in the API response, such as id, name, symbol, volumeUSD and more.

orderDirection

string

asc or desc return the results sorted by that field in either ascending or descending order

skip

int

Number of results to skip per request.

interval*

string

Aggregate bar size. hour or day

to

int

The end of the aggregate time window for historical data. Unix timestamp in milliseconds.

from

int

The start of the aggregate time window for historical data. Unix timestamp in milliseconds.

{
    "timeframe": "day",
    "token0": {
        "name": "USD Coin",
        "id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "symbol": "USDC"
    },
    "token1": {
        "name": "Wrapped Ether",
        "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "symbol": "WETH"
    },
    "poolAggregates": [
        {
            "id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640-19457",
            "timestamp": 1681084800,
            "feeGrowthGlobal0X128": "2339213968916729531223096419274296",
            "feeGrowthGlobal1X128": "1124565708862364413358919226291694974818769",
            "feesUSD": "24570.19489506981696256671263525303",
            "o": "1861.229249917124425671059978055896",
            "h": "1866.129826859531905327345582770674",
            "l": "1849.588545028402903627911445772043",
            "c": "1861.229249917124425671059978055896",
            "volumeUSD": "49140389.79013963392513342527050604",
            "volumeToken0": "49134098.465595",
            "volumeToken1": "26424.102167136654514951",
            "token0Price": "1860.821468497617504272633341910774",
            "token1Price": "0.0005373970673325130686586439093719616",
            "liquidity": "28359865230079992268",
            "txCount": "1946",
            "tvlUSD": "445832755.5937852890879586310030789",
            "sqrtPrice": "1836653495884466183644038654704998",
            "tick": "201032"
        },
        {
            "id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640-19456",
            "timestamp": 1680998400,
            "feeGrowthGlobal0X128": "2339079716985510919254387473263998",
            "feeGrowthGlobal1X128": "1124493096642505157141501076316955741370453",
            "feesUSD": "97638.63554132466059685342601960951",
            "o": "1850.396710419790204337751969898761",
            "h": "1873.596532314986342851627620643428",
            "l": "1828.321888992128176916756588291294",
            "c": "1850.396710419790204337751969898761",
            "volumeUSD": "195277271.0826493211937068520392203",
            "volumeToken0": "195303846.783318",
            "volumeToken1": "105673.156917704060998814",
            "token0Price": "1861.217048228268273911189536461615",
            "token1Price": "0.0005372828499244196538466630433087226",
            "liquidity": "28271708994189162991",
            "txCount": "4708",
            "tvlUSD": "446136840.2157276077963775647371453",
            "sqrtPrice": "1836458305993924899300320848785481",
            "tick": "201030"
        }
    ]
}

Copy & Paste Code

curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day

Response Object

Example URL: https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day&apiKey=

{
    "timeframe": "day",
    "token0": {
        "name": "USD Coin",
        "id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "symbol": "USDC"
    },
    "token1": {
        "name": "Wrapped Ether",
        "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "symbol": "WETH"
    },
    "poolAggregates": [
        {
            "id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640-19457",
            "timestamp": 1681084800,
            "feeGrowthGlobal0X128": "2339213968916729531223096419274296",
            "feeGrowthGlobal1X128": "1124565708862364413358919226291694974818769",
            "feesUSD": "24570.19489506981696256671263525303",
            "o": "1861.229249917124425671059978055896",
            "h": "1866.129826859531905327345582770674",
            "l": "1849.588545028402903627911445772043",
            "c": "1861.229249917124425671059978055896",
            "volumeUSD": "49140389.79013963392513342527050604",
            "volumeToken0": "49134098.465595",
            "volumeToken1": "26424.102167136654514951",
            "token0Price": "1860.821468497617504272633341910774",
            "token1Price": "0.0005373970673325130686586439093719616",
            "liquidity": "28359865230079992268",
            "txCount": "1946",
            "tvlUSD": "445832755.5937852890879586310030789",
            "sqrtPrice": "1836653495884466183644038654704998",
            "tick": "201032"
        },
        {
            "id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640-19456",
            "timestamp": 1680998400,
            "feeGrowthGlobal0X128": "2339079716985510919254387473263998",
            "feeGrowthGlobal1X128": "1124493096642505157141501076316955741370453",
            "feesUSD": "97638.63554132466059685342601960951",
            "o": "1850.396710419790204337751969898761",
            "h": "1873.596532314986342851627620643428",
            "l": "1828.321888992128176916756588291294",
            "c": "1850.396710419790204337751969898761",
            "volumeUSD": "195277271.0826493211937068520392203",
            "volumeToken0": "195303846.783318",
            "volumeToken1": "105673.156917704060998814",
            "token0Price": "1861.217048228268273911189536461615",
            "token1Price": "0.0005372828499244196538466630433087226",
            "liquidity": "28271708994189162991",
            "txCount": "4708",
            "tvlUSD": "446136840.2157276077963775647371453",
            "sqrtPrice": "1836458305993924899300320848785481",
            "tick": "201030"
        }
    ]
}

Response Attributes

Attribute NameData TypeDescription

timeframe

string

The Timeframe of the Aggregate bar (Hour or Day)

token0

string

Token 0 in the pool

token1

string

Token 1 in the pool

name

string

Token name

id

string

Token contract address id

symbol

string

Token symbol

id

string

Id of the candlestick.

timestamp

string

Timestamp rounded to current day by dividing by 86400

feeGrowthGlobal0X128

string

Tracker for global fee growth

feeGrowthGlobal1X128

string

Tracker for global fee growth

feesUSD

string

Fees in USD

o

string

Opening price of token0

h

string

High price of token0

l

string

Low price of token0

c

string

Close price of token0

volumeUSD

string

Volume in USD

volumeToken0

string

Volume in token0

volumeToken1

string

Volume in token1

token0Price

string

Price of token0 - derived from sqrtPrice

token1Price

string

Price of token1 - derived from sqrtPrice

liquidity

string

In-range liquidity at end of period

txCount

string

Number of transactions during period

tvlUSD

string

The total value locked in USD at the end of the period.

sqrtPrice

string

Current price tracker at end of period

tick

string

Current tick at end of period

Last updated