volume and trades for a token in different time frames
Returns DEX trades by token on BNB Chain: currency name, currency symbol, smart contract, sum of trade side amount in USD and count.
What it returns
- currency name
- currency symbol
- smart contract
- sum of trade side amount in USD
- count
The query
query MyQuery($currency: String, $time_24hr_ago: DateTime, $time_1hr_ago: DateTime, $time_5min_ago: DateTime) {
EVM(network: bsc) {
DEXTradeByTokens(
where: {
Trade: {
Currency: {SmartContract: {is: $currency}},
Success: true
},
Block: {Time: {since: $time_24hr_ago}}
}
){
Trade{
Currency{
Name
Symbol
SmartContract
}
}
volume_24hr: sum(of: Trade_Side_AmountInUSD)
volume_1hr: sum(of: Trade_Side_AmountInUSD, if: {Block: {Time: {since: $time_1hr_ago}}})
volume_5min: sum(of: Trade_Side_AmountInUSD, if: {Block: {Time: {since: $time_5min_ago}}})
trades_24hr: count
trades_1hr: count(if: {Block: {Time: {since: $time_1hr_ago}}})
trades_5min: count(if: {Block: {Time: {since: $time_5min_ago}}})
}
}
}
Variables
{
"currency": "0x9b48a54bcce09e59b0479060e9328ab7dbdb0d40",
"time_24hr_ago": "2024-03-23T15:00:00Z",
"time_1hr_ago": "2024-03-24T14:00:00Z"
"time_5min_ago": "2024-03-24T15:55:00Z",
}
Versions
- Saved 2 September 2025, 11:42 UTC
- Saved 2 September 2025, 11:46 UTC · run 6 times · currency smart contract is 0x9b48…0d40
- Saved 24 October 2025 · this page · the latest · run 3 times
Similar queries
- bStocks 3am: QQQB 30-day DEX volume · BNB Chain · DEXTradeByTokens
- bStocks 3am: tokenized Tesla 30-day volume · BNB Chain · DEXTradeByTokens
- bsc token ohlcv · BNB Chain · DEXTradeByTokens
- optimized query to get pools data · Ethereum · DEXTradeByTokens
- KTI_primeiros_trades · BNB Chain · DEXTradeByTokens