Reinhard subscription websocket

Streams the latest DEX trades on Ethereum as they happen, where sell currency smart contract is 0x7ae0…BB93 and DEX smart contract is 0x83b3…db15: from, transaction hash, buy amount, buy currency symbol, sell amount, sell currency name and sell currency symbol.

By Divyasshree N · saved 18 August 2023 · run 1 time · Bitquery API v2

What it returns

Filters

The subscription

subscription SubGetTxForPairAddressV2($netzwerk: evm_network, $tokenContractAddress: String, $pairContractAddress: String) {
  EVM(network: $netzwerk, trigger_on: head) {
    buyside: DEXTrades(
      orderBy: {descending: Block_Time}
      where: {Trade: {Sell: {Currency: {SmartContract: {is: $tokenContractAddress}}}, Dex: {SmartContract: {is: $pairContractAddress}, Pair: {SmartContract: {}}}}}
    ) {
      Transaction {
        From
        Hash
      }
      Trade {
        Buy {
          Amount
          Currency {
            Symbol
          }
        }
        Sell {
          Amount
          Currency {
            Name
            Symbol
          }
        }
      }
    }
  }
}

Variables

{
  "tokenContractAddress": "0x7ae075546e8042dC263FA0eb6519ce0a04EABB93",
  "pairContractAddress": "0x83b33b4db2776f119b2ddd902419254775c8db15",
  "netzwerk": "eth"
}

Similar queries