optimized query to get pools data
Returns DEX trades by token on Ethereum, Base, BNB Chain and Arbitrum, where DEX smart contract is 0xa0ff…058b, pair smart contract is 0xa0ff…058b and block date since 2025-09-09.
Filters
- DEX smart contract is 0xa0ff…058b
- pair smart contract is 0xa0ff…058b
- block date since 2025-09-09
The query
{
eth: EVM(dataset: realtime, network: eth) {
DEXTradeByTokens(
where: {Trade: {Dex: {SmartContract: {is: "0xa0ffb9c1ce1fe56963b0321b32e7a0302114058b"}}}, TransactionStatus: {Success: true}, Block: {Date: {since: "2025-09-09"}}}
limitBy: {by: [Trade_Currency_SmartContract, Trade_Side_Currency_SmartContract], count: 1}
) {
...TradeFields
}
}
base: EVM(dataset: realtime, network: base) {
DEXTradeByTokens(
where: {Trade: {Dex: {SmartContract: {is: "0xa0ffb9c1ce1fe56963b0321b32e7a0302114058b"}}}, TransactionStatus: {Success: true}, Block: {Date: {since: "2025-09-09"}}}
limitBy: {by: [Trade_Currency_SmartContract, Trade_Side_Currency_SmartContract], count: 1}
) {
...TradeFields
}
}
bsc: EVM(dataset: realtime, network: bsc) {
DEXTradeByTokens(
where: {Trade: {Dex: {SmartContract: {is: "0xa0ffb9c1ce1fe56963b0321b32e7a0302114058b"}}}, TransactionStatus: {Success: true}, Block: {Date: {since: "2025-09-09"}}}
limitBy: {by: [Trade_Currency_SmartContract, Trade_Side_Currency_SmartContract], count: 1}
) {
...TradeFields
}
}
arb: EVM(dataset: realtime, network: arbitrum) {
DEXTradeByTokens(
where: {Trade: {Dex: {Pair: {SmartContract: {is: "0xa0ffb9c1ce1fe56963b0321b32e7a0302114058b"}}}}, TransactionStatus: {Success: true}, Block: {Date: {since: "2025-09-09"}}}
limitBy: {by: [Trade_Currency_SmartContract, Trade_Side_Currency_SmartContract], count: 1}
) {
...TradeFields
}
}
}
fragment TradeFields on EVM_DEXTradeByToken_Cube {
Trade {
Dex {
ProtocolName
ProtocolFamily
SmartContract
}
Currency {
Name
Symbol
Decimals
SmartContract
}
Side {
Currency {
Decimals
Name
Symbol
SmartContract
}
}
}
ChainId
}
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