Top 10 pairs on ethereum
Returns 10 DEX trades by token on Ethereum, where side currency smart contract is 0xC02a…6Cc2 and block time since 2024-08-04, sorted by total trades, highest first: price in USD, currency name, currency symbol, side currency name, side currency symbol, protocol name, protocol family and 4 more fields.
What it returns
- price in USD
- currency name
- currency symbol
- side currency name
- side currency symbol
- protocol name
- protocol family
- protocol version
- smart contract
- count
- sum of trade side amount in USD
Filters
- side currency smart contract is 0xC02a…6Cc2
- block time since 2024-08-04
The query
query MyQuery($oneHourAgo: DateTime, $min5backtimestamp: DateTime) {
EVM(network: eth, dataset: realtime) {
DEXTradeByTokens(
orderBy: {descendingByField: "total_trades"}
limit: {count: 10}
where: {
Block: {Time: {since: $oneHourAgo}},
Trade: {Side: {Currency: {SmartContract: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}}},
TransactionStatus: {Success: true}
}
) {
Trade {
hour1: PriceInUSD(minimum: Block_Time)
min5: PriceInUSD(minimum: Block_Time, if: { Block: { Time: { after: $min5backtimestamp } } })
end: PriceInUSD(maximum: Block_Time)
Currency {
Name
Symbol
}
Side {
Currency {
Name
Symbol
}
}
Dex {
ProtocolName
ProtocolFamily
ProtocolVersion
SmartContract
}
}
total_trades: count
totalbuys: count(if: {Trade: {Side: {Type: {is: sell}}}})
totalsells: count(if: {Trade: {Side: {Type: {is: buy}}}})
total_traded_volume: sum(of: Trade_Side_AmountInUSD)
}
}
}
Variables
{ "oneHourAgo": "2024-08-04T12:35:00Z",
"min5backtimestamp": "2024-08-04T13:30:00Z"
}
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