Aerodrome Finance API - Base DEX Trades, Liquidity Pools, Token Analytics
Get real-time Aerodrome Finance DEX trades, liquidity pools, token prices, trading volume and comprehensive analytics on Base network. Access live trading data, pool creation events, liquidity metrics and token statistics through our Aerodrome Finance API, Streams and Data services. The GraphQL APIs and Streams below provide extensive data points for the Aerodrome Finance ecosystem. If you have any questions on other data points, reach out to support.
You may also be interested in:
To query or stream data via graphQL outside the Bitquery IDE, you need to generate an API access token.
Follow the steps here to create one: How to generate Bitquery API token β€
Table of Contentsβ
1. DEX Trades & Trading Activityβ
- Subscribe to Latest Trades on Aerodrome Finance β€
- Most Traded Tokens on Aerodrome Finance β€
- Realtime Prices, OHLC, Trading Volume of all pairs β€
2. Liquidity Pools & Analyticsβ
3. Video Tutorialsβ
DEX Trades & Trading Activityβ
Subscribe to Latest Trades on Aerodrome Financeβ
Stream real-time DEX trades on Aerodrome Finance with this subscription query. Monitor live buy/sell activity, token pairs, prices, and trading volumes as they happen on the Base network.
This query filters Aerodrome DEX trades by the protocol's OwnerAddress (0x420dd381b31aef6683db6b902084cb0ffece40da).
Subscribe to Aerodrome Finance trades in real-time β Stream β€
Click to expand GraphQL query
subscription {
EVM(network: base) {
DEXTrades(
where: {
Trade: {
Dex: {
OwnerAddress: { is: "0x420dd381b31aef6683db6b902084cb0ffece40da" }
}
}
}
) {
Block {
Time
}
Trade {
Buy {
AmountInUSD(selectWhere: { gt: "0" })
Buyer
Currency {
Name
Symbol
SmartContract
}
PriceInUSD
Seller
}
Dex {
ProtocolFamily
ProtocolName
}
Sell {
Currency {
SmartContract
Symbol
Name
}
Seller
Buyer
AmountInUSD
}
}
}
}
}
Most Traded Tokens on Aerodrome Financeβ
Discover the most actively traded tokens on Aerodrome Finance over any time period. This query analyzes all DEX trades within a specified timeframe and ranks tokens by trade count, helping you identify trending tokens and market activity patterns.
Get most traded tokens on Aerodrome Finance β Query β€
Click to expand GraphQL query
query MyQuery {
EVM(dataset: archive, network: base) {
DEXTradeByTokens(
limit: { count: 10 }
where: {
Block: {
Time: {
after: "2024-06-10T00:00:00Z"
before: "2024-07-10T00:00:00Z"
}
}
Trade: {
Dex: {
OwnerAddress: { is: "0x420dd381b31aef6683db6b902084cb0ffece40da" }
}
}
}
orderBy: { descendingByField: "count" }
) {
Trade {
Currency {
Name
SmartContract
}
}
count
}
}
}
Realtime Prices, OHLC, Trading Volume of all pairsβ
Below API gives you instant access to live Aerodrome market data with pre-calculated OHLC, moving averages, and trading volumes updating every secondβno complex calculations needed, just plug and play for your trading bots or analytics platform.
Realtime Prices, OHLC, Trading Volume of all pairs β Query β€
Click to expand GraphQL query
subscription {
Trading {
Pairs(
where: {
Interval: { Time: { Duration: { eq: 1 } } }
Price: { IsQuotedInUsd: true }
Market: { ProtocolFamily: { is: "Aerodrome" } }
}
) {
Token {
Name
Symbol
Address
}
Price {
Average {
Estimate
Mean
ExponentialMoving
SimpleMoving
WeightedSimpleMoving
}
Ohlc {
Open
High
Low
Close
}
}
QuoteToken {
Name
Symbol
Address
}
Market {
ProtocolFamily
}
Volume {
Base
Quote
}
Interval {
Time {
Duration
Start
End
}
}
}
}
}
Liquidity Pools & Analyticsβ
Latest Liquidity Pools on Aerodrome Financeβ
Track newly created liquidity pools on Aerodrome Finance in real-time. Discover fresh trading pairs and potential liquidity provision opportunities as pools are created. This query monitors PoolCreated events from the Aerodrome Finance smart contract, returning pool addresses, token pairs, and creation timestamps.
Get latest liquidity pools on Aerodrome Finance β Query β€
Click to expand GraphQL query
{
EVM(dataset: combined, network: base) {
Events(
orderBy: { descending: Block_Number }
limit: { count: 10 }
where: {
Log: {
SmartContract: { is: "0x420dd381b31aef6683db6b902084cb0ffece40da" }
Signature: { Name: { is: "PoolCreated" } }
}
}
) {
Log {
Signature {
Name
Parsed
Signature
}
SmartContract
}
Transaction {
Hash
}
Block {
Date
Number
}
Arguments {
Value {
... on EVM_ABI_String_Value_Arg {
string
}
... on EVM_ABI_Address_Value_Arg {
address
}
... on EVM_ABI_Integer_Value_Arg {
integer
}
... on EVM_ABI_BigInt_Value_Arg {
bigInteger
}
... on EVM_ABI_Bytes_Value_Arg {
hex
}
... on EVM_ABI_Boolean_Value_Arg {
bool
}
}
}
}
}
}
Response Structure:
The query returns pool creation events with the following information:
{
"Arguments": [
{
"Value": {
"address": "0x02f92800f57bcd74066f5709f1daa1a4302df875"
}
},
{
"Value": {
"address": "0xf564f589f58ced0127e48e1a02093ba53c2856ed"
}
},
{
"Value": {
"bool": false
}
},
{
"Value": {
"address": "0xa187378f0f3613e42b6ad5cc063a01060f82763f"
}
},
{
"Value": {
"bigInteger": "1539"
}
}
],
"Block": {
"Date": "2024-07-10",
"Number": "16894743"
},
"Log": {
"Signature": {
"Name": "PoolCreated",
"Parsed": true,
"Signature": "PoolCreated(address,address,bool,address,uint256)"
},
"SmartContract": "0x420dd381b31aef6683db6b902084cb0ffece40da"
},
"Transaction": {
"Hash": "0xc5049804074b77ccb975b9617974ee40533634b8d6d8cabf2865cebb94c462a4"
}
}
Understanding the Response:
- Token Addresses: The first two address arguments (
0x02f92800f57bcd74066f5709f1daa1a4302df875and0xf564f589f58ced0127e48e1a02093ba53c2856ed) represent the two tokens in the trading pair. - Pool Address: The fourth argument (
0xa187378f0f3613e42b6ad5cc063a01060f82763f) is the newly created liquidity pool address. - Pool Type: The boolean value indicates whether the pool is stable or volatile.
- Pool ID: The bigInteger value is the unique pool identifier.
Get Liquidity of a Poolβ
Query the current liquidity levels for any Aerodrome Finance pool by pool address. This query retrieves the token balances for both assets in a liquidity pool, allowing you to calculate total value locked (TVL), assess pool depth, and analyze liquidity distribution.
Get pool liquidity on Aerodrome Finance β Query β€
Click to expand GraphQL query
query MyQuery {
EVM(dataset: combined, network: base) {
BalanceUpdates(
where: {
BalanceUpdate: {
Address: { is: "0x1e039aade407a94df380649b33b52cb8ad41c755" }
}
Currency: {
SmartContract: {
in: [
"0x4200000000000000000000000000000000000006"
"0xa999542c71febba77602fbc2f784ba9ba0c850f6"
]
}
}
}
orderBy: { descendingByField: "balance" }
) {
Currency {
Name
}
balance: sum(of: BalanceUpdate_Amount, selectWhere: { gt: "0" })
}
}
}