bought and sold token of an address
Returns 10 DEX trades by token on Ethereum, where side currency smart contract is 0xC02a…6Cc2, sorted by volume USD, highest first: currency name, currency symbol, smart contract, side currency name, side currency symbol, side smart contract, sum of trade side amount in USD and sum of trade amount.
What it returns
- currency name
- currency symbol
- smart contract
- side currency name
- side currency symbol
- side smart contract
- sum of trade side amount in USD
- sum of trade amount
Filters
- side currency smart contract is 0xC02a…6Cc2
The query
query MyQuery {
EVM(network: eth, dataset: combined) {
DEXTradeByTokens(
limit:{count:10}
orderBy:{descendingByField:"volumeUsd"}
where: {any: [{Trade: {Buyer: {is: "0xacefce78e31332cf2d1b9e770d609c31d26afc09"}}}, {Trade: {Seller: {is: "0xacefce78e31332cf2d1b9e770d609c31d26afc09"}}}], Trade: {Side: {Currency: {SmartContract: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}}}}
) {
Trade {
Currency {
Name
Symbol
SmartContract
}
Side {
Currency {
Name
Symbol
SmartContract
}
}
}
bought: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: sell}}}})
sold: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: buy}}}})
volume: sum(of: Trade_Amount)
volumeUsd: sum(of: Trade_Side_AmountInUSD)
}
}
}
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