buy-sell-volume-for-an-interval
Returns DEX trades by token, where currency smart contract is 0xc02a…6cc2, block time since 2024-10-15 and block time till 2024-10-15: sum of trade amount in USD and sum of trade side amount in USD.
What it returns
- sum of trade amount in USD
- sum of trade side amount in USD
Filters
- currency smart contract is 0xc02a…6cc2
- block time since 2024-10-15
- block time till 2024-10-15
The query
query MyQuery($token: String = "", $since: DateTime, $till: DateTime) {
EVM {
DEXTradeByTokens(
where: {Trade: {Currency: {SmartContract: {is: $token}}, PriceInUSD: {ne: 0}}, Block: {Time: {since: $since, till: $till}}}
) {
volumeBuy: sum(of: Trade_AmountInUSD, if: {Trade: {Side: {Type: {is: sell}}}})
volumeSell: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: sell}}}})
}
}
}
Variables
{
"token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"since": "2024-10-15T08:30:00Z",
"till": "2024-10-15T08:35: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