Usd Value at specific time

Returns the latest 1000 DEX trades on Ethereum and BNB Chain, where buy currency is 0xbb4c…095c and time is 2024-03-20 or 2024-03-19: timestamp time, block height, trade index, protocol, full name, buy amount, buy currency symbol and 4 more fields.

By Roni · saved 22 March 2024 · run 10 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: 1000, offset: 0}
      buyCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
      time: {in: ["2024-03-20T23:59:59", "2024-03-19T23:59:59"]}
    ) {
      block(time: {}) {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      protocol
      exchange {
        fullName
      }
      buyAmount
      buyCurrency {
        symbol
      }
      buy_amount_usd: buyAmount(in: USD)
      sellAmount
      sellCurrency {
        symbol
      }
      sell_amount_usd: sellAmount(in: USD)
      priceInUSD: expression(get: "sell_amount_usd / buyAmount")
      transaction {
        hash
      }
    }
  }
}

Similar queries