latest
Returns DEX trades and events on Ethereum, where DEX smart contract is 0x28A4…1740 or 0xd01f…dcc7, log smart contract is 0x28A4…1740 or 0xd01f…dcc7 and signature name is Mint or Burn, sorted by block time: sum of trade buy amount, sum of trade sell amount, sum of trade buy amount in USD, sum of trade sell amount in USD, buy amount, buy amount in USD, buy price and 30 more fields.
What it returns
- sum of trade buy amount
- sum of trade sell amount
- sum of trade buy amount in USD
- sum of trade sell amount in USD
- buy amount
- buy amount in USD
- buy price
- buy price in USD
- buy buyer
- buy seller
- buy currency name
- buy smart contract
- sell amount in USD
- sell price in USD
- sell price
- sell amount
- sell buyer
- sell seller
- sell currency name
- sell smart contract
- smart contract
- transaction hash
- block time
- block number
- signature name
- from
- to
- transaction type
- log header address
- log header index
- integer
- string
- value address
- bool
- hex
- big integer
- arguments name
Filters
- DEX smart contract is 0x28A4…1740 or 0xd01f…dcc7
- log smart contract is 0x28A4…1740 or 0xd01f…dcc7
- signature name is Mint or Burn
- block number is at least 20860791
- block number is at most 21100730
The query
query GetTrades($pools: [String!], $fromBlock: String!, $toBlock: String!) {
EVM(dataset: combined, network: eth) {
DEXTrades(
where: {Block: {Number: {ge: $fromBlock, le: $toBlock}}, Trade: {Dex: {SmartContract: {in: $pools}}}}
orderBy: {ascending: Block_Time}
) {
buy_vol: sum(of: Trade_Buy_Amount)
sell_vol: sum(of: Trade_Sell_Amount)
buy_vol_usd: sum(of: Trade_Buy_AmountInUSD)
sell_vol_usd: sum(of: Trade_Sell_AmountInUSD)
Trade {
Buy {
Amount
AmountInUSD
Price
PriceInUSD
Buyer
Seller
Currency {
Name
SmartContract
}
}
Sell {
AmountInUSD
PriceInUSD
Price
Amount
Buyer
Seller
Currency {
Name
SmartContract
}
}
Dex {
SmartContract
}
}
Transaction {
Hash
}
Block {
Time
Number
}
Log {
Signature {
Name
}
}
}
Events(
where: {Block: {Number: {ge: $fromBlock, le: $toBlock}}, Log: {SmartContract: {in: $pools}, Signature: {Name: {in: ["Mint", "Burn"]}}}}
orderBy: {ascending: Block_Time}
) {
Transaction {
Hash
From
To
}
Block {
Number
Time
}
Log {
Signature {
Name
}
SmartContract
}
Transaction {
From
To
Type
}
LogHeader {
Address
Index
}
Arguments {
Value {
... on EVM_ABI_Integer_Value_Arg {
integer
}
... on EVM_ABI_String_Value_Arg {
string
}
... on EVM_ABI_Address_Value_Arg {
address
}
... on EVM_ABI_Boolean_Value_Arg {
bool
}
... on EVM_ABI_Bytes_Value_Arg {
hex
}
... on EVM_ABI_BigInt_Value_Arg {
bigInteger
}
}
Name
}
}
}
}
Variables
{
"pools": [
"0x28A4Ea3BC63324486a8E3063AC78c019D17B1740",
"0xd01ff1f3cd6df067b7f5863222267209c413dcc7"
],
"fromBlock": "20860791",
"toBlock": "21100730"
}
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