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.

feat(markets): markets hub, nav wiring, and news surface registration

nirholas9f098aa07c8b
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fe192030e..c09ba608d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,7 +6,12 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
## 2026-07-10
+- **Crypto News** (`/markets/news`) — Live crypto news aggregated natively from 37 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.
+- **Crypto News Archive** (`/markets/archive`) — The largest open crypto-news archive: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language.
+- **Crypto News Reader** (`/markets/news/article`) — Rich article reader for crypto news — full story extraction with AI summary, key points, sentiment, detected tickers, and related coverage from across the industry.
+- **Markets Hub** (`/markets`) — The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 37 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.
- **Auto-rigging works again — and the Agent Identity Studio demos are real** — Rigging any generated model into an animation-ready character had been failing since the cloud migration: the rig request was sent to a service that doesn't do rigging, and the GPU rigger itself crashed on a graphics call our cloud GPUs don't support. Both are fixed — rig requests now reach the real UniRig worker, which renders its voxel pass in software instead. Proof: all four Agent Identity Studio demo characters (LedgerLynx, MuseWeaver, Momentum-9, and the three.ws studio's own) were generated, rigged with full skeletons, and photographed in posed renders through the live pipeline — see them on the showcase. (`/agent-identities`) `[fix, feature]`
+- **Crypto news is live: a real-time feed from 37 publishers, a rich article reader, and a 662,047-article archive back to 2017** — Markets grew a full news wing. /markets/news streams live headlines aggregated directly from 37 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search, and open any story in a reader that extracts the full text with a summary, key points, sentiment, and related coverage. Behind it sits the largest open crypto-news archive anywhere: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language at /markets/archive. A new /markets hub ties the whole suite together — live global stats, the top 100 coins, breaking news, and every market tool as its own card. (`/markets`) `[feature]`
## 2026-07-09
diff --git a/data/changelog.json b/data/changelog.json
index 0bff5ef3a..368c67822 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -12734,6 +12734,15 @@
"tags": [
"fix"
]
+ },
+ {
+ "date": "2026-07-10",
+ "title": "Crypto news is live: a real-time feed from 37 publishers, a rich article reader, and a 662,047-article archive back to 2017",
+ "summary": "Markets grew a full news wing. /markets/news streams live headlines aggregated directly from 37 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search, and open any story in a reader that extracts the full text with a summary, key points, sentiment, and related coverage. Behind it sits the largest open crypto-news archive anywhere: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language at /markets/archive. A new /markets hub ties the whole suite together — live global stats, the top 100 coins, breaking news, and every market tool as its own card.",
+ "tags": [
+ "feature"
+ ],
+ "link": "/markets"
}
]
-}
\ No newline at end of file
+}
diff --git a/data/pages.json b/data/pages.json
index 540459fcb..8e38405d4 100644
--- a/data/pages.json
+++ b/data/pages.json
@@ -1541,6 +1541,38 @@
"priority": 0.6,
"changefreq": "monthly",
"added": "2026-06-08"
+ },
+ {
+ "path": "/markets",
+ "title": "Markets Hub",
+ "description": "The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 37 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.",
+ "priority": 0.8,
+ "changefreq": "hourly",
+ "added": "2026-07-10"
+ },
+ {
+ "path": "/markets/news",
+ "title": "Crypto News",
+ "description": "Live crypto news aggregated natively from 37 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.",
+ "priority": 0.8,
+ "changefreq": "hourly",
+ "added": "2026-07-10"
+ },
+ {
+ "path": "/markets/news/article",
+ "title": "Crypto News Reader",
+ "description": "Rich article reader for crypto news — full story extraction with AI summary, key points, sentiment, detected tickers, and related coverage from across the industry.",
+ "priority": 0.5,
+ "changefreq": "hourly",
+ "added": "2026-07-10"
+ },
+ {
+ "path": "/markets/archive",
+ "title": "Crypto News Archive",
+ "description": "The largest open crypto-news archive: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language.",
+ "priority": 0.8,
+ "changefreq": "weekly",
+ "added": "2026-07-10"
}
]
},
diff --git a/docs/nvidia-nemotron-spotlight.md b/docs/nvidia-nemotron-spotlight.md
new file mode 100644
index 000000000..56595a68a
--- /dev/null
+++ b/docs/nvidia-nemotron-spotlight.md
@@ -0,0 +1,147 @@
+---
+title: "The generator was never the hard part: how Nemotron Nano made our text-to-3D pipeline usable"
+venue: NVIDIA Developer Blog / NVIDIA Developer Forums (community showcase)
+account: three.ws (official)
+description: "A founder's account of building browser-native 3D generation on NVIDIA NIM, and why a 12B vision model standing in front of the 3D generator mattered more than the 3D generator itself."
+tags: [nemotron, nim, trellis, generative-3d, vision-language-models, guardrails]
+canonical: https://three.ws/docs/nvidia-nemotron-spotlight.md
+---
+
+# The generator was never the hard part
+
+I run [three.ws](https://three.ws). You type a sentence, and a few seconds later a textured, rigged 3D character is standing in your browser, ready to walk and talk. No games team. No Blender. No install.
+
+For about a month, I believed the hard part of that sentence was the 3D model.
+
+It isn't. It never was. The 3D model is a single API call. What made text-to-3D go from a demo that impresses engineers to a product that ordinary people use every day was a fleet of small NVIDIA models standing *around* the generator, doing judgment work. The protagonist of that story is **Nemotron Nano**.
+
+This is what we learned, with the real numbers.
+
+---
+
+## The naive pipeline, and the night it fell apart
+
+The first version of our forge pipeline was exactly what you would draw on a whiteboard:
+
+```
+prompt or photo → 3D generator → GLB → render in browser
+```
+
+The generator is Microsoft TRELLIS, running on NVIDIA NIM. It is genuinely excellent, and NVIDIA hosts it free. Our draft tier finishes a text-to-3D generation inline in about **12–13 seconds** at 15 sampling steps, with none of the ~60-second cold start we were eating on other hosted lanes. When I first watched a GLB materialize out of a sentence, I thought we were basically done.
+
+Then we opened it to real users, and the whiteboard drawing met the world.
+
+Somebody uploaded a screenshot of a Discord conversation and asked for a 3D model of it. Somebody uploaded a photo of their living room — six objects, no subject. Somebody uploaded a picture so dark you could not tell it was a cat. Somebody uploaded a bar chart.
+
+Every one of those consumed a rate-limited slot, occupied a GPU, took the full generation time, and handed the user a mesh of formless noise. The user does not know that their input was unreconstructable. They know that our product is broken. And they leave.
+
+The generator did nothing wrong. It generated, faithfully, from garbage. **The pipeline had no judgment in it.**
+
+---
+
+## The fix was a smaller model, in front
+
+The instinct is to reach for a bigger generator. The correct move was to reach for a smaller model and put it *earlier*.
+
+Before we submit a photo for reconstruction, we now ask a vision-language model exactly one question. Here is the real prompt from [`api/_lib/forge-image-validate.js`](../api/_lib/forge-image-validate.js), unedited:
+
+```
+You are the input checker for a photo→3D model generator. The user uploaded this
+image as the reference to reconstruct into a 3D object. Judge ONLY whether it is a
+usable reference: it should show ONE clear physical subject (an object, character,
+creature, or person) that could plausibly be turned into a 3D model.
+
+Reply ONLY with compact JSON, no prose, in exactly this shape:
+{"usable":true|false,"subject":"<2-5 word description>","issue":"none"|"text_screenshot"
+|"multiple_subjects"|"no_clear_subject"|"too_dark_or_blurry"|"abstract_or_diagram"}
+
+When in doubt, mark usable=true — a borderline photo still reconstructs.
+```
+
+The model answering that question is **`nvidia/nemotron-nano-12b-v2-vl`**. It returns in **1–2 seconds**. It costs us nothing. And it turned "your 3D model is garbage" into this:
+
+> That looks like a screenshot of text or an interface, not a photo of an object. Upload a clear picture of the single thing you want to turn into a 3D model.
+
+That is the entire difference between a demo and a product. Not a better mesh. A model small enough, and fast enough, and cheap enough to stand in front of the expensive thing and say *not this one*.
+
+### Why Nemotron Nano specifically
+
+We benchmarked the obvious candidates and picked on a metric nobody puts on a leaderboard: **image token footprint**.
+
+For a small reference image, `nemotron-nano-12b-v2-vl` consumes roughly **281 prompt tokens**. A Llama-90B-vision class model consumed roughly **1,600** for the identical image. That is a ~5.7× difference in the tokens we push through a check that runs in front of *every single generation on the platform*. At our volume, that ratio decides whether the guardrail is free or whether the guardrail becomes the largest line item in the pipeline it was built to protect.
+
+Nemotron Nano won on the axis that actually mattered. The 12B VL model is not competing with a frontier model on essay quality. It is being asked whether there is one clear object in a photograph, and that is a question it answers reliably, in 1–2 seconds, for nothing.
+
+Our vision chain, in order:
+
+```js
+const NVIDIA_VISION_MODELS = [
+ 'nvidia/nemotron-nano-12b-v2-vl', // leads — smallest image token footprint
+ 'meta/llama-3.2-11b-vision-instruct', // different family = independent failure modes
+];
+// paid vision-capable backstop appended last, and only if its key is set
+```
+
+Note the comment on line two, because it is the load-bearing design decision in this file. The second lane is a **different model family**, not a bigger checkpoint of the first. A retry against the same family is a re-roll, not a fallback. If Nemotron Nano's failure mode is triggered by an input, Nemotron Super's probably is too. Llama 3.2 Vision fails differently. That is the whole point of having it.
+
+### Nemotron's siblings do the rest of the judgment
+
+Once we understood the pattern, we found the same shape everywhere in the product.
+
+**Content safety.** Anonymous visitors can talk to any agent on the platform. We refuse unsafe messages ourselves rather than inheriting a downstream provider's moderation policy, using NVIDIA's `nvidia/llama-3.1-nemoguard-8b-content-safety` from the NeMo Guardrails family. Measured median latency on the free NIM tier: **~340 ms**, with a ~680 ms tail. We give it a 2-second abort budget, which is roughly six times its median — generous, and still fast to fail over.
+
+**Reasoning turns.** When a feature wants a compact, reasoning-tuned model to actually lead rather than sit at the tail of a fallback chain, it opts into `nvidia/nvidia-nemotron-nano-9b-v2`. Prompt refinement, classification, structured extraction. A 9B model does these perfectly, and reaching for a frontier model to do them is a tax you pay on every request forever.
+
+**Retrieval.** Agent memory embeds through `nvidia/nv-embedqa-e5-v5` at 1024 dimensions, with `nvidia/rerank-qa-mistral-4b` as an optional cross-encoder rerank stage.
+
+Every one of those models, one `nvapi-` key, and a bill of zero. I want to be unambiguous about what that meant for us: **we could not have built this product on paid inference.** Not at the price of a guardrail in front of every generation. The economics only close because NVIDIA hosts these models free, and so the guardrail costs nothing to run.
+
+---
+
+## What I would tell you to do
+
+We got here by getting it wrong first. Six things I would hand to anyone building a generative pipeline, whether it outputs meshes, images, video, or audio.
+
+**1. Put the small model in front of the expensive one, not after.** Every team's instinct is to validate the output. Validating the *input* is cheaper, faster, and gives the user something they can act on before they have waited 30 seconds. A 1-second check that saves a 20-second GPU job pays for itself 20× and pays for itself again in trust.
+
+**2. Fail open. Always. Without exception.** Our validator's contract is written at the top of the file in capital letters: if vision is unconfigured, times out, errors, or returns unparseable junk, it returns `{ ok: true }` and generation proceeds exactly as it did before the check existed. A guardrail that can take your product down is worse than no guardrail. It converts a vendor's bad afternoon into your outage. The only outcome that blocks a user is a successful, parsed, confident rejection.
+
+**3. Choose models by the cost axis that binds you, not by the leaderboard.** Ours was image tokens per call. Yours might be time-to-first-token, or context window, or cold-start. Whatever it is, measure it on *your* payload. `nemotron-nano-12b-v2-vl` does not top a vision leaderboard. It tops the leaderboard that determines whether our product is viable, which is the only one I can pay salaries with.
+
+**4. Make your second lane a different family.** Same-family fallback is superstition. Two independent architectures give you two independent failure modes, and that is what a fallback is for.
+
+**5. Constrain the output, and constrain it hard.** `temperature: 0`, `max_tokens: 120`, compact JSON, and an explicit schema in the prompt. Then write a lenient parser anyway and treat anything you cannot read as *safe* rather than *failed*. A small model asked for a small, rigidly-shaped answer is astonishingly reliable. A small model asked for prose is not.
+
+**6. Return the fix, never the error.** Every rejection reason in our validator maps to designed, actionable copy that tells the user what is wrong *and how to correct it*. `too_dark_or_blurry` becomes "Retake it in good light, hold steady, and keep the subject in focus." The VLM's job is not to say no. It is to tell the user how to get to yes.
+
+### And three things I would ask of NVIDIA
+
+Offered in the spirit of a team that has bet its pipeline on these lanes and wants them to win.
+
+**Lift the image-input restriction on the hosted TRELLIS preview.** The hosted endpoint currently accepts only NVIDIA's predefined `example_id` sample images for `mode:"image"`. We verified this exhaustively against the live endpoint — inline base64 at every size, NVCF asset references with `NVCF-INPUT-ASSET-REFERENCES`, and bare asset ids all return 422. Self-deployed TRELLIS NIMs accept real image input, so this is a property of the hosted preview and not the model. It is the single biggest gap between the free lane and the self-hosted one, and it forces every photo-to-3D submission on our platform off NVIDIA infrastructure and onto a paid third party. We have kept the asset-handshake recipe ready for the day it lifts.
+
+**Raise or document the 77-character TRELLIS prompt cap.** TRELLIS truncates the text prompt server-side at 77 characters. We clamp to it so the request is honest about what is actually conditioning the generation, and we spend 17 of those precious characters appending `", studio lighting"` because TRELLIS trends dark and gritty without an explicit lighting cue. Seventy-seven characters is a tight budget for a user's creative intent.
+
+**Ship constrained/structured decoding on the NIM chat models.** Half of what we do with Nemotron Nano is coax rigidly-shaped JSON out of it. A guaranteed-schema decoding mode would let us delete our lenient parser and our fail-open bad-reply branch, and would make small models dramatically more attractive for exactly the pipeline-judgment role this entire article is about.
+
+---
+
+## Why any of this matters
+
+I want to step back from the token counts.
+
+For the whole history of the medium, 3D has been gated behind craft. Not taste, not ideas — craft. Years of it. Topology and UV unwrapping and weight painting and retopology, an apprenticeship most people with something to say were never going to serve. The ideas were never the bottleneck. The tooling was. An enormous number of people who would have made extraordinary things in three dimensions simply never got past the first week of Blender, and we will never know what they would have built.
+
+That is ending, and it is ending *now*, and it is not ending because one model got good at meshes.
+
+It is ending because the entire supporting cast got good and got free at the same time. A vision model that can look at your photograph and tell you why it will not work. A safety model that returns in 340 milliseconds. An embedding model that gives your character a memory. A speech model that gives it a voice. A face model that makes its mouth move. Each one is unremarkable on its own. Together they are the difference between a research artifact and a thing a fourteen-year-old can use on a school Chromebook to build a world.
+
+NVIDIA's most underrated contribution to 3D is not the GPU in the datacenter. It is the decision to put Nemotron Nano, NemoGuard, TRELLIS, FLUX, Riva, and Audio2Face behind one free API key. That decision is why a small team can put text-to-3D in a browser tab and charge nothing for it. It is why the guardrail is free. It is why the pipeline closes.
+
+We are going to look back on this decade the way we look back on desktop publishing — a brief, strange window when the tools for a whole art form went from a priesthood to a text box, and the number of people who could participate went up by four orders of magnitude. The models that make that happen will mostly not be the famous ones. They will be 9B and 12B, they will run in a second, they will cost nothing, and they will spend their lives quietly telling people *not that photo, try this one instead*.
+
+Build the small stuff. Put it in front. The generator was never the hard part.
+
+---
+
+*three.ws is a browser-native platform for generating 3D avatars, worlds, and agents from a sentence. The text-to-3D lane described here is free and open — no key, no account. Our full NVIDIA model map lives in [`docs/nvidia-models.md`](./nvidia-models.md), and the pipeline internals are in [`docs/3d-asset-pipeline.md`](./3d-asset-pipeline.md).*
diff --git a/pages/categories.html b/pages/categories.html
index 7c8d043cd..d3f890091 100644
--- a/pages/categories.html
+++ b/pages/categories.html
@@ -89,7 +89,7 @@
<main class="cv-container">
<nav class="cv-crumbs" aria-label="Breadcrumb">
- <a href="/coins">Markets</a><span class="sep">/</span
+ <a href="/markets">Markets</a><span class="sep">/</span
><span class="here">Categories</span>
</nav>
<h1 class="cv-h1">Crypto Categories</h1>
diff --git a/pages/chains.html b/pages/chains.html
index 3d7693bc5..5247b9c18 100644
--- a/pages/chains.html
+++ b/pages/chains.html
@@ -89,7 +89,7 @@
<main class="cv-container">
<nav class="cv-crumbs" aria-label="Breadcrumb">
- <a href="/coins">Markets</a><span class="sep">/</span
+ <a href="/markets">Markets</a><span class="sep">/</span
><span class="here">Chains</span>
</nav>
<h1 class="cv-h1">Blockchain TVL by Chain</h1>
diff --git a/pages/coin.html b/pages/coin.html
index 4a7346c7f..b891042ba 100644
--- a/pages/coin.html
+++ b/pages/coin.html
@@ -47,7 +47,7 @@
<nav class="cv-crumbs" aria-label="Breadcrumb">
<a href="/">Home</a>
<span class="sep" aria-hidden="true">›</span>
- <a href="/coins">Markets</a>
+ <a href="/markets">Markets</a>
<span class="sep" aria-hidden="true">›</span>
<span class="here" id="cv-crumb-name">…</span>
</nav>
diff --git a/pages/coins.html b/pages/coins.html
index 9149548ba..0805e6e3a 100644
--- a/pages/coins.html
+++ b/pages/coins.html
@@ -95,6 +95,9 @@
<!-- Market tools hub: every sibling surface, discoverable from the index. -->
<nav class="cv-tools" aria-label="Market tools">
+ <a class="cv-pill" href="/markets">Markets Hub</a>
+ <a class="cv-pill" href="/markets/news">News</a>
+ <a class="cv-pill" href="/markets/archive">Archive</a>
<a class="cv-pill" href="/heatmap">Heatmap</a>
<a class="cv-pill" href="/screener">Screener</a>
<a class="cv-pill" href="/categories">Categories</a>
diff --git a/pages/compare.html b/pages/compare.html
index e05221bb2..eccbd178a 100644
--- a/pages/compare.html
+++ b/pages/compare.html
@@ -70,7 +70,7 @@
<main class="cv-container">
<nav class="cv-crumbs" aria-label="Breadcrumb">
- <a href="/coins">Markets</a><span class="sep">/</span
+ <a href="/markets">Markets</a><span class="sep">/</span
><span class="here">Compare</span>
</nav>
<h1 class="cv-h1">Compare Coins</h1>
diff --git a/pages/converter.html b/pages/converter.html
index e718ad8ff..d87ebfff7 100644
--- a/pages/converter.html
+++ b/pages/converter.html
@@ -89,7 +89,7 @@
<main class="cv-container">
<nav class="cv-crumbs" aria-label="Breadcrumb">
- <a href="/coins">Markets</a><span class="sep">/</span
+ <a href="/markets">Markets</a><span class="sep">/</span
><span class="here">Converter</span>
</nav>
<h1 class="cv-h1">Crypto Converter</h1>
diff --git a/pages/defi.html b/pages/defi.html
index ca719ac29..71459f815 100644
--- a/pages/defi.html
+++ b/pages/defi.html
@@ -89,7 +89,7 @@
<main class="cv-container">
<nav class="cv-crumbs" aria-label="Breadcrumb">
- <a href="/coins">Markets</a><span class="sep">/</span><span class="here">DeFi</span>
+ <a href="/markets">Markets</a><span class="sep">/</span><span class="here">DeFi</span>
</nav>
<h1 class="cv-h1">DeFi TVL &amp; Protocols</h1>
<p class="cv-sub">
diff --git a/pages/derivatives.html b/pages/derivatives.html
index 2c02d4825..9e8918088 100644
--- a/pages/derivatives.html
+++ b/pages/derivatives.html
@@ -89,7 +89,7 @@
<main class="cv-container">
<nav class="cv-crumbs" aria-label="Breadcrumb">
- <a href="/coins">Markets</a><span class="sep">/</span
+ <a href="/markets">Markets</a><span class="sep">/</span
><span class="here">Derivatives</span>
</nav>
<h1 class="cv-h1">Crypto Derivatives</h1>
diff --git a/pages/exchanges.html b/pages/exchanges.html
index 02704888a..1239e1fb6 100644
--- a/pages/exchanges.html
+++ b/pages/exchanges.html
@@ -89,7 +89,7 @@
<main class="cv-container">
<nav class="cv-crumbs" aria-label="Breadcrumb">
- <a href="/coins">Markets</a><span class="sep">/</span
+ <a href="/markets">Markets</a><span class="sep">/</span
><span class="here">Exchanges</span>
</nav>
<h1 class="cv-h1">Crypto Exchanges</h1>
diff --git a/pages/fear-greed.html b/pages/fear-greed.html
index 901b34e73..bae28212e 100644
--- a/pages/fear-greed.html
+++ b/pages/fear-greed.html
@@ -70,7 +70,7 @@
<main class="cv-container">
<nav class="cv-crumbs" aria-label="Breadcrumb">
- <a href="/coins">Markets</a><span class="sep">/</span
+ <a href="/markets">Markets</a><span class="sep">/</span
><span class="here">Fear &amp; Greed</span>
</nav>
<h1 class="cv-h1">Fear &amp; Greed Index</h1>
diff --git a/pages/gas.html b/pages/gas.html
index e22cbbc86..a10bd525b 100644
--- a/pages/gas.html
+++ b/pages/gas.html
@@ -70,7 +70,7 @@
<main class="cv-container">
<nav class="cv-crumbs" aria-label="Breadcrumb">
- <a href="/coins">Markets</a><span class="sep">/</span><span class="here">Gas</span>
+ <a href="/markets">Markets</a><span class="sep">/</span><span class="here">Gas</span>
</nav>
<h1 class="cv-h1">Ethereum Gas Tracker</h1>
<p class="cv-sub">
diff --git a/pages/heatmap.html b/pages/heatmap.html
index 9484f2ff1..7bb58f8b9 100644
--- a/pages/heatmap.html
+++ b/pages/heatmap.html
@@ -70,7 +70,7 @@
<main class="cv-container">
<nav class="cv-crumbs" aria-label="Breadcrumb">
- <a href="/coins">Markets</a><span class="sep">/</span
+ <a href="/markets">Markets</a><span class="sep">/</span
><span class="here">Heatmap</span>
</nav>
<h1 class="cv-h1">Market Heatmap</h1>
diff --git a/pages/markets.html b/pages/markets.html
new file mode 100644
index 000000000..cb73951f8
--- /dev/null
+++ b/pages/markets.html
@@ -0,0 +1,121 @@
+<!doctype html>
+<html lang="en" class="cv-page">
+ <head>
+ <script>
+ /* three.ws theme boot — no-flash; runtime in /theme-switcher.js */ (function () {
+ try {
+ var m = localStorage.getItem('twx_theme');
+ var l =
+ m === 'auto'
+ ? window.matchMedia &&
+ window.matchMedia('(prefers-color-scheme: light)').matches
+ : m === 'light';
+ document.documentElement.setAttribute('data-theme', l ? 'light' : 'dark');
+ } catch (e) {
+ document.documentElement.setAttribute('data-theme', 'dark');
+ }
+ })();
+ </script>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Markets — live crypto prices, news &amp; tools · three.ws</title>
+ <meta
+ name="description"
+ content="The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 37 publisher feeds, a 662k-article news archive, and the full markets toolset: heatmap, screener, fear &amp; greed, gas, DeFi TVL, and more."
+ />
+ <meta property="og:type" content="website" />
+ <meta property="og:site_name" content="three.ws" />
+ <meta property="og:url" content="https://three.ws/markets" />
+ <meta property="og:title" content="Markets — live crypto prices, news &amp; tools · three.ws" />
+ <meta
+ property="og:description"
+ content="Live global stats, the top 100 coins, breaking crypto news, a 662k-article archive, and the full markets toolset in one hub."
+ />
+ <meta
+ property="og:image"
+ content="https://three.ws/api/page-og?s=crypto&amp;t=Markets&amp;d=Live+global+stats%2C+the+top+100+coins%2C+breaking+crypto+news%2C+a+662k-article+archive%2C+and+the+full+markets+toolset+in+one+hub.&amp;p=%2Fmarkets"
+ />
+ <meta property="og:image:width" content="1200" />
+ <meta property="og:image:height" content="630" />
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:site" content="@trythreews" />
+ <meta name="twitter:title" content="Markets · three.ws" />
+ <meta
+ name="twitter:description"
+ content="Live global stats, top 100 coins, breaking crypto news, a 662k-article archive, and the full markets toolset."
+ />
+ <meta
+ name="twitter:image"
+ content="https://three.ws/api/page-og?s=crypto&amp;t=Markets&amp;d=Live+global+stats%2C+the+top+100+coins%2C+breaking+crypto+news%2C+a+662k-article+archive%2C+and+the+full+markets+toolset+in+one+hub.&amp;p=%2Fmarkets"
+ />
+ <meta name="theme-color" content="#09090b" />
+ <link rel="icon" href="/favicon.ico" sizes="any" />
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
+ <link rel="manifest" href="/site.webmanifest" />
+ <link rel="stylesheet" href="/fonts/fonts.css" />
+ <link rel="stylesheet" href="/nav.css" />
+ <link rel="stylesheet" href="/src/coin-pages.css" />
+ <link rel="stylesheet" href="/footer.css" />
+ <link rel="canonical" href="https://three.ws/markets" />
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />
+ <meta property="og:locale" content="en_US" />
+ <meta property="og:image:alt" content="Markets hub — three.ws" />
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Markets","description":"The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 37 publisher feeds, a 662k-article news archive, and the full markets toolset.","url":"https://three.ws/markets","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}]}</script>
+ </head>
+ <body>
+ <header><div id="nav-container"></div></header>
+ <script src="/nav.js"></script>
+
+ <main class="cv-container">
+ <h1 class="cv-h1">Markets</h1>
+ <p class="cv-sub">
+ Everything the market is doing, in one place — live global stats, the top 100
+ coins, breaking news from 37 publisher feeds, a 662,047-article archive back to
+ 2017, and the full markets toolset.
+ </p>
+
+ <!-- Global stats bar. Hydrated by src/markets-page.js. -->
+ <section id="cv-stats" class="cv-section" aria-label="Market statistics"></section>
+
+ <!-- Every markets surface as its own hero card. -->
+ <section class="cv-section" aria-label="Markets suite">
+ <div class="cv-toolbar" style="margin-bottom: 1rem">
+ <h2 class="cv-h2" style="margin: 0">The full toolset</h2>
+ </div>
+ <div id="mkt-suite" class="mkt-suite"></div>
+ </section>
+
+ <!-- Top 100 + news rail. -->
+ <div class="mkt-cols">
+ <section aria-label="Top 100 cryptocurrencies">
+ <div class="cv-toolbar" style="margin-bottom: 1rem">
+ <h2 class="cv-h2" style="margin: 0">Top 100 Coins</h2>
+ <a class="mkt-more" href="/coins">Full markets table →</a>
+ </div>
+ <div id="mkt-table"></div>
+ </section>
+ <aside class="mkt-rail" aria-label="Latest crypto news">
+ <div class="cv-toolbar" style="margin-bottom: 0">
+ <h2 class="cv-h2" style="margin: 0">Latest News</h2>
+ <a class="mkt-more" href="/markets/news">All news →</a>
+ </div>
+ <div id="mkt-news"></div>
+ <a class="mkt-hero-card" href="/markets/archive" id="mkt-archive-teaser">
+ <h3>📚 News Archive</h3>
+ <p>
+ 662,047 articles from September 2017 to today — searchable by ticker,
+ keyword, date, sentiment, and language.
+ </p>
+ <span class="stat">Search a decade of headlines →</span>
+ </a>
+ </aside>
+ </div>
+ </main>
+
+ <script type="module" src="/src/markets-page.js"></script>
+ <script src="/brand.js" defer></script>
+ <div id="footer-container"></div>
+ <script src="/footer.js"></script>
+ </body>
+</html>
diff --git a/pages/screener.html b/pages/screener.html
index fb8f73809..0ad3855f9 100644
--- a/pages/screener.html
+++ b/pages/screener.html
@@ -89,7 +89,7 @@
<main class="cv-container">
<nav class="cv-crumbs" aria-label="Breadcrumb">
- <a href="/coins">Markets</a><span class="sep">/</span
+ <a href="/markets">Markets</a><span class="sep">/</span
><span class="here">Screener</span>
</nav>
<h1 class="cv-h1">Token Screener</h1>
diff --git a/pages/stablecoins.html b/pages/stablecoins.html
index 0cbf9cade..d4fe8c65a 100644
--- a/pages/stablecoins.html
+++ b/pages/stablecoins.html
@@ -89,7 +89,7 @@
<main class="cv-container">
<nav class="cv-crumbs" aria-label="Breadcrumb">
- <a href="/coins">Markets</a><span class="sep">/</span
+ <a href="/markets">Markets</a><span class="sep">/</span
><span class="here">Stablecoins</span>
</nav>
<h1 class="cv-h1">Stablecoins Market Cap</h1>
diff --git a/public/changelog.json b/public/changelog.json
index 31156cc0e..2e6e5f8e5 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,11 +1,51 @@
{
- "generated_at": "2026-07-10T00:05:21.548Z",
+ "generated_at": "2026-07-10T02:09:48.113Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
"url": "https://three.ws"
},
"entries": [
+ {
+ "date": "2026-07-10",
+ "type": "launch",
+ "title": "Crypto News",
+ "summary": "Live crypto news aggregated natively from 37 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.",
+ "link": "/markets/news",
+ "tags": [
+ "launch"
+ ]
+ },
+ {
+ "date": "2026-07-10",
+ "type": "launch",
+ "title": "Crypto News Archive",
+ "summary": "The largest open crypto-news archive: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language.",
+ "link": "/markets/archive",
+ "tags": [
+ "launch"
+ ]
+ },
+ {
+ "date": "2026-07-10",
+ "type": "launch",
+ "title": "Crypto News Reader",
+ "summary": "Rich article reader for crypto news — full story extraction with AI summary, key points, sentiment, detected tickers, and related coverage from across the industry.",
+ "link": "/markets/news/article",
+ "tags": [
+ "launch"
+ ]
+ },
+ {
+ "date": "2026-07-10",
+ "type": "launch",
+ "title": "Markets Hub",
+ "summary": "The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 37 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.",
+ "link": "/markets",
+ "tags": [
+ "launch"
+ ]
+ },
{
"date": "2026-07-10",
"type": "update",
@@ -17,6 +57,16 @@
"feature"
]
},
+ {
+ "date": "2026-07-10",
+ "type": "update",
+ "title": "Crypto news is live: a real-time feed from 37 publishers, a rich article reader, and a 662,047-article archive back to 2017",
+ "summary": "Markets grew a full news wing. /markets/news streams live headlines aggregated directly from 37 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search, and open any story in a reader that extracts the full text with a summary, key points, sentiment, and related coverage. Behind it sits the largest open crypto-news archive anywhere: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language at /markets/archive. A new /markets hub ties the whole suite together — live global stats, the top 100 coins, breaking news, and every market tool as its own card.",
+ "link": "/markets",
+ "tags": [
+ "feature"
+ ]
+ },
{
"date": "2026-07-09",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 214f11c13..217eb2c7f 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -6,6 +6,38 @@
<atom:link href="https://three.ws/changelog.xml" rel="self" type="application/rss+xml"/>
<description>What's new on three.ws — features, improvements, and releases, newest first.</description>
<language>en</language>
+ <item>
+ <title>Crypto News</title>
+ <link>https://three.ws/markets/news</link>
+ <guid isPermaLink="false">2026-07-10:Crypto News</guid>
+ <pubDate>Fri, 10 Jul 2026 12:00:00 GMT</pubDate>
+ <category>launch</category>
+ <description>Live crypto news aggregated natively from 37 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.</description>
+ </item>
+ <item>
+ <title>Crypto News Archive</title>
+ <link>https://three.ws/markets/archive</link>
+ <guid isPermaLink="false">2026-07-10:Crypto News Archive</guid>
+ <pubDate>Fri, 10 Jul 2026 12:00:00 GMT</pubDate>
+ <category>launch</category>
+ <description>The largest open crypto-news archive: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language.</description>
+ </item>
+ <item>
+ <title>Crypto News Reader</title>
+ <link>https://three.ws/markets/news/article</link>
+ <guid isPermaLink="false">2026-07-10:Crypto News Reader</guid>
+ <pubDate>Fri, 10 Jul 2026 12:00:00 GMT</pubDate>
+ <category>launch</category>
+ <description>Rich article reader for crypto news — full story extraction with AI summary, key points, sentiment, detected tickers, and related coverage from across the industry.</description>
+ </item>
+ <item>
+ <title>Markets Hub</title>
+ <link>https://three.ws/markets</link>
+ <guid isPermaLink="false">2026-07-10:Markets Hub</guid>
+ <pubDate>Fri, 10 Jul 2026 12:00:00 GMT</pubDate>
+ <category>launch</category>
+ <description>The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 37 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.</description>
+ </item>
<item>
<title>Auto-rigging works again — and the Agent Identity Studio demos are real</title>
<link>https://three.ws/agent-identities</link>
@@ -14,6 +46,14 @@
<category>fix</category>
<description>Rigging any generated model into an animation-ready character had been failing since the cloud migration: the rig request was sent to a service that doesn't do rigging, and the GPU rigger itself crashed on a graphics call our cloud GPUs don't support. Both are fixed — rig requests now reach the real UniRig worker, which renders its voxel pass in software instead. Proof: all four Agent Identity Studio demo characters (LedgerLynx, MuseWeaver, Momentum-9, and the three.ws studio's own) were generated, rigged with full skeletons, and photographed in posed renders through the live pipeline — see them on the showcase.</description>
</item>
+ <item>
+ <title>Crypto news is live: a real-time feed from 37 publishers, a rich article reader, and a 662,047-article archive back to 2017</title>
+ <link>https://three.ws/markets</link>
+ <guid isPermaLink="false">2026-07-10:Crypto news is live: a real-time feed from 37 publishers, a rich article reader, and a 662,047-article archive back to 2017</guid>
+ <pubDate>Fri, 10 Jul 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>Markets grew a full news wing. /markets/news streams live headlines aggregated directly from 37 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search, and open any story in a reader that extracts the full text with a summary, key points, sentiment, and related coverage. Behind it sits the largest open crypto-news archive anywhere: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language at /markets/archive. A new /markets hub ties the whole suite together — live global stats, the top 100 coins, breaking news, and every market tool as its own card.</description>
+ </item>
<item>
<title>/play: real water at the fishing ponds, and spare rods to find on the bank</title>
<link>https://three.ws/play</link>
diff --git a/public/features.json b/public/features.json
index 52c98e3ce..039c88c9f 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-10T00:05:21.534Z",
+ "generated_at": "2026-07-10T02:09:48.099Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
@@ -1885,6 +1885,46 @@
"indexable": true,
"tags": [],
"showcase": false
+ },
+ {
+ "path": "/markets",
+ "title": "Markets Hub",
+ "description": "The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 37 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.",
+ "added": "2026-07-10",
+ "auth": null,
+ "indexable": true,
+ "tags": [],
+ "showcase": false
+ },
+ {
+ "path": "/markets/news",
+ "title": "Crypto News",
+ "description": "Live crypto news aggregated natively from 37 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.",
+ "added": "2026-07-10",
+ "auth": null,
+ "indexable": true,
+ "tags": [],
+ "showcase": false
+ },
+ {
+ "path": "/markets/news/article",
+ "title": "Crypto News Reader",
+ "description": "Rich article reader for crypto news — full story extraction with AI summary, key points, sentiment, detected tickers, and related coverage from across the industry.",
+ "added": "2026-07-10",
+ "auth": null,
+ "indexable": true,
+ "tags": [],
+ "showcase": false
+ },
+ {
+ "path": "/markets/archive",
+ "title": "Crypto News Archive",
+ "description": "The largest open crypto-news archive: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language.",
+ "added": "2026-07-10",
+ "auth": null,
+ "indexable": true,
+ "tags": [],
+ "showcase": false
}
]
},
diff --git a/public/llms-full.txt b/public/llms-full.txt
index afe2268d9..f6abfd66f 100644
--- a/public/llms-full.txt
+++ b/public/llms-full.txt
@@ -1144,6 +1144,30 @@ URL: https://three.ws/evm-wallet
Grind a custom Ethereum / EVM wallet address with the prefix or suffix of your choice. A real secp256k1 keypair, generated entirely in your browser — the private key never leaves your device.
+### Markets Hub
+
+URL: https://three.ws/markets
+
+The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 37 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.
+
+### Crypto News
+
+URL: https://three.ws/markets/news
+
+Live crypto news aggregated natively from 37 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.
+
+### Crypto News Reader
+
+URL: https://three.ws/markets/news/article
+
+Rich article reader for crypto news — full story extraction with AI summary, key points, sentiment, detected tickers, and related coverage from across the industry.
+
+### Crypto News Archive
+
+URL: https://three.ws/markets/archive
+
+The largest open crypto-news archive: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language.
+
## Agent Tools
Manage, talk to, and deploy individual agents.
diff --git a/public/llms.txt b/public/llms.txt
index 4946941b6..a06e56102 100644
--- a/public/llms.txt
+++ b/public/llms.txt
@@ -206,6 +206,10 @@ On-chain features: pay-per-call, token launches, vanity wallets.
- [Token in 3D](https://three.ws/coin3d): Any pump.fun token as a live 3D scene — a spinning coin medallion with the token's logo, top holders as a galaxy sized by balance, and a graduation ring tracking bonding-curve progress.
- [Hero Stage](https://three.ws/hero-demo): A cinematic 3D hero stage for three.ws agents — a lit avatar centered in deep space over concentric glowing rings, a drifting starfield, and soft bloom, with pointer parallax and a live avatar switcher. Motion-safe.
- [EVM Vanity Wallet](https://three.ws/evm-wallet): Grind a custom Ethereum / EVM wallet address with the prefix or suffix of your choice. A real secp256k1 keypair, generated entirely in your browser — the private key never leaves your device.
+- [Markets Hub](https://three.ws/markets): The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 37 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.
+- [Crypto News](https://three.ws/markets/news): Live crypto news aggregated natively from 37 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.
+- [Crypto News Reader](https://three.ws/markets/news/article): Rich article reader for crypto news — full story extraction with AI summary, key points, sentiment, detected tickers, and related coverage from across the industry.
+- [Crypto News Archive](https://three.ws/markets/archive): The largest open crypto-news archive: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language.
## Agent Tools
diff --git a/public/nav-data.js b/public/nav-data.js
index 76fd1a133..e71403ad3 100644
--- a/public/nav-data.js
+++ b/public/nav-data.js
@@ -328,7 +328,22 @@ export const NAV_GROUPS = [
label: 'Intelligence',
items: [
{
- title: 'Markets',
+ title: 'Markets Hub',
+ href: '/markets',
+ desc: 'Global stats, the top 100 coins, live news, and every market tool in one place',
+ },
+ {
+ title: 'Crypto News',
+ href: '/markets/news',
+ desc: 'Live headlines from 37 publisher feeds with a rich reader for every story',
+ },
+ {
+ title: 'News Archive',
+ href: '/markets/archive',
+ desc: '662k articles back to 2017 — search a decade of crypto history',
+ },
+ {
+ title: 'Coins',
href: '/coins',
desc: 'Live global market data — top coins, prices, and a rich detail page for every asset',
},
diff --git a/public/sitemap/index.html b/public/sitemap/index.html
index 79c5476ea..77add3a00 100644
--- a/public/sitemap/index.html
+++ b/public/sitemap/index.html
@@ -65,7 +65,7 @@
<main class="sm-wrap">
<div class="sm-hero">
<h1>Sitemap</h1>
- <p>All 410 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>
+ <p>All 414 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>
<div class="sm-formats">
<a href="/sitemap.xml"><code>sitemap.xml</code> · for search engines</a>
<a href="/llms.txt"><code>llms.txt</code> · for AI agents</a>
@@ -77,7 +77,7 @@
</div>
<div class="sm-filter">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>
- <input id="sm-filter-input" type="search" placeholder="Filter 410 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />
+ <input id="sm-filter-input" type="search" placeholder="Filter 414 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />
<kbd aria-hidden="true">/</kbd>
</div>
<p class="sm-filter-count" id="sm-filter-count" role="status" aria-live="polite"></p>
@@ -718,7 +718,7 @@
<section class="sm-section" id="crypto">
<header>
- <h2>Crypto<span class="sm-count" data-count>100</span></h2>
+ <h2>Crypto<span class="sm-count" data-count>104</span></h2>
<p class="sm-section-desc">On-chain features: pay-per-call, token launches, vanity wallets.</p>
</header>
<ul class="sm-list">
@@ -1422,6 +1422,34 @@
<span class="sm-desc">Grind a custom Ethereum / EVM wallet address with the prefix or suffix of your choice. A real secp256k1 keypair, generated entirely in your browser — the private key never leaves your device.</span>
</a>
</li>
+ <li>
+ <a href="/markets">
+ <span class="sm-title">Markets Hub</span>
+ <span class="sm-path">/markets</span>
+ <span class="sm-desc">The three.ws markets hub — live global stats, the top 100 coins, breaking crypto news from 37 publisher feeds, a 662k-article news archive, and hero links to the full markets toolset.</span>
+ </a>
+ </li>
+ <li>
+ <a href="/markets/news">
+ <span class="sm-title">Crypto News</span>
+ <span class="sm-path">/markets/news</span>
+ <span class="sm-desc">Live crypto news aggregated natively from 37 publisher feeds — filter by category (Bitcoin, DeFi, regulation, and more), search headlines, and open any story in a rich reader with summary, key points, sentiment, and related coverage.</span>
+ </a>
+ </li>
+ <li>
+ <a href="/markets/news/article">
+ <span class="sm-title">Crypto News Reader</span>
+ <span class="sm-path">/markets/news/article</span>
+ <span class="sm-desc">Rich article reader for crypto news — full story extraction with AI summary, key points, sentiment, detected tickers, and related coverage from across the industry.</span>
+ </a>
+ </li>
+ <li>
+ <a href="/markets/archive">
+ <span class="sm-title">Crypto News Archive</span>
+ <span class="sm-path">/markets/archive</span>
+ <span class="sm-desc">The largest open crypto-news archive: 662,047 articles from September 2017 to today in English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language.</span>
+ </a>
+ </li>
</ul>
</section>
diff --git a/src/coins-index.js b/src/coins-index.js
index dcc836c84..e09369fdb 100644
--- a/src/coins-index.js
+++ b/src/coins-index.js
@@ -3,12 +3,8 @@
// a sortable top-coins table with 7d sparklines, a search type-ahead, and
// load-more pagination. Every row links to the rich /coin/:id detail page.
-import {
- formatUsd,
- formatPrice,
- formatPercent,
- escapeHtml as esc,
-} from './shared/coin-format.js';
+import { formatUsd, formatPercent, escapeHtml as esc } from './shared/coin-format.js';
+import { coinRow, COIN_COLUMNS, coinSortValue } from './shared/market-table.js';
const $ = (id) => document.getElementById(id);
@@ -119,51 +115,17 @@ async function loadStats() {
}
// ── Market table ────────────────────────────────────────────────────────────
-
-const COLUMNS = [
- { key: 'rank', label: '#', left: true, hide: 'hide-sm', num: true },
- { key: 'name', label: 'Coin', left: true },
- { key: 'price', label: 'Price', num: true },
- { key: 'change_24h', label: '24h %', num: true },
- { key: 'change_7d', label: '7d %', hide: 'hide-md', num: true },
- { key: 'market_cap', label: 'Mkt Cap', hide: 'hide-lg', num: true },
- { key: 'volume_24h', label: 'Vol (24h)', hide: 'hide-lg', num: true },
-];
+// Row/column/sort primitives are shared with the /markets hub — see
+// src/shared/market-table.js.
const state = { coins: [], sortKey: 'rank', sortDir: 'asc', page: 1, loadingMore: false };
-function sparkline(prices) {
- if (!prices || prices.length < 2) return '';
- const min = Math.min(...prices);
- const max = Math.max(...prices);
- const range = max - min || 1;
- const w = 120;
- const h = 32;
- const pts = prices
- .map((p, i) => `${((i / (prices.length - 1)) * w).toFixed(1)},${(h - ((p - min) / range) * h).toFixed(1)}`)
- .join(' ');
- const up = prices[prices.length - 1] >= prices[0];
- return `<svg width="${w}" height="${h}" viewBox="0 0 ${w} ${h}" aria-hidden="true" style="display:inline-block"><polyline points="${pts}" fill="none" stroke="${up ? 'var(--cv-chart-green)' : 'var(--cv-chart-red)'}" stroke-width="1.5" stroke-linejoin="round"/></svg>`;
-}
-
-function pctCell(v, extraClass = '') {
- if (v == null) return `<td class="pct dim ${extraClass}">—</td>`;
- const up = v >= 0;
- return `<td class="pct ${up ? 'cv-up' : 'cv-down'} ${extraClass}"><span aria-hidden="true">${up ? '▲' : '▼'}</span>${esc(formatPercent(v))}</td>`;
-}
-
-function sortValue(c, key) {
- if (key === 'name') return (c.name || '').toLowerCase();
- if (key === 'rank') return c.rank ?? Infinity;
- return c[key] ?? 0;
-}
-
function sortedCoins() {
const copy = [...state.coins];
const { sortKey, sortDir } = state;
copy.sort((a, b) => {
- const va = sortValue(a, sortKey);
- const vb = sortValue(b, sortKey);
+ const va = coinSortValue(a, sortKey);
+ const vb = coinSortValue(b, sortKey);
const cmp = typeof va === 'string' ? va.localeCompare(vb) : va - vb;
return sortDir === 'asc' ? cmp : -cmp;
});
@@ -178,32 +140,13 @@ function renderTable() {
return;
}
- const head = COLUMNS.map((col) => {
+ const head = COIN_COLUMNS.map((col) => {
const active = col.key === state.sortKey;
const arrow = active ? (state.sortDir === 'asc' ? '↑' : '↓') : '↕';
return `<th scope="col" tabindex="0" data-key="${col.key}" class="${col.left ? 'left' : ''} ${col.hide || ''}"${active ? ` aria-sort="${state.sortDir === 'asc' ? 'ascending' : 'descending'}"` : ''}>${esc(col.label)}<span class="arrow" aria-hidden="true">${arrow}</span></th>`;
}).join('');
- const rows = sortedCoins()
- .map((c) => {
- const href = `/coin/${encodeURIComponent(c.id)}`;
- return `
- <tr data-href="${esc(href)}">
- <td class="rank hide-sm cv-mono">${c.rank ?? '—'}</td>
- <td class="left name-cell"><a href="${esc(href)}"><span class="inner">
- ${c.image ? `<img src="${esc(c.image)}" alt="" loading="lazy" width="24" height="24" data-no-dark-filter />` : ''}
- <span class="nm">${esc(c.name)}</span>
- <span class="sym">${esc(c.symbol)}</span>
- </span></a></td>
- <td class="price">${esc(formatPrice(c.price))}</td>
- ${pctCell(c.change_24h)}
- ${pctCell(c.change_7d, 'hide-md')}
- <td class="dim hide-lg">${esc(formatUsd(c.market_cap))}</td>
- <td class="dim hide-lg">${esc(formatUsd(c.volume_24h))}</td>
- <td class="hide-xl">${sparkline(c.sparkline)}</td>
- </tr>`;
- })
- .join('');
+ const rows = sortedCoins().map(coinRow).join('');
el.innerHTML = `
<div class="cv-table-wrap">
diff --git a/src/markets-page.js b/src/markets-page.js
new file mode 100644
index 000000000..fc368c057
--- /dev/null
+++ b/src/markets-page.js
@@ -0,0 +1,307 @@
+// /markets — the markets hub: live global stats bar, every markets surface
+// as its own hero card (with live stats hydrated in), a sortable top-100
+// table, and a latest-news rail. All real endpoints, all already cached
+// server-side: /api/coin/global, /api/coin/markets, /api/coin/gas,
+// /api/news/feed, /api/news/archive?stats=true.
+
+import { formatUsd, formatPercent, escapeHtml as esc } from './shared/coin-format.js';
+import { coinRow, COIN_COLUMNS, coinSortValue } from './shared/market-table.js';
+import { newsCard, wireNewsContainer } from './shared/news-render.js';
+
+const $ = (id) => document.getElementById(id);
+
+async function getJson(url) {
+ const res = await fetch(url, { headers: { accept: 'application/json' } });
+ if (!res.ok) {
+ const err = new Error(`fetch ${url} → ${res.status}`);
+ err.status = res.status;
+ throw err;
+ }
+ return res.json();
+}
+
+// ── Global stats bar (same cards as /coins) ─────────────────────────────────
+
+const ICONS = {
+ trend:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 7 13.5 15.5 8.5 10.5 2 17"/><polyline points="16 7 22 7 22 13"/></svg>',
+ bars: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3v18h18"/><path d="M18 17V9"/><path d="M13 17V5"/><path d="M8 17v-3"/></svg>',
+ pie: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.21 15.89A10 10 0 1 1 8 2.83"/><path d="M22 12A10 10 0 0 0 12 2v10z"/></svg>',
+ coins:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="6"/><path d="M18.09 10.37A6 6 0 1 1 10.34 18"/><path d="M7 6h1v4"/><path d="m16.71 13.88.7.71-2.82 2.82"/></svg>',
+ gauge:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m12 14 4-4"/><path d="M3.34 19a10 10 0 1 1 17.32 0"/></svg>',
+ activity:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>',
+};
+
+function statCard({ label, value, delta, deltaClass, icon }) {
+ return `
+ <div class="cv-stat-card">
+ <div style="min-width:0">
+ <p class="label">${esc(label)}</p>
+ <p class="value cv-mono">${esc(value)}</p>
+ ${delta ? `<p class="delta ${deltaClass || ''}">${esc(delta)}</p>` : ''}
+ </div>
+ <span class="icon" aria-hidden="true">${ICONS[icon] || ''}</span>
+ </div>`;
+}
+
+function fgClass(v) {
+ if (v == null) return '';
+ if (v <= 25) return 'cv-down';
+ if (v <= 55) return '';
+ return 'cv-up';
+}
+
+function renderStats(global) {
+ const el = $('cv-stats');
+ const { market, fear_greed } = global || {};
+ const cards = [];
+ if (market) {
+ cards.push(
+ statCard({
+ label: 'Total Market Cap',
+ value: formatUsd(market.market_cap_usd),
+ delta:
+ market.market_cap_change_pct_24h != null ? formatPercent(market.market_cap_change_pct_24h) : null,
+ deltaClass: (market.market_cap_change_pct_24h ?? 0) >= 0 ? 'cv-up' : 'cv-down',
+ icon: 'trend',
+ }),
+ statCard({ label: '24h Volume', value: formatUsd(market.volume_24h_usd), icon: 'bars' }),
+ );
+ for (const [i, d] of (market.dominance || []).entries()) {
+ cards.push(statCard({ label: `${d.symbol} Dominance`, value: `${d.pct.toFixed(1)}%`, icon: i === 0 ? 'pie' : 'coins' }));
+ }
+ }
+ if (fear_greed) {
+ cards.push(
+ statCard({
+ label: 'Fear & Greed',
+ value: String(fear_greed.value),
+ delta: fear_greed.label || null,
+ deltaClass: fgClass(fear_greed.value),
+ icon: 'gauge',
+ }),
+ );
+ }
+ if (market?.active_coins != null) {
+ cards.push(statCard({ label: 'Active Coins', value: market.active_coins.toLocaleString('en-US'), icon: 'activity' }));
+ }
+ el.innerHTML = cards.length
+ ? `<div style="display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))">${cards.join('')}</div>`
+ : '';
+}
+
+// ── Suite hero cards ─────────────────────────────────────────────────────────
+
+const G = {
+ table:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 5h18M3 12h18M3 19h18"/></svg>',
+ grid: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>',
+ filter:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"/></svg>',
+ compare:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M8 3v18M16 3v18M3 8h18M3 16h18" opacity="0.4"/><polyline points="4 14 8 10 12 13 16 8 20 11"/></svg>',
+ gauge:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="m12 14 4-4"/><path d="M3.34 19a10 10 0 1 1 17.32 0"/></svg>',
+ flame:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z"/></svg>',
+ news: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2"/><path d="M18 14h-8M15 18h-5M10 6h8v4h-8z"/></svg>',
+ archive:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="5" rx="1"/><path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"/><path d="M10 12h4"/></svg>',
+ cats: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4z"/><circle cx="17" cy="17" r="3"/></svg>',
+ bank: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m3 9 9-6 9 6M4 9v11M20 9v11M8 13v4M12 13v4M16 13v4M2 20h20"/></svg>',
+ derivs:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 3v18h18"/><path d="m7 15 3-6 3 4 4-8"/></svg>',
+ swap: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m17 3 4 4-4 4M21 7H9M7 21l-4-4 4-4M3 17h12"/></svg>',
+ defi: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2 2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>',
+ link: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>',
+ dollar:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="12" y1="2" x2="12" y2="22"/><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></svg>',
+ radar:
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19.07 4.93A10 10 0 0 0 6.99 3.34"/><path d="M4 6h.01"/><path d="M2.29 9.62a10 10 0 1 0 19.02-1.27"/><path d="M16.24 7.76a6 6 0 1 0-8.01 8.91"/><path d="M12 18h.01"/><path d="M17.99 11.66a6 6 0 0 1-2.22 5.01"/><circle cx="12" cy="12" r="2"/><path d="m13.41 10.59 5.66-5.66"/></svg>',
+};
+
+const SUITE = [
+ { href: '/coins', glyph: 'table', title: 'Coins', desc: 'Sortable markets table for hundreds of assets with a rich detail page each.', stat: 'coins' },
+ { href: '/markets/news', glyph: 'news', title: 'Crypto News', desc: 'Live headlines from 37 publisher feeds, filterable and searchable.', stat: 'news' },
+ { href: '/markets/archive', glyph: 'archive', title: 'News Archive', desc: 'The largest open crypto-news archive, back to September 2017.', stat: 'archive' },
+ { href: '/heatmap', glyph: 'grid', title: 'Heatmap', desc: 'The whole market in one view — tiles sized by cap, colored by move.', stat: 'mover' },
+ { href: '/screener', glyph: 'filter', title: 'Screener', desc: 'Filter the top 250 by cap, volume, and 24h move to find movers fast.' },
+ { href: '/compare', glyph: 'compare', title: 'Compare', desc: 'Overlay up to four coins head-to-head with lined-up stats.' },
+ { href: '/fear-greed', glyph: 'gauge', title: 'Fear & Greed', desc: 'One number for market mood, with full interactive history.', stat: 'fg' },
+ { href: '/gas', glyph: 'flame', title: 'Gas Tracker', desc: 'Live Ethereum fees with USD cost estimates per action.', stat: 'gas' },
+ { href: '/categories', glyph: 'cats', title: 'Categories', desc: 'Every crypto sector ranked by market cap — AI, memes, L2s, more.' },
+ { href: '/exchanges', glyph: 'bank', title: 'Exchanges', desc: 'Top venues ranked by trust score and 24h volume.' },
+ { href: '/derivatives', glyph: 'derivs', title: 'Derivatives', desc: 'Perpetual futures — funding, open interest, and volume by market.' },
+ { href: '/converter', glyph: 'swap', title: 'Converter', desc: 'Convert between any crypto and major fiat at live rates.' },
+ { href: '/defi', glyph: 'defi', title: 'DeFi TVL', desc: 'Total value locked across DeFi protocols, live from DeFiLlama.' },
+ { href: '/chains', glyph: 'link', title: 'Chains', desc: 'Blockchain TVL leaderboard with dominance share per chain.' },
+ { href: '/stablecoins', glyph: 'dollar', title: 'Stablecoins', desc: 'Market caps and peg health across every major issuer.' },
+ { href: '/coin-intel', glyph: 'radar', title: 'Coin Intelligence', desc: 'Every launch classified — organic vs bundle, with a learning score.' },
+];
+
+function renderSuite(stats = {}) {
+ $('mkt-suite').innerHTML = SUITE.map((s) => {
+ const stat = stats[s.stat];
+ return `
+ <a class="mkt-hero-card" href="${esc(s.href)}">
+ <span class="glyph" aria-hidden="true">${G[s.glyph] || ''}</span>
+ <h3>${esc(s.title)}</h3>
+ <p>${esc(s.desc)}</p>
+ ${stat ? `<span class="stat">${stat}</span>` : ''}
+ </a>`;
+ }).join('');
+}
+
+// ── Top 100 table ────────────────────────────────────────────────────────────
+
+const tbl = { coins: [], sortKey: 'rank', sortDir: 'asc' };
+
+function renderTable() {
+ const el = $('mkt-table');
+ if (!tbl.coins.length) {
+ el.innerHTML =
+ '<div class="cv-empty">Market data is temporarily unavailable. <a href="/coins">Try the full markets table</a>.</div>';
+ return;
+ }
+ const head = COIN_COLUMNS.map((col) => {
+ const active = col.key === tbl.sortKey;
+ const arrow = active ? (tbl.sortDir === 'asc' ? '↑' : '↓') : '↕';
+ return `<th scope="col" tabindex="0" data-key="${col.key}" class="${col.left ? 'left' : ''} ${col.hide || ''}"${active ? ` aria-sort="${tbl.sortDir === 'asc' ? 'ascending' : 'descending'}"` : ''}>${esc(col.label)}<span class="arrow" aria-hidden="true">${arrow}</span></th>`;
+ }).join('');
+ const sorted = [...tbl.coins].sort((a, b) => {
+ const va = coinSortValue(a, tbl.sortKey);
+ const vb = coinSortValue(b, tbl.sortKey);
+ const cmp = typeof va === 'string' ? va.localeCompare(vb) : va - vb;
+ return tbl.sortDir === 'asc' ? cmp : -cmp;
+ });
+ el.innerHTML = `
+ <div class="cv-table-wrap">
+ <table class="cv-table">
+ <thead><tr>${head}<th class="hide-xl" aria-hidden="true">7d Chart</th></tr></thead>
+ <tbody>${sorted.map(coinRow).join('')}</tbody>
+ </table>
+ </div>`;
+ el.querySelectorAll('th[data-key]').forEach((th) => {
+ const activate = () => {
+ const key = th.dataset.key;
+ if (key === tbl.sortKey) tbl.sortDir = tbl.sortDir === 'asc' ? 'desc' : 'asc';
+ else {
+ tbl.sortKey = key;
+ tbl.sortDir = key === 'name' || key === 'rank' ? 'asc' : 'desc';
+ }
+ renderTable();
+ };
+ th.addEventListener('click', activate);
+ th.addEventListener('keydown', (e) => {
+ if (e.key === 'Enter' || e.key === ' ') {
+ e.preventDefault();
+ activate();
+ }
+ });
+ });
+ el.querySelectorAll('tr[data-href]').forEach((tr) => {
+ tr.addEventListener('click', (e) => {
+ if (e.target.closest('a')) return;
+ location.href = tr.dataset.href;
+ });
+ });
+}
+
+// ── News rail ────────────────────────────────────────────────────────────────
+
+function renderNews(articles) {
+ const el = $('mkt-news');
+ if (!articles?.length) {
+ el.innerHTML =
+ '<div class="cv-empty">The news feed is warming up — <a href="/markets/news">open the news page</a>.</div>';
+ return;
+ }
+ el.innerHTML = `<div class="nw-grid">${articles.slice(0, 5).map((a) => newsCard(a, { chips: false })).join('')}</div>`;
+}
+
+// ── Boot ─────────────────────────────────────────────────────────────────────
+
+function skeletons() {
+ $('cv-stats').innerHTML =
+ '<div style="display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))">' +
+ Array.from({ length: 6 }, () => '<div class="cv-skel" style="height:6rem"></div>').join('') +
+ '</div>';
+ renderSuite({});
+ $('mkt-table').innerHTML =
+ '<div class="cv-table-wrap" style="padding:0.75rem">' +
+ Array.from({ length: 10 }, () => '<div class="cv-skel" style="height:2.5rem;margin:0.375rem 0"></div>').join('') +
+ '</div>';
+ $('mkt-news').innerHTML = `<div class="nw-grid">${'<div class="nw-card" aria-hidden="true"><div class="nw-media cv-skel"></div><div class="nw-body"><div class="cv-skel" style="height:0.875rem"></div><div class="cv-skel" style="height:0.875rem;width:70%"></div></div></div>'.repeat(3)}</div>`;
+}
+
+async function init() {
+ skeletons();
+ wireNewsContainer($('mkt-news'));
+
+ const suiteStats = {};
+ const jobs = [
+ getJson('/api/coin/global')
+ .then((g) => {
+ renderStats(g);
+ if (g?.fear_greed?.value != null) {
+ suiteStats.fg = `${g.fear_greed.value} <span class="dim">· ${esc(g.fear_greed.label || '')}</span>`;
+ }
+ if (g?.market?.active_coins != null) {
+ suiteStats.coins = `${g.market.active_coins.toLocaleString()} <span class="dim">tracked assets</span>`;
+ }
+ })
+ .catch(() => {
+ $('cv-stats').innerHTML = '';
+ }),
+ getJson('/api/coin/markets?page=1&per_page=100')
+ .then(({ coins }) => {
+ tbl.coins = coins || [];
+ renderTable();
+ const mover = [...(coins || [])]
+ .filter((c) => c.change_24h != null)
+ .sort((a, b) => Math.abs(b.change_24h) - Math.abs(a.change_24h))[0];
+ if (mover) {
+ const up = mover.change_24h >= 0;
+ suiteStats.mover = `<span class="${up ? 'cv-up' : 'cv-down'}">${esc(mover.symbol)} ${up ? '▲' : '▼'} ${esc(formatPercent(mover.change_24h))}</span> <span class="dim">top mover</span>`;
+ }
+ })
+ .catch(() => {
+ tbl.coins = [];
+ renderTable();
+ }),
+ getJson('/api/news/feed?limit=6')
+ .then((d) => {
+ renderNews(d.articles);
+ suiteStats.news = `${d.total.toLocaleString()} <span class="dim">live stories · ${d.sources_ok} feeds</span>`;
+ })
+ .catch(() => renderNews(null)),
+ getJson('/api/news/archive?stats=true')
+ .then((d) => {
+ if (d?.stats?.total_articles) {
+ suiteStats.archive = `${d.stats.total_articles.toLocaleString()} <span class="dim">articles since 2017</span>`;
+ const teaser = $('mkt-archive-teaser')?.querySelector('p');
+ if (teaser) {
+ const first = new Date(d.stats.first_article_date);
+ const last = new Date(d.stats.last_article_date);
+ const fmt = (x) => x.toLocaleDateString(undefined, { month: 'short', year: 'numeric' });
+ teaser.textContent = `${d.stats.total_articles.toLocaleString()} articles, ${fmt(first)} → ${fmt(last)} — searchable by ticker, keyword, date, sentiment, and language.`;
+ }
+ }
+ })
+ .catch(() => {}),
+ getJson('/api/coin/gas')
+ .then((d) => {
+ const std = d?.tiers?.find((t) => t.key === 'standard') || d?.tiers?.[1];
+ const gwei = std?.gas_price_gwei ?? d?.base_fee_gwei;
+ if (gwei != null) suiteStats.gas = `${Number(gwei).toFixed(gwei < 10 ? 2 : 0)} <span class="dim">gwei standard</span>`;
+ })
+ .catch(() => {}),
+ ];
+ await Promise.allSettled(jobs);
+ renderSuite(suiteStats);
+}
+
+init();
diff --git a/src/shared/market-table.js b/src/shared/market-table.js
new file mode 100644
index 000000000..953a8a01f
--- /dev/null
+++ b/src/shared/market-table.js
@@ -0,0 +1,59 @@
+// Shared coin-table primitives for the Markets surfaces (/coins, /markets).
+// Pure render helpers — no state, no fetching.
+
+import { formatUsd, formatPrice, formatPercent, escapeHtml as esc } from './coin-format.js';
+
+export function sparkline(prices) {
+ if (!prices || prices.length < 2) return '';
+ const min = Math.min(...prices);
+ const max = Math.max(...prices);
+ const range = max - min || 1;
+ const w = 120;
+ const h = 32;
+ const pts = prices
+ .map((p, i) => `${((i / (prices.length - 1)) * w).toFixed(1)},${(h - ((p - min) / range) * h).toFixed(1)}`)
+ .join(' ');
+ const up = prices[prices.length - 1] >= prices[0];
+ return `<svg width="${w}" height="${h}" viewBox="0 0 ${w} ${h}" aria-hidden="true" style="display:inline-block"><polyline points="${pts}" fill="none" stroke="${up ? 'var(--cv-chart-green)' : 'var(--cv-chart-red)'}" stroke-width="1.5" stroke-linejoin="round"/></svg>`;
+}
+
+export function pctCell(v, extraClass = '') {
+ if (v == null) return `<td class="pct dim ${extraClass}">—</td>`;
+ const up = v >= 0;
+ return `<td class="pct ${up ? 'cv-up' : 'cv-down'} ${extraClass}"><span aria-hidden="true">${up ? '▲' : '▼'}</span>${esc(formatPercent(v))}</td>`;
+}
+
+export function coinRow(c) {
+ const href = `/coin/${encodeURIComponent(c.id)}`;
+ return `
+ <tr data-href="${esc(href)}">
+ <td class="rank hide-sm cv-mono">${c.rank ?? '—'}</td>
+ <td class="left name-cell"><a href="${esc(href)}"><span class="inner">
+ ${c.image ? `<img src="${esc(c.image)}" alt="" loading="lazy" width="24" height="24" data-no-dark-filter />` : ''}
+ <span class="nm">${esc(c.name)}</span>
+ <span class="sym">${esc(c.symbol)}</span>
+ </span></a></td>
+ <td class="price">${esc(formatPrice(c.price))}</td>
+ ${pctCell(c.change_24h)}
+ ${pctCell(c.change_7d, 'hide-md')}
+ <td class="dim hide-lg">${esc(formatUsd(c.market_cap))}</td>
+ <td class="dim hide-lg">${esc(formatUsd(c.volume_24h))}</td>
+ <td class="hide-xl">${sparkline(c.sparkline)}</td>
+ </tr>`;
+}
+
+export const COIN_COLUMNS = [
+ { key: 'rank', label: '#', left: true, hide: 'hide-sm', num: true },
+ { key: 'name', label: 'Coin', left: true },
+ { key: 'price', label: 'Price', num: true },
+ { key: 'change_24h', label: '24h %', num: true },
+ { key: 'change_7d', label: '7d %', hide: 'hide-md', num: true },
+ { key: 'market_cap', label: 'Mkt Cap', hide: 'hide-lg', num: true },
+ { key: 'volume_24h', label: 'Vol (24h)', hide: 'hide-lg', num: true },
+];
+
+export function coinSortValue(c, key) {
+ if (key === 'name') return (c.name || '').toLowerCase();
+ if (key === 'rank') return c.rank ?? Infinity;
+ return c[key] ?? 0;
+}
diff --git a/vercel.json b/vercel.json
index 844be26d6..1b6089485 100644
--- a/vercel.json
+++ b/vercel.json
@@ -933,6 +933,22 @@
"src": "/coins/?",
"dest": "/coins.html"
},
+ {
+ "src": "/markets/?",
+ "dest": "/markets.html"
+ },
+ {
+ "src": "/markets/news/?",
+ "dest": "/markets-news.html"
+ },
+ {
+ "src": "/markets/news/article/?",
+ "dest": "/news-article.html"
+ },
+ {
+ "src": "/markets/archive/?",
+ "dest": "/news-archive.html"
+ },
{
"src": "/fear-greed/?",
"dest": "/fear-greed.html"
diff --git a/vite.config.js b/vite.config.js
index 8e360e57c..b2289b8a1 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -465,6 +465,10 @@ const appConfig = {
'coin-intel': resolve(__dirname, 'pages/coin-intel.html'),
coins: resolve(__dirname, 'pages/coins.html'),
coin: resolve(__dirname, 'pages/coin.html'),
+ markets: resolve(__dirname, 'pages/markets.html'),
+ 'markets-news': resolve(__dirname, 'pages/markets-news.html'),
+ 'news-article': resolve(__dirname, 'pages/news-article.html'),
+ 'news-archive': resolve(__dirname, 'pages/news-archive.html'),
'fear-greed': resolve(__dirname, 'pages/fear-greed.html'),
heatmap: resolve(__dirname, 'pages/heatmap.html'),
gas: resolve(__dirname, 'pages/gas.html'),
@@ -1024,6 +1028,14 @@ support: resolve(__dirname, 'pages/support.html'),
'/coin-intel/': resolve(root, 'pages/coin-intel.html'),
'/coins': resolve(root, 'pages/coins.html'),
'/coins/': resolve(root, 'pages/coins.html'),
+ '/markets': resolve(root, 'pages/markets.html'),
+ '/markets/': resolve(root, 'pages/markets.html'),
+ '/markets/news': resolve(root, 'pages/markets-news.html'),
+ '/markets/news/': resolve(root, 'pages/markets-news.html'),
+ '/markets/news/article': resolve(root, 'pages/news-article.html'),
+ '/markets/news/article/': resolve(root, 'pages/news-article.html'),
+ '/markets/archive': resolve(root, 'pages/news-archive.html'),
+ '/markets/archive/': resolve(root, 'pages/news-archive.html'),
'/fear-greed': resolve(root, 'pages/fear-greed.html'),
'/fear-greed/': resolve(root, 'pages/fear-greed.html'),
'/heatmap': resolve(root, 'pages/heatmap.html'),