ledger: crypto market-cap top-20 extraction

This commit is contained in:
ledger committed 2026-11-04 13:07:16 +00:00
1 parent 1debbafa0b
commit d16a3e007f
3 files changed
+267

No files matched your search

+182
View File
@@ -0,0 +1,182 @@
[
{
"rank": 1,
"name": "Bitcoin",
"symbol": "btc",
"price_usd": 78382,
"market_cap_usd": 1575893146452,
"market_cap_change_24h_pct": 1.49,
"volume_24h_usd": 31492703674
},
{
"rank": 2,
"name": "Ethereum",
"symbol": "eth",
"price_usd": 2316.73,
"market_cap_usd": 283079436237,
"market_cap_change_24h_pct": 1.72,
"volume_24h_usd": 11509848251
},
{
"rank": 3,
"name": "Tether",
"symbol": "usdt",
"price_usd": 0.998969,
"market_cap_usd": 178189851682,
"market_cap_change_24h_pct": -0.39,
"volume_24h_usd": 49857500751
},
{
"rank": 4,
"name": "BNB",
"symbol": "bnb",
"price_usd": 699.49,
"market_cap_usd": 91991216509,
"market_cap_change_24h_pct": 0.06,
"volume_24h_usd": 972490046
},
{
"rank": 5,
"name": "XRP",
"symbol": "xrp",
"price_usd": 1.28,
"market_cap_usd": 81138041353,
"market_cap_change_24h_pct": 0.16,
"volume_24h_usd": 2367963367
},
{
"rank": 6,
"name": "USDC",
"symbol": "usdc",
"price_usd": 0.999448,
"market_cap_usd": 70550799494,
"market_cap_change_24h_pct": -0.41,
"volume_24h_usd": 13815706242
},
{
"rank": 7,
"name": "Solana",
"symbol": "sol",
"price_usd": 92.72,
"market_cap_usd": 54727794168,
"market_cap_change_24h_pct": -0.1,
"volume_24h_usd": 2778173808
},
{
"rank": 8,
"name": "TRON",
"symbol": "trx",
"price_usd": 0.318963,
"market_cap_usd": 30309543786,
"market_cap_change_24h_pct": -0.83,
"volume_24h_usd": 538095594
},
{
"rank": 9,
"name": "Figure Heloc",
"symbol": "figr_heloc",
"price_usd": 1.03,
"market_cap_usd": 26844879741,
"market_cap_change_24h_pct": -0.03,
"volume_24h_usd": 481114715
},
{
"rank": 10,
"name": "Zcash",
"symbol": "zec",
"price_usd": 1288.02,
"market_cap_usd": 21925269847,
"market_cap_change_24h_pct": 6.86,
"volume_24h_usd": 1147674146
},
{
"rank": 11,
"name": "Hyperliquid",
"symbol": "hype",
"price_usd": 84.94,
"market_cap_usd": 20335597447,
"market_cap_change_24h_pct": 0.32,
"volume_24h_usd": 1348530812
},
{
"rank": 12,
"name": "Monero",
"symbol": "xmr",
"price_usd": 641.9,
"market_cap_usd": 12084828023,
"market_cap_change_24h_pct": 2.94,
"volume_24h_usd": 193676029
},
{
"rank": 13,
"name": "Dogecoin",
"symbol": "doge",
"price_usd": 0.074743,
"market_cap_usd": 11704959032,
"market_cap_change_24h_pct": -0.3,
"volume_24h_usd": 483661183
},
{
"rank": 14,
"name": "USDS",
"symbol": "usds",
"price_usd": 1.0,
"market_cap_usd": 9576191536,
"market_cap_change_24h_pct": -0.17,
"volume_24h_usd": 210065027
},
{
"rank": 15,
"name": "WhiteBIT Coin",
"symbol": "wbt",
"price_usd": 75.28,
"market_cap_usd": 8934911929,
"market_cap_change_24h_pct": 1.31,
"volume_24h_usd": 133655260
},
{
"rank": 16,
"name": "LEO Token",
"symbol": "leo",
"price_usd": 9.32,
"market_cap_usd": 8576829551,
"market_cap_change_24h_pct": 0.61,
"volume_24h_usd": 100555
},
{
"rank": 17,
"name": "Chainlink",
"symbol": "link",
"price_usd": 11.13,
"market_cap_usd": 8531870409,
"market_cap_change_24h_pct": -0.48,
"volume_24h_usd": 304608346
},
{
"rank": 18,
"name": "Cardano",
"symbol": "ada",
"price_usd": 0.189974,
"market_cap_usd": 7138766905,
"market_cap_change_24h_pct": -0.16,
"volume_24h_usd": 235438100
},
{
"rank": 19,
"name": "Stellar",
"symbol": "xlm",
"price_usd": 0.163071,
"market_cap_usd": 5761475891,
"market_cap_change_24h_pct": -1.36,
"volume_24h_usd": 135925538
},
{
"rank": 20,
"name": "Bitcoin Cash",
"symbol": "bch",
"price_usd": 274.04,
"market_cap_usd": 5511420220,
"market_cap_change_24h_pct": -0.88,
"volume_24h_usd": 146355359
}
]
+26
View File
@@ -0,0 +1,26 @@
# Top 20 Cryptocurrencies by Market Cap (USD)
Source: CoinGecko API `coins/markets` (2026-11-04), `vs_currency=usd`, `per_page=20`, sorted by `market_cap` desc.
| Rank | Name | Symbol | Price (USD) | Market Cap (USD) | 24h % |
|---|---|---|---|---|---|
| 1 | Bitcoin | btc | 78,382.000000 | 1,575,893,146,452 | +1.49% |
| 2 | Ethereum | eth | 2,316.730000 | 283,079,436,237 | +1.72% |
| 3 | Tether | usdt | 0.998969 | 178,189,851,682 | -0.39% |
| 4 | BNB | bnb | 699.490000 | 91,991,216,509 | +0.06% |
| 5 | XRP | xrp | 1.280000 | 81,138,041,353 | +0.16% |
| 6 | USDC | usdc | 0.999448 | 70,550,799,494 | -0.41% |
| 7 | Solana | sol | 92.720000 | 54,727,794,168 | -0.10% |
| 8 | TRON | trx | 0.318963 | 30,309,543,786 | -0.83% |
| 9 | Figure Heloc | figr_heloc | 1.030000 | 26,844,879,741 | -0.03% |
| 10 | Zcash | zec | 1,288.020000 | 21,925,269,847 | +6.86% |
| 11 | Hyperliquid | hype | 84.940000 | 20,335,597,447 | +0.32% |
| 12 | Monero | xmr | 641.900000 | 12,084,828,023 | +2.94% |
| 13 | Dogecoin | doge | 0.074743 | 11,704,959,032 | -0.30% |
| 14 | USDS | usds | 1.000000 | 9,576,191,536 | -0.17% |
| 15 | WhiteBIT Coin | wbt | 75.280000 | 8,934,911,929 | +1.31% |
| 16 | LEO Token | leo | 9.320000 | 8,576,829,551 | +0.61% |
| 17 | Chainlink | link | 11.130000 | 8,531,870,409 | -0.48% |
| 18 | Cardano | ada | 0.189974 | 7,138,766,905 | -0.16% |
| 19 | Stellar | xlm | 0.163071 | 5,761,475,891 | -1.36% |
| 20 | Bitcoin Cash | bch | 274.040000 | 5,511,420,220 | -0.88% |
+59
View File
@@ -0,0 +1,59 @@
#!/usr/bin/env python3
"""Verify the fresh CoinGecko top-20 extraction artifact."""
import json
import sys
JSON_PATH = "/root/.hermes/wizard-outputs/ledger/crypto-top20-fresh.json"
MD_PATH = "/root/.hermes/wizard-outputs/ledger/crypto-top20-fresh.md"
errors = []
def fail(msg):
errors.append(msg)
def main():
try:
with open(JSON_PATH) as f:
rows = json.load(f)
except Exception as e:
fail(f"cannot read {JSON_PATH}: {e}")
rows = None
if rows is not None:
if not isinstance(rows, list) or len(rows) != 20:
fail(f"expected 20 rows, got {len(rows) if isinstance(rows, list) else type(rows)}")
ranks = [r.get("rank") for r in rows]
if ranks != list(range(1, 21)):
fail(f"ranks not 1..20 contiguous: {ranks}")
if not all(isinstance(r.get("market_cap_usd"), int) and r["market_cap_usd"] > 0 for r in rows):
fail("market_cap_usd not positive int for all rows")
if any(not r.get("name") or not r.get("symbol") for r in rows):
fail("missing name/symbol in some row")
try:
with open(MD_PATH) as f:
md = f.read()
except Exception as e:
fail(f"cannot read {MD_PATH}: {e}")
md = ""
if md:
lines = [l for l in md.splitlines() if l.strip()]
if not lines or not lines[0].startswith("# "):
fail("md first line not a title")
data_rows = [l for l in lines[4:] if l.startswith("|") and "---" not in l]
if len(data_rows) != 20:
fail(f"md data rows != 20: {len(data_rows)}")
if errors:
print("FAIL")
for e in errors:
print(" -", e)
sys.exit(1)
print("OK: 20 rows, ranks 1..20 contiguous, all market caps positive; md has 20 rows")
if __name__ == "__main__":
main()