DEXTrades overlapping problem
Returns DEX trades on Ethereum, where pair smart contract is 0x06cd…a88c, 0xa43f…ec9f or 2 more, sell currency smart contract is 0xa0b8…eb48 or 0xc02a…6cc2 and buy currency smart contract is not 0xa0b8…eb48: buy currency symbol, buy smart contract, buy price, sell currency symbol, sell price, smart contract, pair name and 2 more fields.
What it returns
- buy currency symbol
- buy smart contract
- buy price
- sell currency symbol
- sell price
- smart contract
- pair name
- sum of trade buy amount
- sum of trade sell amount
Filters
- pair smart contract is 0x06cd…a88c, 0xa43f…ec9f or 2 more
- sell currency smart contract is 0xa0b8…eb48 or 0xc02a…6cc2
- buy currency smart contract is not 0xa0b8…eb48
- DEX protocol name is uniswap_v2
- block time since 2024-06-03
The query
query MyQuery {
EVM(dataset: combined, network: eth) {
DEXTrades(
where: {Trade: {Dex: {Pair: {SmartContract: {in: ["0x06cd6245156c3608ae67d690c125e86a8bc6a88c", "0xa43fe16908251ee70ef74718545e4fe6c5ccec9f", "0x8c1c499b1796d7f3c2521ac37186b52de024e58c", "0xa43fe16908251ee70ef74718545e4fe6c5ccec9f"]}}, ProtocolName: {is: "uniswap_v2"}}, Sell: {Currency: {SmartContract: {in: ["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"]}}}, Buy: {Currency: {SmartContract: {not: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}}}}, Block: {Time: {since: "2024-06-03T10:51:31.046Z"}}}
) {
Trade {
Buy {
Currency {
Symbol
SmartContract
}
High: Price(maximum: Trade_Buy_Price)
Low: Price(minimum: Trade_Buy_Price)
Open: Price(minimum: Block_Number)
Close: Price(maximum: Block_Number)
}
Sell {
Currency {
Symbol
}
High: Price(maximum: Trade_Sell_Price)
Low: Price(minimum: Trade_Sell_Price)
Open: Price(minimum: Block_Number)
Close: Price(maximum: Block_Number)
}
Dex {
Pair {
SmartContract
Name
}
}
}
volumeBuy: sum(of: Trade_Buy_Amount)
volumeSell: sum(of: Trade_Sell_Amount)
}
}
}
Similar queries
- Latest Curve DEX swaps on Ethereum · Ethereum · DEXTrades
- Top Curve liquidity pools by 24h volume on Ethereum · Ethereum · DEXTrades
- STRN_TOKEN_MULTIPLE_DECIMALS_DEX_TRADES · Ethereum · DEXTrades
- USDT DECIMAL SHOWING 0 · Ethereum · DEXTrades
- Trades - 0xEE61159E8A72A08371c52D62c19Efd0C7914f917 · Ethereum · DEXTrades