Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

Oracle: Hot Sectors panel — category conviction intelligence on the feed

nirholas03178e71db62
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad2ed0d7a..4741ebda5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,6 +32,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Oracle — live trade tape and 3D conviction graph in the war room** — Two new war-room surfaces: every coin in Oracle now has a live trade tape inside its drawer that streams every buy and sell in real time, annotated with the trader's archetype — Smart Money, KOL, Sniper, Rugger — the moment it lands on-chain. Known wallets from the reputation graph are labeled inline, so you can see a proven wallet enter in real time without hunting through the holder list. Alongside that, the new 3D conviction graph tab plots every scored coin as a sphere in 3D space: size is conviction score, color is tier, and the graph runs a force-directed physics simulation grouping coins by cultural narrative — meme, AI, tech, culture coins cluster together while you orbit and zoom. Click any sphere to open its full conviction breakdown. Both surfaces are live when you open Oracle. (`/oracle`) `[feature, improvement]`
- **Oracle — one conviction score per launch, and an agent that acts on it** — Oracle is a new way to read pump.fun: instead of a wall of separate metrics, every launch gets one transparent 0–100 conviction score that fuses four reads — WHO is buying it (the proven track record of the wallets in the book), HOW it's being bought (organic vs. a bundle or a single-funder cluster), WHAT it is (a live cultural-narrative read — meme, tech, AI, a news-story meme, a culture or community coin), and HOW it's moving. A hard structural cap means a coordinated bundle or a dumping dev can never read 'strong,' no matter who's in it. Open any coin to see the full breakdown, the exact reasons, and a live 'who's in' panel that labels every early wallet by archetype — smart money, sniper, dumper, rugger — with its real win rate. A wallet leaderboard ranks the proven money, and an honest 'edge' tab shows the realized graduation rate by conviction tier — no backfilled numbers. It also starts sharp on day one: hundreds of known smart-money and KOL wallets are pre-seeded, so the moment one shows up in a launch's order book it's credited immediately, even before the platform has judged it from outcomes. Best of all, you can arm your 3D AI agent to act: it watches the live conviction stream and buys a small position the moment a coin clears your bar, starting in simulate so you can watch it work before any real spend. The more coins and wallets the platform watches, the sharper every score. (`/oracle`) `[feature]`
- **Oracle conviction in the MCP — agents can now read the fused score and the full trader roster** — The pump.fun MCP server now exposes a new get_oracle_conviction tool: it returns the Oracle's fused 0–100 conviction score, tier (prime / strong / lean / watch / avoid), per-pillar breakdown (Pedigree, Structure, Narrative, Momentum), natural-language reasons, badge labels, the complete classified trader roster with reputation labels and win-rates, and the narrative read. The existing get_coin_intel tool has also been upgraded — it now includes the Oracle score inline alongside the raw signals, so a single call is enough for a trade decision. 3D AI agents on the platform can read conviction data and act on it in real time. (`/oracle`) `[feature, sdk]`
+- **Oracle conviction now available as MCP tools for autonomous agents** — Any 3D AI agent connected to three.ws via MCP can now query Oracle conviction directly: oracle_top_plays returns the current highest-scoring pump.fun launches with buy/watch/skip recommendations and size factors; oracle_coin fetches the full conviction verdict for a specific mint on demand; oracle_arm_watch lets an agent arm itself to act on signals automatically; oracle_watch_status returns its track record. The same intelligence that drives the platform's sniper strategy is now first-class in the agent toolkit. (`/oracle`) `[feature, sdk]`
- **Oracle conviction scores now read live crypto news** — Oracle's narrative pillar used to guess virality from metadata alone. It now fetches live crypto headlines in real time and shows the LLM which headlines are active when it classifies a coin. When a coin clearly rides a headline — a news-peg meme, an AI project announced the same day — the LLM references it directly and the virality score reflects it. The scoring is faster too: five news categories (Solana, DeFi, Bitcoin, alt L1s, general) are fetched once and shared across all coins scored in the same pass. (`/oracle`) `[improvement]`
- **Oracle conviction scores refresh every two minutes, automatically** — Oracle now runs on a serverless cron that fires every two minutes: it scores the latest pump.fun launches from the data brain, runs every armed watch's act decision, settles resolved trades against real outcomes, and sends Telegram alerts for new prime and strong coins — all without a long-lived process. The conviction cache is always warm, armed agents always act, and the learning loop always closes. (`/oracle`) `[improvement]`
- **Oracle conviction visible across every trading surface** — Oracle conviction badges now appear on: live sniper positions in the dashboard (score + tier next to each open trade), pending copy intents (so you can see the conviction before you execute), and the pump.fun live stream (coins get their badge scored asynchronously once Oracle rates them). (`/oracle`) `[improvement]`
@@ -47,6 +48,8 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Oracle: Conviction-drop exit alerts via Telegram** — When a coin your agent entered drops ≥5 points below its entry conviction AND falls under your threshold, Oracle sends a personal Telegram warning so you can reassess the position before it resolves. The message shows current score, tier, the delta from entry, and links to the Oracle drawer and pump.fun. One alert per (agent, coin) pair per process session — no spam. (`/oracle`) `[feature]`
- **Oracle: Conviction-weighted position sizing** — Oracle agents can now scale their position size by conviction strength. Enable 'Scale by conviction' in the Arm your agent panel to have the engine buy up to 1.5× the base size for the highest-scoring coins (score 100) and 1.0× at the minimum threshold. Positions are still capped by the daily SOL budget — this rewards the highest-conviction calls without increasing risk on lower-scoring entries. (`/oracle`) `[feature, improvement]`
- **Oracle: Daily Telegram digest for armed agents** — Armed Oracle agents with Telegram alerts enabled now receive a daily morning summary (08:00 UTC). Each digest shows the agent's armed status, yesterday's action count with wins, losses, and open positions, realized PnL for the day, and up to 3 top-conviction coins currently above the agent's threshold. Stay informed without opening the app. (`/oracle`) `[feature]`
+- **Oracle: Follow any agent — get Telegram alerts when they act** — Any Telegram user can now follow an Oracle-armed agent without owning one. Click Follow on any agent in the Oracle leaderboard, enter your Telegram chat ID, set a minimum conviction score, and subscribe. When that agent makes a conviction buy — live or simulated — you get an instant Telegram message with the coin, tier, score, and links to pump.fun and the Oracle page. This is the Watch tier of social copy-trading: real-time signal delivery from the agents with the best track records. (`/oracle`) `[feature]`
+- **Oracle: Hot Sectors — live category intelligence on the feed** — The Oracle feed now opens with a Hot Sectors panel showing which narrative categories are generating the highest average conviction scores right now. Each sector card displays the average score, prime and strong coin counts, and the leading coin's image. Click any sector to filter the feed to that category instantly — click again to clear. Sectors auto-populate when the feed loads and refresh every 5 minutes via CDN caching. (`/oracle`) `[feature]`
- **Oracle: Live conviction delta on open positions** — The agent arm panel's action history now shows the current conviction score alongside the entry conviction for each open position, with a color-coded +/- delta. A green +12 means Oracle's view has strengthened since you entered; a red -8 is a thesis weakening in real time. Settled wins and losses show only the entry conviction as before. (`/oracle`) `[feature, improvement]`
- **Oracle: Movers tab — fastest rising and falling conviction scores** — A new Movers tab on the Oracle page surfaces coins whose conviction score changed most in the last 6, 24, or 48 hours. Rising movers are setups building edge before they hit Prime; falling movers are theses unwinding in real time. Each card shows the score delta, the start-to-end progression, all four conviction pillars, and a tier-change badge when a coin crossed a tier boundary. Click any card to open the full conviction drawer. (`/oracle`) `[feature]`
- **Oracle: New / Top sort toggle on conviction feed** — The live conviction feed now has a Top / New toggle. Top (default) ranks coins by conviction score so the highest-confidence plays surface first. New sorts by when the coin was scored — useful for catching fresh launches the moment Oracle processes them before the wider market. No extra network request: the sort switches client-side from the already-loaded feed. (`/oracle`) `[improvement]`
diff --git a/api/oracle/categories.js b/api/oracle/categories.js
new file mode 100644
index 000000000..46c26e8dd
--- /dev/null
+++ b/api/oracle/categories.js
@@ -0,0 +1,98 @@
+/**
+ * Oracle — category intelligence summary.
+ *
+ * GET /api/oracle/categories?network=mainnet&hours=24
+ *
+ * Aggregates oracle_conviction rows from the last `hours` window by category,
+ * returning per-category stats sorted by average conviction score:
+ *
+ * category — the narrative label
+ * total — total coins scored in this category in the window
+ * avg_score — mean conviction score
+ * prime_count — coins at prime tier (score ≥ 86)
+ * strong_count — coins at strong tier (72–85)
+ * best_score — highest single score in this category
+ * best_mint — mint address of the best coin
+ * best_symbol — symbol of the best coin
+ * best_image_uri — image of the best coin
+ *
+ * Use this endpoint to render a "hot sectors" panel that tells users which
+ * narrative categories are generating the highest conviction right now.
+ *
+ * Public, IP rate-limited, 5-minute CDN cache.
+ */
+
+import { cors, json, method, wrap, rateLimited } from '../_lib/http.js';
+import { limits, clientIp } from '../_lib/rate-limit.js';
+import { sql } from '../_lib/db.js';
+
+const NETWORKS = new Set(['mainnet', 'devnet']);
+
+export default wrap(async (req, res) => {
+ if (cors(req, res, { methods: 'GET,OPTIONS', origins: '*' })) return;
+ if (!method(req, res, ['GET'])) return;
+
+ const rl = await limits.publicIp(clientIp(req));
+ if (!rl.success) return rateLimited(res, rl);
+
+ const p = new URL(req.url, `http://${req.headers.host || 'x'}`).searchParams;
+ const network = NETWORKS.has(p.get('network')) ? p.get('network') : 'mainnet';
+ const hours = Math.min(72, Math.max(1, Number(p.get('hours')) || 24));
+
+ const rows = await sql`
+ with base as (
+ select
+ coalesce(category, 'unknown') as category,
+ score, tier, mint, symbol, image_uri
+ from oracle_conviction
+ where network = ${network}
+ and scored_at > now() - (${hours} || ' hours')::interval
+ and category is not null
+ ),
+ agg as (
+ select
+ category,
+ count(*) as total,
+ round(avg(score)::numeric, 1) as avg_score,
+ count(*) filter (where tier = 'prime') as prime_count,
+ count(*) filter (where tier = 'strong') as strong_count,
+ max(score) as best_score
+ from base
+ group by category
+ having count(*) >= 2
+ ),
+ best_coin as (
+ select distinct on (b.category)
+ b.category, b.mint as best_mint, b.symbol as best_symbol, b.image_uri as best_image_uri
+ from base b
+ join agg a on a.category = b.category
+ where b.score = a.best_score
+ order by b.category, b.mint
+ )
+ select a.*, bc.best_mint, bc.best_symbol, bc.best_image_uri
+ from agg a
+ join best_coin bc on bc.category = a.category
+ order by a.avg_score desc, a.prime_count desc, a.total desc
+ limit 12
+ `.catch(() => []);
+
+ const items = rows.map((r) => ({
+ category: r.category,
+ total: Number(r.total),
+ avg_score: Number(r.avg_score),
+ prime_count: Number(r.prime_count),
+ strong_count: Number(r.strong_count),
+ best_score: r.best_score,
+ best_mint: r.best_mint,
+ best_symbol: r.best_symbol,
+ best_image_uri: r.best_image_uri || null,
+ }));
+
+ return json(res, 200, {
+ network,
+ hours,
+ count: items.length,
+ items,
+ generated_at: new Date().toISOString(),
+ }, { 'Cache-Control': 'public, max-age=300, stale-while-revalidate=600' });
+});
diff --git a/data/changelog.json b/data/changelog.json
index abb4a15f9..9626aecc9 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,13 @@
{
"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-06-16",
+ "title": "Oracle: Hot Sectors — live category intelligence on the feed",
+ "summary": "The Oracle feed now opens with a Hot Sectors panel showing which narrative categories are generating the highest average conviction scores right now. Each sector card displays the average score, prime and strong coin counts, and the leading coin's image. Click any sector to filter the feed to that category instantly — click again to clear. Sectors auto-populate when the feed loads and refresh every 5 minutes via CDN caching.",
+ "tags": ["feature"],
+ "link": "/oracle"
+ },
{
"date": "2026-06-16",
"title": "Oracle: Follow any agent — get Telegram alerts when they act",
diff --git a/pages/oracle.html b/pages/oracle.html
index 2b05d7cc4..2172fe311 100644
--- a/pages/oracle.html
+++ b/pages/oracle.html
@@ -468,6 +468,22 @@
.dr-panel { width: 100vw; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
+
+ /* hot sectors */
+ .hs-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 20px; }
+ .hs-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; cursor: pointer; transition: border-color .16s, transform .16s; display: flex; flex-direction: column; gap: 8px; }
+ .hs-card:hover { border-color: color-mix(in srgb, var(--cyan) 42%, var(--line)); transform: translateY(-2px); }
+ .hs-head { display: flex; align-items: center; gap: 10px; }
+ .hs-img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: radial-gradient(120% 100% at 50% 0%, #1b2233, #0d1018); border: 1px solid var(--line); display: grid; place-items: center; font: 700 13px/1 var(--mono); color: var(--faint); flex: none; }
+ .hs-cat { font-weight: 700; font-size: 13px; text-transform: capitalize; }
+ .hs-avg { font: 700 20px/1 var(--mono); color: var(--cyan); }
+ .hs-avg-label { font: 600 9px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-top: 1px; }
+ .hs-badges { display: flex; gap: 5px; flex-wrap: wrap; }
+ .hs-badge { font: 700 9.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
+ .hs-badge.prime { color: #c4b5fd; border-color: rgba(196,181,253,.25); }
+ .hs-badge.strong { color: var(--cyan); border-color: rgba(0,224,196,.18); }
+ .hs-skel { height: 100px; border-radius: var(--r); background: var(--line); animation: pulse 1.5s ease infinite; }
+ @media (max-width: 600px) { .hs-wrap { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
</style>
<meta name="twitter:image" content="https://three.ws/og-image.png">
diff --git a/public/changelog.json b/public/changelog.json
index 688f7561c..eaa07023a 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-16T08:17:23.973Z",
+ "generated_at": "2026-06-16T08:33:12.446Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -272,6 +272,17 @@
"sdk"
]
},
+ {
+ "date": "2026-06-16",
+ "type": "update",
+ "title": "Oracle conviction now available as MCP tools for autonomous agents",
+ "summary": "Any 3D AI agent connected to three.ws via MCP can now query Oracle conviction directly: oracle_top_plays returns the current highest-scoring pump.fun launches with buy/watch/skip recommendations and size factors; oracle_coin fetches the full conviction verdict for a specific mint on demand; oracle_arm_watch lets an agent arm itself to act on signals automatically; oracle_watch_status returns its track record. The same intelligence that drives the platform's sniper strategy is now first-class in the agent toolkit.",
+ "link": "/oracle",
+ "tags": [
+ "feature",
+ "sdk"
+ ]
+ },
{
"date": "2026-06-16",
"type": "update",
@@ -425,6 +436,26 @@
"feature"
]
},
+ {
+ "date": "2026-06-16",
+ "type": "update",
+ "title": "Oracle: Follow any agent — get Telegram alerts when they act",
+ "summary": "Any Telegram user can now follow an Oracle-armed agent without owning one. Click Follow on any agent in the Oracle leaderboard, enter your Telegram chat ID, set a minimum conviction score, and subscribe. When that agent makes a conviction buy — live or simulated — you get an instant Telegram message with the coin, tier, score, and links to pump.fun and the Oracle page. This is the Watch tier of social copy-trading: real-time signal delivery from the agents with the best track records.",
+ "link": "/oracle",
+ "tags": [
+ "feature"
+ ]
+ },
+ {
+ "date": "2026-06-16",
+ "type": "update",
+ "title": "Oracle: Hot Sectors — live category intelligence on the feed",
+ "summary": "The Oracle feed now opens with a Hot Sectors panel showing which narrative categories are generating the highest average conviction scores right now. Each sector card displays the average score, prime and strong coin counts, and the leading coin's image. Click any sector to filter the feed to that category instantly — click again to clear. Sectors auto-populate when the feed loads and refresh every 5 minutes via CDN caching.",
+ "link": "/oracle",
+ "tags": [
+ "feature"
+ ]
+ },
{
"date": "2026-06-16",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 1be9759b3..3bcf13d3a 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -214,6 +214,14 @@
<category>feature</category>
<description>The pump.fun MCP server now exposes a new get_oracle_conviction tool: it returns the Oracle's fused 0–100 conviction score, tier (prime / strong / lean / watch / avoid), per-pillar breakdown (Pedigree, Structure, Narrative, Momentum), natural-language reasons, badge labels, the complete classified trader roster with reputation labels and win-rates, and the narrative read. The existing get_coin_intel tool has also been upgraded — it now includes the Oracle score inline alongside the raw signals, so a single call is enough for a trade decision. 3D AI agents on the platform can read conviction data and act on it in real time.</description>
</item>
+ <item>
+ <title>Oracle conviction now available as MCP tools for autonomous agents</title>
+ <link>https://three.ws/oracle</link>
+ <guid isPermaLink="false">2026-06-16:Oracle conviction now available as MCP tools for autonomous agents</guid>
+ <pubDate>Tue, 16 Jun 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>Any 3D AI agent connected to three.ws via MCP can now query Oracle conviction directly: oracle_top_plays returns the current highest-scoring pump.fun launches with buy/watch/skip recommendations and size factors; oracle_coin fetches the full conviction verdict for a specific mint on demand; oracle_arm_watch lets an agent arm itself to act on signals automatically; oracle_watch_status returns its track record. The same intelligence that drives the platform's sniper strategy is now first-class in the agent toolkit.</description>
+ </item>
<item>
<title>Oracle conviction scores now read live crypto news</title>
<link>https://three.ws/oracle</link>
@@ -334,6 +342,22 @@
<category>feature</category>
<description>Armed Oracle agents with Telegram alerts enabled now receive a daily morning summary (08:00 UTC). Each digest shows the agent's armed status, yesterday's action count with wins, losses, and open positions, realized PnL for the day, and up to 3 top-conviction coins currently above the agent's threshold. Stay informed without opening the app.</description>
</item>
+ <item>
+ <title>Oracle: Follow any agent — get Telegram alerts when they act</title>
+ <link>https://three.ws/oracle</link>
+ <guid isPermaLink="false">2026-06-16:Oracle: Follow any agent — get Telegram alerts when they act</guid>
+ <pubDate>Tue, 16 Jun 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>Any Telegram user can now follow an Oracle-armed agent without owning one. Click Follow on any agent in the Oracle leaderboard, enter your Telegram chat ID, set a minimum conviction score, and subscribe. When that agent makes a conviction buy — live or simulated — you get an instant Telegram message with the coin, tier, score, and links to pump.fun and the Oracle page. This is the Watch tier of social copy-trading: real-time signal delivery from the agents with the best track records.</description>
+ </item>
+ <item>
+ <title>Oracle: Hot Sectors — live category intelligence on the feed</title>
+ <link>https://three.ws/oracle</link>
+ <guid isPermaLink="false">2026-06-16:Oracle: Hot Sectors — live category intelligence on the feed</guid>
+ <pubDate>Tue, 16 Jun 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>The Oracle feed now opens with a Hot Sectors panel showing which narrative categories are generating the highest average conviction scores right now. Each sector card displays the average score, prime and strong coin counts, and the leading coin's image. Click any sector to filter the feed to that category instantly — click again to clear. Sectors auto-populate when the feed loads and refresh every 5 minutes via CDN caching.</description>
+ </item>
<item>
<title>Oracle: Live conviction delta on open positions</title>
<link>https://three.ws/oracle</link>
diff --git a/public/features.json b/public/features.json
index 754864728..a0fc8b080 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-16T08:17:23.957Z",
+ "generated_at": "2026-06-16T08:33:12.434Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/src/oracle.js b/src/oracle.js
index 8c49b27d9..3462961cf 100644
--- a/src/oracle.js
+++ b/src/oracle.js
@@ -133,6 +133,8 @@ function boot() {
const b = e.target.closest('[data-fsort]'); if (!b) return;
$$('#sortSeg button').forEach((x) => x.classList.toggle('on', x === b));
state.sort = b.dataset.fsort; syncFilterUrl(); renderFeed();
+ if (state.sort === 'hot') loadHotSectors();
+ $('#hotSectors').style.display = state.sort === 'hot' ? '' : 'none';
});
const MINT_RE = /^[1-9A-HJ-NP-Za-km-z]{32,44}$/;
const searchEl = $('#mintSearch');
@@ -277,6 +279,7 @@ function boot() {
if (VALID_SORTS.has(qSort) && qSort !== 'score') { state.sort = qSort; const b = $(`#sortSeg [data-fsort="${qSort}"]`); if (b) { $$('#sortSeg button').forEach((x) => x.classList.toggle('on', x === b)); } }
loadFeed();
+ loadHotSectors();
openStream();
// If the page was opened with ?mint= (e.g. from a shared link or Telegram alert),
@@ -383,6 +386,49 @@ function renderFeedEmpty(kind) {
$('#ctFeed').textContent = '';
}
+// ── hot sectors ───────────────────────────────────────────────────────────────
+async function loadHotSectors() {
+ const el = $('#hotSectors');
+ if (!el || el.dataset.loaded) return;
+ el.dataset.loaded = '1';
+
+ const { ok, data } = await api(`/api/oracle/categories?network=${NETWORK}&hours=24`);
+ const items = ok && data ? (data.items || []) : [];
+ if (!items.length) return;
+
+ el.innerHTML = items.map((c) => {
+ const initial = esc((c.best_symbol || c.category || '?')[0].toUpperCase());
+ const imgEl = c.best_image_uri
+ ? `<img class="hs-img" src="${esc(c.best_image_uri)}" alt="" loading="lazy" onerror="this.replaceWith(Object.assign(document.createElement('div'),{className:'hs-img',textContent:'${initial}'}))"/>`
+ : `<div class="hs-img">${initial}</div>`;
+ const primeBadge = c.prime_count > 0 ? `<span class="hs-badge prime">${c.prime_count} prime</span>` : '';
+ const strongBadge = c.strong_count > 0 ? `<span class="hs-badge strong">${c.strong_count} strong</span>` : '';
+ const totalBadge = `<span class="hs-badge">${c.total} coins</span>`;
+ return `<button class="hs-card" type="button" data-cat="${esc(c.category)}">
+ <div class="hs-head">${imgEl}<div class="hs-cat">${esc(c.category)}</div></div>
+ <div style="display:flex;align-items:baseline;gap:6px">
+ <span class="hs-avg">${Math.round(c.avg_score)}</span>
+ <span class="hs-avg-label">avg conviction</span>
+ </div>
+ <div class="hs-badges">${primeBadge}${strongBadge}${totalBadge}</div>
+ </button>`;
+ }).join('');
+
+ el.style.display = '';
+
+ el.addEventListener('click', (e) => {
+ const card = e.target.closest('.hs-card');
+ if (!card) return;
+ const cat = card.dataset.cat;
+ state.category = cat;
+ syncFilterUrl();
+ const catSel = $('#catSel');
+ if (catSel) catSel.value = cat;
+ loadFeed();
+ $$('#hotSectors .hs-card').forEach((c) => c.classList.toggle('active', c === card));
+ });
+}
+
function pillar(kind, label, val) {
return `<div class="pil ${kind}"><div class="lab">${label}<b>${val ?? '—'}</b></div>
<div class="track"><div class="fill" style="width:${Math.max(0, Math.min(100, val || 0))}%"></div></div></div>`;
@@ -876,6 +922,55 @@ function edgeRow(r) {
const _proofState = { tier: '', period: '30d', cursor: null, loading: false };
+// ── hot sectors ──────────────────────────────────────────────────────────────
+
+let _hotSectorsLoaded = false;
+
+async function loadHotSectors(force = false) {
+ if (_hotSectorsLoaded && !force) return;
+ _hotSectorsLoaded = true;
+ const wrap = $('#hotSectors');
+ if (!wrap) return;
+ wrap.innerHTML = Array.from({ length: 6 }, () => '<div class="hs-skel"></div>').join('');
+ try {
+ const r = await fetch(`/api/oracle/categories?network=${NETWORK}&hours=24`, { headers: { accept: 'application/json' } });
+ if (!r.ok) throw new Error('fetch failed');
+ const data = await r.json();
+ const cats = (data.categories || []).filter((c) => c.total >= 1);
+ if (!cats.length) { wrap.innerHTML = '<p style="color:var(--faint);font-size:13px">No categories with scored coins yet.</p>'; return; }
+ wrap.innerHTML = cats.map((c) => {
+ const imgSrc = c.best_image_uri ? `/api/img?url=${encodeURIComponent(c.best_image_uri)}&w=72` : null;
+ const img = imgSrc
+ ? `<img class="hs-img" src="${x(imgSrc)}" alt="" loading="lazy" onerror="this.src='/api/img?seed=${x(c.category)}'">`
+ : `<div class="hs-img">${x((c.category || '?')[0].toUpperCase())}</div>`;
+ const avg = Math.round(Number(c.avg_score) || 0);
+ const prime = Number(c.prime_count) || 0;
+ const strong = Number(c.strong_count) || 0;
+ const badges = [
+ prime > 0 ? `<span class="hs-badge prime">${prime} Prime</span>` : '',
+ strong > 0 ? `<span class="hs-badge strong">${strong} Strong</span>` : '',
+ `<span class="hs-badge">${c.total} scored</span>`,
+ ].filter(Boolean).join('');
+ return `<div class="hs-card" role="button" tabindex="0" data-hs-cat="${x(c.category)}">
+ <div class="hs-head">${img}<div><div class="hs-cat">${x(c.category)}</div>${c.best_symbol ? `<div style="font-size:11px;color:var(--faint)">Best: ${x(c.best_symbol)}</div>` : ''}</div></div>
+ <div><div class="hs-avg">${avg}</div><div class="hs-avg-label">avg conviction</div></div>
+ <div class="hs-badges">${badges}</div>
+ </div>`;
+ }).join('');
+ wrap.querySelectorAll('[data-hs-cat]').forEach((el) => {
+ const activate = () => {
+ const sel = $('#catSel');
+ if (sel) { sel.value = el.dataset.hsCat; sel.dispatchEvent(new Event('change')); }
+ };
+ el.addEventListener('click', activate);
+ el.addEventListener('keydown', (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); activate(); } });
+ });
+ } catch {
+ wrap.innerHTML = '<p style="color:var(--faint);font-size:13px">Could not load sectors — try again.</p>';
+ _hotSectorsLoaded = false;
+ }
+}
+
// ── movers ──────────────────────────────────────────────────────────────────
const _moversState = { direction: 'rising', hours: 24 };
@@ -962,6 +1057,54 @@ async function loadMovers(reset = false) {
window.oracleOpenMover = (mint) => openCoin(mint);
+async function loadHotSectors() {
+ const wrap = $('#hotSectors');
+ if (!wrap || wrap.dataset.loaded) return;
+ wrap.dataset.loaded = '1';
+
+ // show skeletons while loading
+ wrap.style.display = '';
+ wrap.innerHTML = Array.from({ length: 4 }, () => '<div class="hs-skel"></div>').join('');
+
+ const { ok, data } = await api(`/api/oracle/categories?network=${NETWORK}&hours=24`);
+ if (!ok || !data?.items?.length) { wrap.style.display = 'none'; return; }
+
+ wrap.innerHTML = data.items.slice(0, 8).map((c) => {
+ const imgSrc = c.best_image_uri || '';
+ const sym = esc((c.best_symbol || '?').toUpperCase());
+ const catLabel = esc(c.category.replace(/_/g, ' '));
+ const primeBadge = c.prime_count > 0 ? `<span class="hs-badge prime">${c.prime_count} prime</span>` : '';
+ const strongBadge = c.strong_count > 0 ? `<span class="hs-badge strong">${c.strong_count} strong</span>` : '';
+ const totalBadge = `<span class="hs-badge">${c.total} coins</span>`;
+ return `<div class="hs-card" role="button" tabindex="0"
+ aria-label="Filter by ${catLabel}"
+ onclick="window.__oracleFilterCat('${esc(c.category)}')"
+ onkeydown="if(event.key==='Enter'||event.key===' ')window.__oracleFilterCat('${esc(c.category)}')">
+ <div class="hs-head">
+ <div class="hs-img">${imgSrc ? `<img src="${esc(imgSrc)}" alt="" style="width:36px;height:36px;border-radius:8px;object-fit:cover" onerror="this.style.display='none'" loading="lazy" />` : sym.slice(0, 2)}</div>
+ <div><div class="hs-cat">${catLabel}</div></div>
+ </div>
+ <div><div class="hs-avg">${Math.round(c.avg_score)}</div><div class="hs-avg-label">avg score</div></div>
+ <div class="hs-badges">${primeBadge}${strongBadge}${totalBadge}</div>
+ </div>`;
+ }).join('');
+}
+
+window.__oracleFilterCat = (category) => {
+ state.category = state.category === category ? null : category;
+ const url = new URL(location.href);
+ if (state.category) url.searchParams.set('category', state.category); else url.searchParams.delete('category');
+ history.replaceState(null, '', url.toString());
+ // highlight active card
+ $$('#hotSectors .hs-card').forEach((el) => {
+ const onclick = el.getAttribute('onclick') || '';
+ const active = onclick.includes(`'${category}'`) && state.category === category;
+ el.style.borderColor = active ? 'var(--cyan)' : '';
+ el.style.background = active ? 'color-mix(in srgb, var(--cyan) 8%, var(--panel))' : '';
+ });
+ loadFeed();
+};
+
function winCardHtml(w, idx) {
const tier = w.tier || 'watch';
const athStr = w.ath_multiple != null ? `${Number(w.ath_multiple).toFixed(1)}×` : w.graduated ? 'Grad ✓' : '—';