Copy of New Query
Streams the latest 50 DEX trades by token and miner rewards on Optimism as they happen, where currency smart contract is 0x4200…0006, side currency smart contract is 0x0b2c…ff85, 0x94b0…8e58 or 2 more and block time since 2025-01-18: quantile of trade price in USD, block time, transaction hash, smart contract, protocol family, protocol name, amount in USD and 12 more fields.
What it returns
- quantile of trade price in USD
- block time
- transaction hash
- smart contract
- protocol family
- protocol name
- amount in USD
- buyer
- seller
- side type
- side buyer
- side seller
- price in USD
- trade amount
- side currency symbol
- side smart contract
- side currency name
- side amount in USD
- side amount
Filters
- currency smart contract is 0x4200…0006
- side currency smart contract is 0x0b2c…ff85, 0x94b0…8e58 or 2 more
- block time since 2025-01-18
- trade price is above 0
The subscription
subscription LatestTrades($network: evm_network, $token: String, $usdc: String!, $usdt: String!, $weth: String!, $usdc2: String!, $time_ago: DateTime) {
EVM(network: $network) {
DEXTradeByTokens(
orderBy: {descending: Block_Time}
limit: {count: 50}
where: {TransactionStatus: {Success: true}, Trade: {Currency: {SmartContract: {is: $token}}, Price: {gt: 0}, Side: {Currency: {SmartContract: {in: [$usdc, $usdt, $weth, $usdc2]}}}}, Block: {Time: {since: $time_ago}}}
) {
min: quantile(of: Trade_PriceInUSD, level: 0.05)
max: quantile(of: Trade_PriceInUSD, level: 0.95)
Block {
Time
}
Transaction {
Hash
}
Trade {
Dex {
SmartContract
ProtocolFamily
ProtocolName
}
AmountInUSD
Buyer
Seller
Side {
Type
Buyer
Seller
}
PriceInUSD
close: PriceInUSD
Amount
Side {
Currency {
Symbol
SmartContract
Name
}
AmountInUSD
Amount
}
}
}
MinerRewards
Events
}
}
Variables
{
"network": "optimism",
"token": "0x4200000000000000000000000000000000000006",
"usdc": "0x0b2c639c533813f4aa9d7837caf62653d097ff85",
"usdc2": "0x7f5c764cbc14f9669b88837ca1490cca17c31607",
"usdt": "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",
"weth": "0x4200000000000000000000000000000000000006",
"dataset": "combined",
"time_ago": "2025-01-18T10:00:24Z",
"interval": 5
}
Similar queries
- realtime slippage on optimism · Optimism · DEXPoolSlippages
- Real time smart contract calls for optimism · Optimism · Calls
- Real time Smart contract events on Optimism · Optimism · Events
- Latest trades on optimism webhook · Optimism · DEXTrades
- Whale transfers of USDC on optimism · Optimism · Transfers