Abyiss
HomeAPI KeyContact Us
  • Free API Key
  • Introduction
    • Welcome
    • Getting Started
    • Reading Documentation
    • Client Libraries
    • API Architecture
      • API Keys - Authentication
      • API Server URL
      • Requests & Error Codes
      • Rate Limits
  • Octane API
    • Introduction
    • Integration Guides
      • Crypto Off Ramp APIs - Business Guide
    • References
      • Transaction Types
      • Payment Methods
      • Transaction Fees
      • Partner Fees
    • APIs
      • Transactions
      • Assets
      • Payment Methods
        • Bank Accounts
        • Wallets
      • Subaccounts
      • KYC (Know Your Customer)
  • Crypto API
    • Introduction
    • References
      • Supported Exchanges
      • Historical Data
      • Pagination
      • Return Types
    • REST APIs
      • Exchanges
      • Exchanges Count
      • Exchange Data
      • Exchange Status
      • Exchange Markets
      • Market Details
      • Current Price
      • Aggregates (Bars)
      • Last Aggregate
      • Trades
      • Last Trade
      • Snapshot
      • Order Books
      • Liquidity
      • Whales
    • WebSockets
      • Request Access
  • Blockchain API
    • Introduction
    • References
      • Supported Exchanges
      • Historical Data
      • Pagination
      • Query Parameters
      • Error Handling
    • REST APIs
      • Exchanges
      • Blockchains
      • Blocks
      • Exchange Data
      • Tokens
      • Token Data
      • Token Aggregates (Bars)
      • Token Trades
      • Pools
      • Pool Data
      • Pool Aggregates (Bars)
      • Pool Trades
      • Token Search
    • WebSockets
      • Request Access
  • Alerts API
    • Request Access
  • Changes
    • Changelog
    • Upcoming Changes
  • Resources
    • Glossary
    • Social Media
    • Legal Guide
    • White Paper
    • Deprecated
      • Crypto APIs /v1 - REST APIs
        • Exchanges
        • Exchanges Count
        • Exchange Data
        • Exchange Status
        • Exchange Markets
        • Market Details
        • Current Price
        • Aggregates (Bars)
        • Last Aggregate
        • Trades
        • Last Trade
        • Snapshot
        • Order Books
        • Liquidity
        • Whales
      • Blockchain APIs /v1 - REST APIs
        • Exchanges
        • Blockchains
        • Blocks
        • Exchange Data
        • Tokens
        • Token Data
        • Token Aggregates (Bars)
        • Token Trades
        • Pools
        • Pool Data
        • Pool Aggregates (Bars)
        • Pool Trades
        • Token Search
Powered by GitBook
On this page
  • Get Liquidity Pool Aggregates (Bars)
  • Copy & Paste Code
  • Response Object
  • Response Attributes

Was this helpful?

  1. Blockchain API
  2. REST APIs

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

Name
Type
Description

exchange*

string

Decentralized exchange Id

blockchain*

string

Blockchain that supports the decentralized exchange.

pool*

string

Liquidity Pool contract address.

Query Parameters

Name
Type
Description

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"
        }
    ]
}
{
    "Unauthorized": "Invaild API Key"
}

Copy & Paste Code

curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day
import urllib.request
url = "https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day&apiKey="
print(urllib.request.urlopen(url).read())
fetch("https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day&apiKey=")
  .then(response => response.json())
  .then(data => console.log(data))
require('axios')
  .get("https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day&apiKey=")
  .then(response => console.log(response))
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day&apiKey=")
puts Net::HTTP.get(uri)

Response Object

{
    "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 Name
Data Type
Description

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

PreviousPool DataNextPool Trades

Last updated 1 year ago

Was this helpful?

Example URL:

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