Calculations › Market Breakdown

Show the average latest price by exchange across all symbols

The query

WITH latest AS (
  SELECT DISTINCT ON (tp.ticketnameid) tp.ticketnameid, tp.price
  FROM ticketprice tp
  ORDER BY tp.ticketnameid, tp.datetime DESC
)
SELECT sm.exchange, AVG(l.price) AS avg_price, COUNT(*) AS n
FROM latest l
JOIN symbolmetadata sm ON sm.ticketnameid = l.ticketnameid
WHERE sm.exchange IS NOT NULL AND sm.exchange != ''
GROUP BY sm.exchange
ORDER BY n DESC
LIMIT 15;

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

ExchangeAvg priceCount
STO 299.54 545
NYQ 172.93 53
HEL 11.56 43
NMS 177.46 41
CCY 1.64 35
TOR 116.08 30
PCX 242.58 23
CCC 2736.81 23
CPH 523.83 18
OSL 141.88 17
FRA 205.49 12
NGM 105.47 10
NCM 5.99 9
GER 158.36 9
NYM 410.31 6

Live output, first 15 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