marketcap and supply

Returns 100 currencies, where since relative round is hours and time duration is 3600, sorted by USD, highest first: currency ID, currency name, currency symbol, market cap, total supply, close, mean and 3 more fields.

By Nadia · saved 26 March 2026 · run 6 times · Bitquery API v2

What it returns

Filters

The query

query topCurrencies {
  Trading {
    Currencies(
      orderBy: {descendingByField: "usd"}
      limit: {count: 100}
      where: {Interval: {Time: {Duration: {eq: 3600}, Start: {since_relative: {hours_ago: 24, round: {in: hours}}}}}}
    ) {
      Currency {
        Id
        Name
        Symbol
      }
      Supply {
        MarketCap
        TotalSupply
      }
      Price {
        Ohlc {
          current_price: Close(
            if: {Interval: {Time: {Start: {is_relative: {round: {in: hours}}}}}}
          )
          prev_price: Close(
            if: {Interval: {Time: {Start: {is_relative: {hours_ago: 1, round: {in: hours}}}}}}
          )
        }
        Average {
          current_mean: Mean(
            if: {Interval: {Time: {Start: {is_relative: {round: {in: hours}}}}}}
          )
          hour_ago_mean: Mean(
            if: {Interval: {Time: {Start: {is_relative: {hours_ago: 1, round: {in: hours}}}}}}
          )
          hour_24_ago_mean: Mean(
            if: {Interval: {Time: {Start: {is_relative: {hours_ago: 24, round: {in: hours}}}}}}
          )
        }
      }
      usd: sum(of: Volume_Usd)
      current_price: calculate(
        expression: "if($Price_Ohlc_current_price=0, $Price_Ohlc_prev_price, $Price_Ohlc_current_price)"
      )
      diff_1h: calculate(
        expression: "round(10000 * ($current_price - $Price_Average_hour_ago_mean) / $Price_Average_hour_ago_mean) / 100"
      )
      diff_24h: calculate(
        expression: "round(10000 * ($current_price - $Price_Average_hour_24_ago_mean) / $Price_Average_hour_24_ago_mean) / 100"
      )
      intervals_with_volume: uniq(
        of: Interval_Time_Start
        if: {Volume: {Usd: {gt: 100000}}}
        selectWhere: {ge: "22"}
      )
    }
  }
}

Similar queries