liquidity, volume, txns count, creation time
Returns DEX trades by token and events, where currency smart contract is 0xABD4…4337, side currency smart contract is 0xC02a…6Cc2 and log smart contract is 0x0BFb…1865: sum of trade side amount in USD, unique of transaction hash, block time, transaction hash, currency name and sum of balance update amount.
What it returns
- sum of trade side amount in USD
- unique of transaction hash
- block time
- transaction hash
- currency name
- sum of balance update amount
Filters
- currency smart contract is 0xABD4…4337
- side currency smart contract is 0xC02a…6Cc2
- log smart contract is 0x0BFb…1865
- balance update address is 0xB2DC…3086
- currency smart contract is 0xABD4…4337 or 0xC02a…6Cc2
- DEX protocol family is PancakeSwap
- signature name is PoolCreated
- block time since 2025-05-07
The query
query MyQuery($time_24h_ago: DateTime, $token0: String!, $token1: String!, $pairAddress: String) {
EVM(dataset: combined) {
Volume: DEXTradeByTokens(
where: {Trade: {Currency: {SmartContract: {is: $token0}}, Side: {Currency: {SmartContract: {is: $token1}}}, Dex: {ProtocolFamily: {is: "PancakeSwap"}}}, TransactionStatus: {Success: true}, Block: {Time: {since: $time_24h_ago}}}
) {
volume_24h: sum(of: Trade_Side_AmountInUSD)
txns_count: uniq(of: Transaction_Hash)
}
createdTime: Events(
where: {Log: {Signature: {Name: {is: "PoolCreated"}}, SmartContract: {is: "0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865"}}, TransactionStatus: {Success: true}, Arguments: {includes: {Value: {Address: {is: $pairAddress}}}}}
) {
Block {
Time
}
Transaction {
Hash
}
}
liquidity:BalanceUpdates(
where: {BalanceUpdate: {Address: {is: $pairAddress}}, Currency: {SmartContract: {in: [$token0,$token1]}}}
) {
Currency {
Name
}
balance: sum(of: BalanceUpdate_Amount)
}
}
}
Variables
{
"time_24h_ago": "2025-05-07T10:00:00Z",
"token0": "0xABD4C63d2616A5201454168269031355f4764337",
"token1": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"pairAddress": "0xB2DC4d7627501338B578985c214208eb32283086"
}
Similar queries
- CRV hourly OHLC on Curve - Ethereum · Ethereum · DEXTradeByTokens
- Top Metric liquidity pools by 24h volume on Ethereum · Ethereum · DEXTradeByTokens
- ATH of eth token · Ethereum · DEXTradeByTokens
- historical price and historical volume · Ethereum · DEXTradeByTokens
- topTraders EVM · Ethereum · DEXTradeByTokens