Calculations › Market Breakdown

Show the average latest trading volume by crypto category

The query

-- barchart market-wide: average latest 24h volume by crypto category
WITH latest AS (
  SELECT DISTINCT ON (tp.ticketnameid) tp.ticketnameid, tp.volume
  FROM ticketprice tp JOIN ticketname tn ON tn.id = tp.ticketnameid
  WHERE tn.tickettype = 'crypto_pair'
  ORDER BY tp.ticketnameid, tp.datetime DESC
)
SELECT sm.crypto_category, AVG(l.volume) AS avg_volume, COUNT(*) AS n
FROM latest l
JOIN symbolmetadata sm ON sm.ticketnameid = l.ticketnameid
WHERE sm.crypto_category IS NOT NULL AND sm.crypto_category != ''
GROUP BY sm.crypto_category
ORDER BY avg_volume DESC;

Runs against Cryptobi's market tables — ticketname (symbols), ticketprice (daily prices and volume) and symbolmetadata (sector, exchange, market cap and other reference fields).

Current output

CategoryAvg volumeCount
Layer 1 8065908004.57 7
Other 8010737098 13
Meme 1216674944 1
DeFi 623915008 1

Live output, first 4 rows, refreshed periodically. Model estimates are trend projections from recent prices, not financial advice.

Run this on your own holdings, change it, or write your own in SQL or Python — then put it on a dashboard or have it emailed on a schedule. Free, no credit card.

Sign Up Free

Related calculations