bsc trades for a protocol

Returns the latest 10 DEX trades on BNB Chain, where buy currency smart contract is 0x38f2…49ac and DEX protocol name is uniswap_v2: block number, block time, from, to, transaction hash, buy amount, buy buyer and 15 more fields.

By Aparna Sridhar · saved 1 March 2024 · run 2 times · Bitquery API v2

What it returns

Filters

The query

{
  EVM(dataset: realtime, network: bsc) {
    buyside: DEXTrades(
      limit: {count: 10}
      orderBy: {descending: Block_Time}
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0x38f2865142a4fc0f37f9dd833475c280bc3849ac"}}}, Dex: {ProtocolName: {is: "uniswap_v2"}}}}
    ) {
      Block {
        Number
        Time
      }
      Transaction {
        From
        To
        Hash
      }
      Trade {
        Buy {
          Amount
          Buyer
          Currency {
            Name
            Symbol
            SmartContract
          }
          Seller
          Price
        }
        Sell {
          Amount
          Buyer
          Currency {
            Name
            SmartContract
            Symbol
          }
          Seller
          Price
        }
        Dex {
          ProtocolFamily
          ProtocolName
          SmartContract
          Pair {
            SmartContract
          }
        }
      }
    }
  }
}

Similar queries