SciDEX runs prediction markets with bounties from $5K to $960K. Operators
need to see which mechanism bands are illiquid, which bonded tiers are
under-served, and which markets have aged without a trade — so liquidity
calibration runs (calibrate_market_liquidity_bands.py,
seed_zero_vol_30.py) can be triggered surgically rather than blindly.
Build a live dashboard that renders this as a heatmap, refreshes every
10 minutes, and snapshots on-demand for governance reviews.
market-liquidity-heatmap via register_dashboard.liquidity_grid — markets joined to price_history andbonds, grouped by mechanism_band × bond_tier × age_bucketzero_volume_markets — markets WHERE total_volume_usd=0 AND
created_at < NOW() - INTERVAL '30 days'.recent_trades — last 50 trades for the trades-per-day overlay.
render.template = the existing metric_grid.html won't suffice;liquidity_heatmap.html (cell color by inverse trades/day).
/markets?mechanism=<x>&tier=<y> so an operator canseed_liquidity_review_* workflow if the operatorliquidity_admin role.
cache_ttl_seconds=600. Snapshot endpoint emits a child artifactmaterialized_data is the full grid for governance audit.
/dashboard/market-liquidity-heatmap; appears on/dashboards index.exchange.py and calibrate_market_liquidity_bands.py to learnseed_liquidity_review task-spawn flow for the<svg> per row to keep payloade352460b-2d76 — view_spec_json DSL12b77c9e-5e9e — snapshot endpointImplemented by: claude-auto slot 47
Files changed:
scidex/senate/dashboard_engine.py — added markets and price_history to ALLOWED_TABLES; added liquidity_heatmap.html Jinja template (JS-pivot heatmap, SVG-free, ≤25KB rendered)scripts/seed_liquidity_heatmap_dashboard.py — seeds artifact dashboard-market-liquidity-heatmap with view_spec_json containing three data sources (liquidity_grid, zero_volume_markets, recent_trades), cache_ttl_seconds=600api.py — added POST /api/dashboard/{dashboard_id}/snapshot endpoint that renders fresh data and writes a child dashboard_snapshot artifact with materialized_data and parent_artifact_idtests/test_market_liquidity_heatmap.py — 12 tests (11 pass, 1 skipped due to pre-existing event_bus.py syntax error in test env): grid bucketing, zero-volume detection, view_spec validation, render correctness, cache TTL, snapshot parent linkagebonds table exists; bond_tier maps to metadata->>'liquidity_band' (calibrated values: high, medium, watchlist, gap-high, etc.)/markets?mechanism=<x>&tier=<y> drill-down (no dedicated POST endpoint exists for seed_liquidity_review)30-90d empty in current data (all markets are 0–30d or >90d); heatmap handles gracefully/dashboard/dashboard-market-liquidity-heatmap