subscription_check
Streams DEX trades on Ethereum as they happen, where sell currency smart contract is 0xdAC1…1ec7, buy currency smart contract is 0xC02a…6Cc2 and buy currency smart contract is 0xdAC1…1ec7: block time, sell buyer, sell amount, sell currency symbol, buy price, buy amount, buy currency symbol and sell price.
What it returns
- block time
- sell buyer
- sell amount
- sell currency symbol
- buy price
- buy amount
- buy currency symbol
- sell price
Filters
- sell currency smart contract is 0xdAC1…1ec7
- buy currency smart contract is 0xC02a…6Cc2
- buy currency smart contract is 0xdAC1…1ec7
- sell currency smart contract is 0xC02a…6Cc2
The subscription
subscription subscribeTrading(
$network: evm_network!
$baseCurrency: String!
$quoteCurrency: String!
) {
EVM(network: $network) {
buy: DEXTrades(
where: {
Trade: {
Sell: { Currency: { SmartContract: { is: $baseCurrency } } }
Buy: { Currency: { SmartContract: { is: $quoteCurrency } } }
}
}
) {
Block {
Time
}
Trade {
Sell {
Buyer
Amount
Currency {
Symbol
}
}
Buy {
Price
Amount
Currency {
Symbol
}
}
}
}
sell: DEXTrades(
where: {
Trade: {
Buy: { Currency: { SmartContract: { is: $baseCurrency } } }
Sell: { Currency: { SmartContract: { is: $quoteCurrency } } }
}
}
) {
Block {
Time
}
Trade {
Sell {
Price
Buyer
Amount
Currency {
Symbol
}
}
Buy {
Amount
Currency {
Symbol
}
}
}
}
}
}
Variables
{
"network": "eth",
"baseCurrency":"0xdAC17F958D2ee523a2206206994597C13D831ec7",
"quoteCurrency":"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
}
Similar queries
- subscription EVM · Ethereum · DEXTrades
- Stablecoin trades for etheruem · Ethereum · DEXTrades
- Realtime Uniswap V3 Trades · Ethereum · DEXTrades
- get swaps by pair address -eth -stream · Ethereum · DEXTrades
- Realtime Uniswap v1 Uniswap v2 Uniswap V3 Trades · Ethereum · DEXTrades