Skip to Content
APIsToken Aggregates (Bars)

Token Aggregates (Bars)

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

Get Token Aggregates (Bars)

GEThttps://api.adesic.com/v2/dex/{exchange}/{blockchain}/token/{token}/aggregate?timeframe={interval}

Returns an object of real-time or historical candlesticks (bars) for a token on a decentralized exchange.

Path Parameters

NameTypeDescription
exchange*stringDecentralized exchange Id.
blockchain*stringBlockchain that supports the decentralized exchange.
tokenstringToken contract address.

Query Parameters

NameTypeDescription
apiKey*stringYour Adesic API Key.
interval*stringAggregate bar size. hour or day.
limitintNumber of results per request. Maximum 1,0000 (default 100).
orderBystringSort the returned data by any field in the API response, such as id, name, symbol, volumeUSD and more.
orderDirectionstringasc or desc return the results sorted by that field in either ascending or descending order.
skipintNumber of results to skip per request.
fromintThe start of the aggregate time window for historical data. Unix timestamp in milliseconds.
tointThe end of the aggregate time window for historical data. Unix timestamp in milliseconds.
success-response.json
{ "timeframe": "day", "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "name": "Wrapped Ether", "symbol": "WETH", "TokenAggregates": [ { "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2-19457", "timestamp": 1681084800, "priceUSD": "1861.812948948509109388355192853743", "o": "1863.160356657281537768066137359126", "h": "1863.160356657281537768066137359126", "l": "1854.198335514748181373337243056372", "c": "1861.812948948509109388355192853743", "volume": "45669.177692851802160815", "volumeUSD": "84911506.50161917605934414103318911", "untrackedVolumeUSD": "84911506.50161917605934414103318911", "totalValueLocked": "631521.957032934821587711", "totalValueLockedUSD": "1175775757.14922204229657038017616", "feesUSD": "136802.7673893035106587395801362141" }, { "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2-19456", "timestamp": 1680998400, "priceUSD": "1863.160356657281537768066137359126", "o": "1853.838633116650036787389059651635", "h": "1869.100132810398674639493628800632", "l": "1832.845247207196123319380992497196", "c": "1863.160356657281537768066137359126", "volume": "183377.010533141634178776", "volumeUSD": "338844982.527842179017489089242307", "untrackedVolumeUSD": "338844982.527842179017489089242307", "totalValueLocked": "630787.710476643156442134", "totalValueLockedUSD": "1175258655.626692509388975773585923", "feesUSD": "462630.7204260430184761393488914015" } ] }

Copy & Paste Code

curl-example.sh
curl -H "api-key: API KEY" https://api.adesic.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/aggregate?timeframe=day

Response Object

Example URL: https://api.adesic.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/aggregate?timeframe=day 

response-example.json
{ "timeframe": "day", "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "name": "Wrapped Ether", "symbol": "WETH", "TokenAggregates": [ { "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2-19457", "timestamp": 1681084800, "priceUSD": "1861.812948948509109388355192853743", "o": "1863.160356657281537768066137359126", "h": "1863.160356657281537768066137359126", "l": "1854.198335514748181373337243056372", "c": "1861.812948948509109388355192853743", "volume": "45669.177692851802160815", "volumeUSD": "84911506.50161917605934414103318911", "untrackedVolumeUSD": "84911506.50161917605934414103318911", "totalValueLocked": "631521.957032934821587711", "totalValueLockedUSD": "1175775757.14922204229657038017616", "feesUSD": "136802.7673893035106587395801362141" }, { "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2-19456", "timestamp": 1680998400, "priceUSD": "1863.160356657281537768066137359126", "o": "1853.838633116650036787389059651635", "h": "1869.100132810398674639493628800632", "l": "1832.845247207196123319380992497196", "c": "1863.160356657281537768066137359126", "volume": "183377.010533141634178776", "volumeUSD": "338844982.527842179017489089242307", "untrackedVolumeUSD": "338844982.527842179017489089242307", "totalValueLocked": "630787.710476643156442134", "totalValueLockedUSD": "1175258655.626692509388975773585923", "feesUSD": "462630.7204260430184761393488914015" } ] }

Response Attributes

Attribute NameData TypeDescription
timeframestringThe Timeframe of the Aggregate bar (Hour or Day)
idstringToken contact address
namestringToken name
symbolstringToken symbol
idstringId of the candlestick.
timestampintUnix timestamp of the aggregate bar.
priceUSDstringThe price at the end of the period in USD
ostringThe opening price USD
hstringThe high price USD
lstringThe low price USD
cstringThe close price USD
volumestringThe volume in token units
volumeUSDstringThe volume in derived USD
untrackedVolumeUSDstringThe volume in USD even on pools with less reliable USD values
totalValueLockedstringThe liquidity across all pools in token units
totalValueLockedUSDstringThe liquidity across all pools in derived USD
feesUSDstringThe fees in USD

© Adesic LLC. All Rights Reserved