base
arbitrum data
Returns DEX trades on Base, where transaction from is 0x8568…8010 or 0x5bfe…1034, buy currency smart contract is 0x0db5…950f and sell currency smart contract is 0x0db5…950f: from, sum of trade buy amount, sum of trade buy amount in USD, sum of trade sell amount in USD and sum of trade sell amount.
What it returns
- from
- sum of trade buy amount
- sum of trade buy amount in USD
- sum of trade sell amount in USD
- sum of trade sell amount
Filters
- transaction from is 0x8568…8010 or 0x5bfe…1034
- buy currency smart contract is 0x0db5…950f
- sell currency smart contract is 0x0db5…950f
The query
query TotalPurchasesAndSales($from: [String!], $token: String!) {
EVM(dataset: combined, network: base) {
sellTrade: DEXTrades(
where: {
Transaction: {
From: { in: $from }
}
Trade: {
Buy: {
Currency: { SmartContract: { is: $token } }
}
}
}
) {
Transaction{
From
}
sellAmount: sum(of: Trade_Buy_Amount)
cost: sum(of: Trade_Buy_AmountInUSD)
cost_1: sum(of: Trade_Sell_AmountInUSD)
}
buyTrade: DEXTrades(
where: {
Transaction: {
From: { in: $from }
}
Trade: {
Sell: {
Currency: { SmartContract: { is: $token } }
}
}
}
) {
Transaction{
From
}
buyAmount: sum(of: Trade_Sell_Amount)
cost: sum(of: Trade_Sell_AmountInUSD)
cost_1: sum(of: Trade_Buy_AmountInUSD)
}
}
}
Variables
{
"from":["0x85687cc0a149e77227fcba1269a1dd4055f38010", "0x5bfeb4ca066c9458842ac89b6e5cd983bd1a1034"],
"token":"0x0db510e79909666d6dec7f5e49370838c16d950f"
}
Similar queries
- Zora Trades For A Wallet Up To A Block · Base · DEXTrades
- dex_trade_by_tx_base · Base · DEXTrades
- base dextrades · Base · DEXTrades
- trades · Ethereum · DEXTrades
- base_aerodrome_slipstream · Base · DEXTrades