Skip to main content

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:

note

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​

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
}
}
}

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 (0x02f92800f57bcd74066f5709f1daa1a4302df875 and 0xf564f589f58ced0127e48e1a02093ba53c2856ed) 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" })
}
}
}

Video Tutorials​

Video Tutorial | How to Get Latest Trades and Most Traded Tokens on Aerodrome Finance​

Video Tutorial | How to Get Latest Liquidity Pools and Pool Liquidity on Aerodrome Finance​