total Buys and sells of multiple pools from a single query
Returns DEX trades by token, where side currency smart contract is 0xC02a…6Cc2, DEX smart contract is 0x58a9…99cb or 0xc4fc…6d23 and block time since 2024-08-02: count and smart contract.
What it returns
- count
- smart contract
Filters
- side currency smart contract is 0xC02a…6Cc2
- DEX smart contract is 0x58a9…99cb or 0xc4fc…6d23
- block time since 2024-08-02
The query
query MyQuery($poolAddresses: [String!]) {
EVM {
DEXTradeByTokens(
where: {Trade: {Side: {Currency: {SmartContract: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}}, Dex: {SmartContract: {in: $poolAddresses}}}, TransactionStatus: {Success: true}, Block: {Time: {since: "2024-08-02T14:15:00Z"}}}
) {
totaltrades: count
totalbuys: count(if: {Trade: {Side: {Type: {is: sell}}}})
totalsells: count(if: {Trade: {Side: {Type: {is: buy}}}})
Trade{
Dex{
SmartContract
}
}
}
}
}
Variables
{"poolAddresses": ["0x58a99cf4982b9217460654272981ef7619a599cb","0xc4fc14ab3f9a0aebc5dc78b4fabc2eeb525d6d23"]}
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