token-price-and-price-change

Returns 8 transfers and DEX trades on Ethereum and BNB Chain, where currency is 0x3481…d306, smart contract address is 0x3481…d306 and base currency is 0x3481…d306, sorted by time interval day, highest first: currency symbol, amount, count, minimum of date, maximum of date, timestamp time, block height and 5 more fields.

By gaurav · saved 4 May 2022 · run 1 time · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    stats: transfers(
      currency: {is: "0x3481ae06214239a896c618bb1c80e0e94ab9d306"}
      amount: {gt: 0}
    ) {
      currency {
        symbol
      }
      median: amount(calculate: median)
      average: amount(calculate: average)
      amount
      count
      days: count(uniq: dates)
      sender_count: count(uniq: senders)
      receiver_count: count(uniq: receivers)
      min_date: minimum(of: date)
      max_date: maximum(of: date)
    }
    price: dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: 1}
      date: {since: "2022-04-27"}
      smartContractAddress: {is: "0x3481ae06214239a896c618bb1c80e0e94ab9d306"}
      baseCurrency: {is: "0x3481ae06214239a896c618bb1c80e0e94ab9d306"}
      quoteCurrency: {is: "0x87b1acce6a1958e522233a737313c086551a5c76"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      quotePrice
    }
    volume: dexTrades(
      options: {desc: "timeInterval.hour", limit: 1}
      date: {since: "2022-04-27"}
    ) {
      tradeAmount(in: USD)
      timeInterval {
        hour(count: 24)
      }
    }
    priceChange_daily_weekly: dexTrades(
      options: {desc: "timeInterval.day", limit: 8}
      date: {since: "2022-04-25"}
      baseCurrency: {is: "0x3481ae06214239a896c618bb1c80e0e94ab9d306"}
      quoteCurrency: {is: "0x87b1acce6a1958e522233a737313c086551a5c76"}
    ) {
      timeInterval {
        day(count: 1, format: "%Y-%m-%d %H:%M:%S")
      }
      quotePrice
    }
  }
}

Similar queries