Price aggregation of AAVE against WBNB

Returns the latest 10 DEX trades by token on BNB Chain, where side currency smart contract is 0xfb61…f802, currency smart contract is 0xbb4c…095c and block date since 2023-07-01: block time, count, currency name, side currency name and trade price.

By gaurav · saved 31 July 2023 · Bitquery API v2

What it returns

Filters

The query

{
  EVM(dataset: combined, network: bsc) {
    buyside: DEXTradeByTokens(
      limit: {count: 10}
      orderBy: {descending: Block_Time}
      where: {Trade: {Side: {Currency: {SmartContract: {is: "0xfb6115445bff7b52feb98650c87f44907e58f802"}}, Amount: {ge: "0"}}, Currency: {SmartContract: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}}}, Block: {Date: {since: "2023-07-01", till: "2023-08-01"}}}
    ) {
      Block {
        Time(interval: {in: days, count: 1})
      }
      distinctBuyer: count(distinct: Trade_Buyer)
      distinctSeller: count(distinct: Trade_Seller)
      distinctSender: count(distinct: Trade_Sender)
      distinctTransactions: count(distinct: Transaction_Hash)
      total_sales: count(
        if: {Trade: {Side: {Currency: {SmartContract: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}}}}}
      )
      total_buys: count(
        if: {Trade: {Side: {Currency: {SmartContract: {is: "0xfb6115445bff7b52feb98650c87f44907e58f802"}}}}}
      )
      total_count: count
      Trade {
        Currency {
          Name
        }
        Side {
          Currency {
            Name
          }
        }
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Number)
        close: Price(maximum: Block_Number)
      }
    }
  }
}

Similar queries