latest price of ape token

Returns the latest DEX trade on Ethereum, where base currency is 0x4d22…4381, quote currency is 0xdac1…1ec7 and date since 2022-05-16: timestamp time, block height, quote price, trade index, protocol, full name, address address and 8 more fields.

By gaurav · saved 17 May 2022 · run 2 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $token: String!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: $limit, offset: $offset}
      date: {since: $from}
      baseCurrency: {is: $token}
      quoteCurrency: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      quotePrice
      tradeIndex
      protocol
      exchange {
        fullName
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      baseAmount
      baseCurrency {
        address
        symbol
      }
      quoteAmount
      quoteCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
  }
}

Variables

{
  "limit": 1,
  "offset": 0,
  "network": "ethereum",
  "token": "0x4d224452801aced8b2f0aebe155379bb5d594381",
  "from": "2022-05-16",
  "dateFormat": "%Y-%m-%d"
}

Similar queries