Serve priced open interest for active unarchived market listings

This commit is contained in:
2026-12-03 12:39:03 +08:00
parent e26ba27a24
commit 2a62f1812a
16 changed files with 301 additions and 78 deletions
+2 -1
View File
@@ -3,9 +3,10 @@ SELECT w.market, w.id, w.slug, w.question, w.yes_label, w.no_label, m.rules, m.p
COALESCE(s.source,t.source) AS source, COALESCE(s.event,t.event) AS parent,
COALESCE(a.name,t.group_title) AS group_title,
tick.step_micros, minimum.microshares, member.market IS NOT NULL AS neg_risk,
COALESCE(fee.rate_ppm,0)>0 AS fees_enabled
COALESCE(fee.rate_ppm,0)>0 AS fees_enabled, COALESCE(v.active,1) AS active, COALESCE(v.archived,0) AS archived
FROM market_wire_metadata w
JOIN markets m ON m.id=w.market
LEFT JOIN market_visibility v ON v.market=w.market
LEFT JOIN sports_markets s ON s.market=w.market
LEFT JOIN topic_markets t ON t.market=w.market
LEFT JOIN augmented_outcomes a ON a.market=w.market