Vector Trades

Returns DEX trades on Ethereum and Avalanche, where base currency is 0x5817…7af4, date since 2022-03-29 and date till 2022-05-01, sorted by date date: date date, count big int, base amount, base currency symbol and timestamp time.

By Michelle Agnew · saved 5 April 2022 · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $dateFormat: String!, $token: String!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  ethereum(network: $network) {
    dexTrades(
      options: {asc: "date.date"}
      date: {since: $from, till: $till}
      baseCurrency: {is: $token}
    ) {
      date: date {
        date(format: $dateFormat)
      }
      trades: countBigInt
      amount: baseAmount
      baseCurrency {
        symbol
      }
      contracts: countBigInt(uniq: smart_contracts)
      currencies: countBigInt(uniq: quote_currency)
      block {
        timestamp {
          time(format: $dateFormat)
        }
      }
    }
  }
}

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "avalanche",
  "token": "0x5817d4f0b62a59b17f75207da1848c2ce75e7af4",
  "from": "2022-03-29",
  "till": "2022-05-01T23:59:59",
  "dateFormat": "%Y-%m-%d %H:00:00"
}

Similar queries