query from dexrabbit
Returns the latest 50 DEX trades by token, where side currency smart contract is 0xaf88…5831, currency smart contract is 0x82af…bab1 and block time since 2025-07-02: block time, transaction hash, smart contract, protocol family, protocol name, currency symbol, currency name and 9 more fields.
What it returns
- block time
- transaction hash
- smart contract
- protocol family
- protocol name
- currency symbol
- currency name
- price in USD
- amount in USD
- trade amount
- side type
- side currency symbol
- side smart contract
- side currency name
- side amount in USD
- side amount
Filters
- side currency smart contract is 0xaf88…5831
- currency smart contract is 0x82af…bab1
- block time since 2025-07-02
- side amount is above 0
The query
query LatestTrades($network: evm_network, $token: String, $base: String, $time_ago: DateTime) {
EVM(network: $network) {
DEXTradeByTokens(
orderBy: {descending: Block_Time}
limit: {count: 50}
where: {TransactionStatus: {Success: true}, Trade: {Side: {Amount: {gt: "0"}, Currency: {SmartContract: {is: $token}}}, Currency: {SmartContract: {is: $base}}, Success: true}, Block: {Time: {since: $time_ago}}}
) {
Block {
Time
}
Transaction {
Hash
}
Trade {
Dex {
SmartContract
ProtocolFamily
ProtocolName
}
Currency {
Symbol
SmartContract
Name
}
PriceInUSD
AmountInUSD
Amount
Side {
Type
Currency {
Symbol
SmartContract
Name
}
AmountInUSD
Amount
}
}
}
}
}
Variables
{
"base": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
"token": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
"time_ago": "2025-07-02T14:42:53Z"
}
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