buys/ sells 24h - evm - Query
Returns DEX trades by token on Ethereum, where currency smart contract is 0xA12C…f4f3: currency name, smart contract, currency symbol and count.
What it returns
- currency name
- smart contract
- currency symbol
- count
Filters
- currency smart contract is 0xA12C…f4f3
The query
query PoolTokenStatsEVM($network: evm_network, $token: String) {
EVM(dataset: realtime, network: $network) {
DEXTradeByTokens(
where: {TransactionStatus: {Success: true}, Trade: {Currency: {SmartContract: {is: $token}}}, Block: {Time: {since_relative: {hours_ago: 24}}}}
) {
Trade {
Currency {
Name
SmartContract
Symbol
}
}
buys_24h: count(if: {Trade: {Side: {Type: {is: sell}}}})
buys_1h: count(
if: {Trade: {Side: {Type: {is: sell}}}, Block: {Time: {after_relative: {hours_ago: 1}}}}
)
buys_5min: count(
if: {Trade: {Side: {Type: {is: sell}}}, Block: {Time: {after_relative: {minutes_ago: 5}}}}
)
sells_24h: count(if: {Trade: {Side: {Type: {is: buy}}}})
sells_1h: count(
if: {Trade: {Side: {Type: {is: buy}}}, Block: {Time: {after_relative: {hours_ago: 1}}}}
)
sells_5min: count(
if: {Trade: {Side: {Type: {is: buy}}}, Block: {Time: {after_relative: {minutes_ago: 5}}}}
)
}
}
}
Variables
{
"network": "eth",
"token": "0xA12CC123ba206d4031D1c7f6223D1C2Ec249f4f3"
}
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