privateai query
Returns 25 DEX trades by token on Ethereum, where block time after 2025-09-17, trade amount in USD is above 10 and side amount in USD is above 10, sorted by USD, highest first: block time, currency symbol, currency name, smart contract, protocol name, side currency symbol, side currency name and 7 more fields.
What it returns
- block time
- currency symbol
- currency name
- smart contract
- protocol name
- side currency symbol
- side currency name
- side smart contract
- side protocol name
- price in USD
- unique of trade DEX owner address
- sum of trade side amount
- sum of trade side amount in USD
- count
Filters
- block time after 2025-09-17
- trade amount in USD is above 10
- side amount in USD is above 10
The query
query pairs($network_eth: evm_network, $time_10min_ago: DateTime, $time_1h_ago: DateTime, $weth: String!, $eth: String!, $usdt_eth: String!, $usdc_eth: String!) {
EVM(network: $network_eth) {
DEXTradeByTokens(
where: {TransactionStatus: {Success: true}, Block: {Time: {after: $time_1h_ago}}, any: [{Trade: {Side: {Currency: {SmartContract: {is: $usdt_eth}}}}}, {Trade: {Side: {Currency: {SmartContract: {is: $usdc_eth}}}, Currency: {SmartContract: {notIn: [$usdt_eth]}}}}, {Trade: {Side: {Currency: {SmartContract: {is: $weth}}}, Currency: {SmartContract: {notIn: [$usdc_eth, $usdt_eth]}}}}, {Trade: {Side: {Currency: {SmartContract: {is: $eth}}}, Currency: {SmartContract: {notIn: [$usdc_eth, $usdt_eth]}}}}, {Trade: {Side: {Currency: {SmartContract: {notIn: [$usdt_eth, $weth]}}}, Currency: {SmartContract: {notIn: [$usdt_eth, $weth, $eth]}}}}], Trade: {AmountInUSD: {gt: "10"}, Side: {AmountInUSD: {gt: "10"}}, PriceAsymmetry: {}}}
orderBy: {descendingByField: "usd"}
limit: {count: 25}
) {
Block {
Time(maximum: Block_Time, selectWhere: {after: $time_1h_ago})
}
Trade {
Currency {
Symbol
Name
SmartContract
ProtocolName
}
Side {
Currency {
Symbol
Name
SmartContract
ProtocolName
}
}
price_last: PriceInUSD(maximum: Block_Number)
price_10min_ago: PriceInUSD(
minimum: Block_Number
if: {Block: {Time: {after: $time_10min_ago}}}
)
price_1h_ago: PriceInUSD(
minimum: Block_Number
if: {Block: {Time: {after: $time_1h_ago}}}
)
}
dexes: uniq(of: Trade_Dex_OwnerAddress)
amount: sum(of: Trade_Side_Amount)
usd: sum(of: Trade_Side_AmountInUSD)
buy: count(if: {Trade: {Side: {Type: {is: sell}}}})
sell: count(if: {Trade: {Side: {Type: {is: buy}}}})
count
}
}
}
Variables
{"time_10min_ago":"2025-09-18T00:04:40Z","time_1h_ago":"2025-09-17T23:14:40Z","time_24h_ago":"2025-09-17T00:14:40Z","time_12h_ago":"2025-09-17T12:14:40Z","time_15min_ago":"2025-09-17T23:59:40Z","network_bnb":"bsc","bnb":"0x","usdc_bnb":"0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d","usdt_bnb":"0x55d398326f99059ff775485246999027b3197955","wbnb":"0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c","network_eth":"eth","eth":"0x","usdc_eth":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","usdt_eth":"0xdac17f958d2ee523a2206206994597c13d831ec7","weth":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}
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