top buyers of a currency on uniswap v4 optimism
Historical data This query uses the realtime dataset (the default), which holds only a recent window - hours to days depending on the cube. For older data add a dataset to the top-level element: EVM(network: optimism, dataset: combined) archive full history combined archive + realtime in one resu
What it returns
- sell currency name
- sell currency symbol
- sell smart contract
- sell decimals
- sell buyer
- sum of trade buy amount
- sum of trade buy amount in USD
Filters
- buy currency smart contract is 0x0b2c…ff85
- trade pool ID is 0x7ecc…b901
- DEX protocol name is uniswap_v4
The query
# Historical data
# This query uses the realtime dataset (the default), which holds only a
# recent window - hours to days depending on the cube.
#
# For older data add a dataset to the top-level element:
#
# EVM(network: optimism, dataset: combined)
#
# archive full history
# combined archive + realtime in one result
#
# Archive and combined need the historical data add-on:
# https://bitquery.io/pricing
#
# Datasets: https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#
{
EVM(network: optimism) {
DEXTrades(
orderBy: {descendingByField: "bought_in_usd"}
limit: {count: 100}
where: {Trade: {Dex: {ProtocolName: {is: "uniswap_v4"}}, Buy: {Currency: {SmartContract: {is: "0x0b2c639c533813f4aa9d7837caf62653d097ff85"}}}, PoolId: {is: "0x7ecc49f61e5c082ccd8d242dae2ffe8eb0b3b833c870b1f291753b37299db901"}}}
) {
Trade {
Sell {
Currency {
Name
Symbol
SmartContract
Decimals
}
Buyer
}
}
bought: sum(of: Trade_Buy_Amount)
bought_in_usd: sum(of: Trade_Buy_AmountInUSD)
}
}
}
Similar queries
- Velodrome v2 Pool Swaps on Optimism · Optimism · DEXTrades
- trades · Ethereum · DEXTrades
- List of DEX supported · Optimism · DEXTrades
- top sellers of a token on uniswap v4 pool optimism · Optimism · DEXTrades
- Latest Trades for a currency pair on optimism · Optimism · DEXTrades