Subscription for the Latest Trades of NFT Token

Streams the latest DEX trades on Ethereum as they happen, where buy currency smart contract is 0x0fcb…4170: chain ID, block time, transaction hash, protocol family, protocol name, protocol version, smart contract and 11 more fields.

By Nadia · saved 31 May 2023 · Bitquery API v2

What it returns

Filters

The subscription

subscription($network: evm_network, $token: String) {
  EVM(network: $network){
    DEXTrades(
      orderBy: {descending: Block_Number}
      where: {
        Trade: {
          Buy: {
            Currency: { SmartContract: {is: $token }}
          }
        }
      }
    ){
      ChainId
      Block {
        Time
      }
      Transaction {
        Hash
      }
      Trade {

        Dex {
          ProtocolFamily
          ProtocolName
          ProtocolVersion
          SmartContract
        }
        
        Buy {
            Currency {
            Symbol
            SmartContract
          }   
					Price
          Amount
          Buyer
          Ids
          URIs
        }
        Sell {
          Seller
          Amount
          Currency {
            Symbol
            SmartContract
          }        
        }
      }
    }
  }
}

Variables

{
  "network": "eth",
  "token": "0x0fcbd68251819928c8f6d182fc04be733fa94170"
}

Similar queries