query_v1_to_v2_test_update
Returns the latest DEX trade on Ethereum, where buy currency smart contract is 0x3b60…3e5e, sell currency smart contract is 0xc02a…6cc2 and currency smart contract is 0x3b60…3e5e: block number, block time, transaction index, buy currency symbol, buy price, sell currency name, sell price and 3 more fields.
What it returns
- block number
- block time
- transaction index
- buy currency symbol
- buy price
- sell currency name
- sell price
- sum of transfer amount
- currency symbol
- currency name
Filters
- buy currency smart contract is 0x3b60…3e5e
- sell currency smart contract is 0xc02a…6cc2
- currency smart contract is 0x3b60…3e5e
The query
query MyQuery {
EVM(dataset: archive, network: eth) {
DEXTrades(
where: {Trade: {Buy: {Currency: {SmartContract: {is: "0x3b6060850d818adbcfff23d5b42c855eff043e5e"}}}, Sell: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}}}}
orderBy: {descending: Block_Number, descendingByField: "Transaction_Index"}
limit: {count: 1}
) {
Block {
Number
Time
}
Transaction {
Index
}
Trade {
Buy {
Currency {
Symbol
}
Price
}
Sell {
Currency {
Name
}
Price
}
}
}
Transfers(
where: {Transfer: {Currency: {SmartContract: {is: "0x3b6060850d818adbcfff23d5b42c855eff043e5e"}}}}
) {
minted: sum(
of: Transfer_Amount
if: {Transfer: {Sender: {is: "0x0000000000000000000000000000000000000000"}, Amount: {gt: "0"}}}
)
burned: sum(
of: Transfer_Amount
if: {Transfer: {Sender: {in: ["0x0000000000000000000000000000000000000000", "0x000000000000000000000000000000000000dead"]}, Amount: {gt: "0"}}}
)
Transfer {
Currency {
Symbol
Name
}
}
}
}
}
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