quoteprice_check

Returns the latest 50 DEX trades on Ethereum, where smart contract address is 0x57c6…67ad, base currency is 0x74d3…a84d and quote currency is 0xc02a…6cc2: timestamp time, block height, quote price, base currency address, base amount, quote amount, quote currency address and transaction hash.

By Omkar Acharekar · saved 21 April 2023 · run 7 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $limit: Int!, $offset: Int!, $address: String!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: ["block.height"], limit: $limit, offset: $offset}
      date: {since: $from, till: $till}
      smartContractAddress: {is: $address}
      baseCurrency : {is : "0x74d30f4a0bdb5a252de7098d3bb11b4c6ba4a84d"}
      quoteCurrency: {is : "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      quotePrice
      baseCurrency{
        address
      }
      baseAmount
      quoteAmount
      quoteCurrency{
        address
      }
      transaction {
        hash
      }
    }
  }
}

Variables

{
  "limit": 50,
  "offset": 0,
  "network": "ethereum",
  "address": "0x57c6ec8ed6597d36655681feebc40af2f63d67ad",
  "from": "2023-04-18",
  "till": "2023-04-18T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

Similar queries