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.52 545
NYQ 172.73 53
HEL 11.55 43
NMS 180.30 41
CCY 1.64 35
TOR 115.96 30
PCX 243.72 23
CCC 2631.66 23
CPH 526.65 18
OSL 144.13 17
FRA 206.01 12
NGM 106.41 10
NCM 6.08 9
GER 156.96 9
NYM 406.46 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