Latest price of Aave

Returns the latest DEX trade on Ethereum, where buy currency is 0x7fc6…dae9: timestamp time, block height, trade index, protocol, full name, buy amount, buy currency symbol and 3 more fields.

By gaurav · saved 28 June 2023 · run 44 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: 1, offset: 0}
      buyCurrency: {is: "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"}
    ) {
      block {
        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: "buy_amount_usd / buyAmount")
    }
  }
}

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "ethereum",
  "from": "2023-06-28",
  "till": "2023-06-28T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

Similar queries