refactor: migrate TrumpSignal to TypeScript monorepo and Pages Router

This commit is contained in:
2026-11-03 20:42:30 +08:00
parent de1a903462
commit 1791dbb557
188 changed files with 52461 additions and 2 deletions
+111
View File
@@ -0,0 +1,111 @@
# Trump Alpha — Full Reference (by Endorphin)
> Expanded companion to /llms.txt. This single document inlines the full
> methodology, the glossary, and the documented case studies with their
> evidence sources, so an AI assistant can answer detailed questions in one
> fetch. For the concise index see https://trumpsignal.com/llms.txt
>
> Trump Alpha is a crypto research project by Endorphin, a research desk. It
> tracks four uncorrelated signals that move markets before consensus catches
> up. Every signal is public and timestamped. Free to read; an optional
> non-custodial Hyperliquid auto-trader is available for the Trump signal only.
## Who runs this
Endorphin is the research desk behind Trump Alpha. Positioning is deliberately
research-first: the site documents live production logic, publishes its
track record openly, and timestamps every call. It is not a paid signal group,
a course, or a "guru" account.
## The four signal engines (full logic)
### 1. Trump Truth Social Signal (real-time event)
Watches Donald Trump's Truth Social feed in real time. Within ~15 seconds of a
new post, an NLP model classifies it as LONG (bullish crypto), SHORT (bearish),
or NOISE (off-topic), with a 0–100 confidence score. Post-to-classification
runs in under 3 seconds. Posts that name specific assets and tie them to policy
score highest. Only posts ≥ 88 confidence can trigger the optional auto-trader.
Failure mode: vague political posts with no asset/policy content score low by
design; sarcasm and quote-reposts are the hardest cases.
### 2. Macro Vibes (crypto macro regime)
Eight free public macro indicators in one view: AHR999, Fear & Greed Index, BTC
dominance, ETH/BTC ratio, total stablecoin supply, US spot Bitcoin ETF daily net
flow, BTC perpetual open interest, and the Altcoin Season Index. Plus two trade
triggers:
- BTC Macro Bottom (long-only): fires when ≥ 2 of 3 agree — AHR999 < 0.45,
price ≤ 200-week MA × 1.05, Pi Cycle Bottom. Fires 2–4× per multi-year cycle.
- BTC Funding Reversal: fires when 30-day cumulative perp funding crosses ±3%
AND recent cycles start cooling (mean-reversion against crowded positioning).
Manage-only: alerts surface; the user opens on Hyperliquid and the bot then
manages the exit (5-rung stop ladder, de-risk, pyramid, peak-trail). No auto-open.
### 3. KOL talks-vs-trades divergence (highest conviction)
25 crypto KOL feeds ingested daily via RSS. An NLP step extracts ticker(s),
directional stance, and conviction. A separate on-chain step diffs each KOL's
Ethereum wallet. A DIVERGENCE fires when public stance and wallet action
disagree within a ±7-day window (e.g. publicly bullish ETH while selling ETH).
On-chain action is treated as ground truth. This is the platform's
highest-conviction category. Alert-only — never auto-trades.
### 4. BTC Funding Rate Reversal
Lives inside Macro Vibes. Monitors BTC perpetual funding at Binance. Extreme
30-day cumulative funding (> ±3%) historically precedes mean reversion; the
scanner bets against the crowded side once rates start cooling. Alert-only.
### Optional: Hyperliquid auto-trader (Trump signal only)
Non-custodial execution layer using a trade-only Hyperliquid API key (cannot
withdraw funds). User controls leverage (default 3×), position size, TP/SL,
daily budget cap, active-hours window, and minimum confidence. System 1 (Trump
scalp) is the only engine that auto-opens; everything else is alert/manage-only.
## Glossary (key terms)
- AHR999: composite BTC valuation indicator (price, geometric-mean price, and an
exponential growth fit). < 0.45 = deep-value accumulation zone; > 1.2 =
expensive relative to the growth trajectory.
- Pi Cycle Bottom: 150-day EMA ≤ 471-day SMA × 0.745. Historically pinpointed
BTC cycle bottoms within ~2 weeks in 2015, 2018, and 2022.
- 200-week moving average: long-cycle BTC support; price below or near it has
marked historical accumulation regimes.
- Talks-vs-trades divergence: a KOL's public stance and on-chain wallet behaviour
point in opposite directions on the same asset within ±7 days.
- Funding reversal: mean-reversion signal when 30-day cumulative BTC perp funding
crosses ±3% and the crowded side starts cooling.
## Documented case studies (with evidence sources)
These are evidence, not return promises. Each answers: what happened, how the
market reacted, and why it supports a specific engine.
- Strategic Crypto Reserve announcement (Mar 2, 2025, Trump Truth Social):
Trump confirmed a U.S. Strategic Crypto Reserve including BTC, ETH, SOL, XRP,
ADA. BTC +8.2%, ETH +10%+ within 24h. Supports a high-conviction LONG when a
post names specific assets tied to policy.
Source: cnbc.com/2025/03/02/trump-announces-strategic-crypto-reserve-including-bitcoin-solana-xrp-and-more.html
- $6.8M pre-positioning profit around the reserve post (Mar 2025, on-chain):
An anonymous address built a large leveraged BTC/ETH position around the
announcement and reportedly closed it same-day for ~$6.8M. Shows speed is edge
in event-driven trading.
- Tariff escalation post (Apr 2025, Trump Truth Social): a tariff-escalation
post produced a risk-off move, BTC -4.1% in ~4h. Supports the need for a real
SHORT branch — not every Trump post is bullish.
Source: coindesk.com/markets/2026/04/20/five-times-president-trump-made-a-statement-that-moved-bitcoin-and-why-it-might-happen-again-this-week
- ETH talks-vs-trades divergence (illustrative composite): a tracked KOL
published a bullish ETH thesis then reduced ~$180k ETH within five days —
classic divergence between narrative and positioning.
- FTX washout zone (Nov 2022, BTC macro bottom reference): BTC reached ~$15.5k
and recovered toward ~$69k within ~18 months (+345%). The regime the BTC
macro-bottom engine is built to identify via AHR999 + 200-week MA + Pi Cycle.
## URLs
- Home: https://trumpsignal.com
- Trump signals: https://trumpsignal.com/en/trump
- Macro Vibes: https://trumpsignal.com/en/macro
- KOL talks-vs-trades: https://trumpsignal.com/en/kol
- Trade history: https://trumpsignal.com/en/trades
- Analytics / track record: https://trumpsignal.com/en/analytics
- Methodology: https://trumpsignal.com/en/methodology
- Glossary: https://trumpsignal.com/en/glossary
- Case studies: https://trumpsignal.com/en/case-studies
+82
View File
@@ -0,0 +1,82 @@
# Trump Alpha
> A crypto research project by Endorphin, a research desk. Tracks four uncorrelated signals that move markets before consensus catches up: Trump Truth Social sentiment, Macro Vibes (crypto macro regime dashboard), KOL Substack/podcast signals, and talks-vs-trades on-chain divergence. Every signal is public and timestamped.
>
> Full reference (methodology + glossary + case studies inlined): https://trumpsignal.com/llms-full.txt
## What this site does
Trump Alpha is Endorphin's public signal desk: four independent signal engines and one macro context view in one live dashboard. All four dashboards are free to read — no account required, every call timestamped.
1. **Trump Truth Social Signal** — Scrapes Trump's Truth Social posts within 15 seconds of publish. AI classifies each post as LONG (bullish crypto), SHORT (bearish), or NOISE (off-topic) with a confidence score 0–100. Only posts scoring ≥ 88 confidence trigger the optional auto-trader. The entire pipeline from post to classification runs in under 3 seconds. Optional: auto-execute on Hyperliquid with isolated margin, automatic TP/SL, and six user-defined safety limits (leverage cap, position size, daily budget, active-hours window, confidence floor, stop-loss floor).
2. **Macro Vibes** — The crypto macro-regime dashboard. Surfaces eight free public macro signals in one view: AHR999, Fear & Greed Index, BTC dominance, ETH/BTC ratio, total stablecoin supply, US spot Bitcoin ETF daily net flow, BTC perpetual open interest, and the Altcoin Season Index — plus two trade triggers:
- **BTC Macro Bottom** (long-only): fires when ≥ 2 of 3 agree — AHR999 < 0.45, price ≤ 200-week MA × 1.05, Pi Cycle Bottom. Fires 2–4 times per multi-year cycle.
- **BTC Funding Reversal**: fires when 30-day cumulative perp funding crosses ±3% AND the most recent cycles start cooling (mean-reversion bet against crowded positioning).
3. **KOL Signal** — 25 crypto KOL feeds ingested daily via RSS: Arthur Hayes (BitMEX co-founder), Delphi Digital, Bankless, Empire (Jason Yanowitz + Santiago Santos), Unchained (Laura Shin), 0xResearch (Blockworks), Lightspeed (Blockworks), Pomp (Anthony Pompliano), The Defiant, Reflexivity Research (Will Clemente), Bell Curve (Multicoin Capital), The Scoop (The Block / Frank Chaparro), TFTC (Marty Bent), checkmate (Glassnode), coinmetrics, willywoo (Willy Woo), glassnode, Lyn Alden (Lyn Alden Investment Strategy), The DeFi Edge, Bitcoin Magazine, Deribit Insights, Bitfinex Alpha, Forward Guidance, and more. AI extracts: ticker(s) mentioned, directional stance (buy/sell/bullish/bearish/reduce/mention), and conviction score.
4. **Talks-vs-Trades Divergence** — The platform's highest-conviction signal. Cross-references each KOL's public posts against their on-chain Ethereum wallet changes within a ±7-day window. A DIVERGENCE fires when a KOL is publicly bullish but their wallet is selling (or vice versa). An ALIGNMENT fires when public stance and on-chain action agree. On-chain action is treated as ground truth — talk is cheap, wallet movements are not.
5. **Funding Rate Reversal** — Lives inside Macro Vibes. Monitors BTC perpetual funding rate at Binance. Extreme positive or negative 30-day cumulative funding (> ±3%) historically precedes mean-reversion; the scanner bets against the crowded side when rates start cooling.
6. **Hyperliquid Auto-Trader** — Optional execution layer for the Trump signal. Non-custodial: uses a trade-only Hyperliquid API key (cannot withdraw funds). You control: leverage (default 3×), position size, TP/SL percentages, daily budget cap, active-hours trading window, and minimum confidence threshold.
## Key concepts defined
**AHR999**: A composite Bitcoin valuation indicator combining price, the geometric mean of historical price, and an exponential growth model fit. Below 0.45 marks the deep-value / accumulation zone; above 1.2 means BTC is expensive relative to its growth trajectory.
**200-week Moving Average (200WMA)**: Long-cycle structural support. Every Bitcoin bear cycle since 2013 has bottomed within ±5% of this level. Used as one of three macro-bottom trigger conditions.
**Pi Cycle Bottom**: 150-day EMA crossing to ≤ 471-day SMA × 0.745. A late-cycle capitulation signal that historically pinpointed the 2015, 2018, and 2022 BTC cycle bottoms within a 2-week window.
**Talks-vs-Trades divergence**: Comparing a KOL's public verbal position on an asset against what their on-chain wallet actually does within the same ±7-day window. The divergence signal (say one thing, do another) is treated as the higher-conviction indicator — on-chain behavior is harder to fake than a tweet or newsletter.
**KOL (Key Opinion Leader)**: In crypto, influential analysts, fund managers, podcast hosts, and content creators whose public views measurably move retail sentiment. Trump Alpha tracks 25 of them across Substack, podcast RSS, and blog feeds.
**Hyperliquid**: A decentralized perpetual futures exchange. Trump Alpha's auto-trader executes all positions there. API keys are trade-only (no withdrawal permissions) and are stored server-side encrypted.
**Isolated margin**: Each trade uses only the capital allocated to it. A losing trade cannot drain other positions or your full wallet — it is isolated to its own margin bucket.
## Who this is for
- Crypto traders who want to react to Trump's posts faster than manual monitoring allows
- Bitcoin cycle investors watching for macro-bottom confluence to size into long-term positions
- Sophisticated traders who want to know what prominent KOLs are actually doing on-chain vs. what they say publicly
- Anyone building or refining a systematic approach to crypto that uses multiple uncorrelated signals
## What makes Trump Alpha different
- **Speed**: Trump post → AI classification → optional trade in < 3 seconds. Manual monitoring can't compete.
- **On-chain ground truth**: The talks-vs-trades module treats wallet movements as more reliable than public statements. Most signal platforms only track what people say.
- **Four uncorrelated sources**: Trump macro sentiment, Bitcoin cycle indicators, KOL narratives, and funding extremes don't move together — combining them reduces false signals.
- **No custody**: Your API key can trade but cannot withdraw. Trump Alpha never touches your actual funds.
## Pricing
Free to read all four dashboards. No subscription required. No account needed to view signals.
The optional Hyperliquid auto-trader requires your own Hyperliquid account and a trade-only API key.
## Technology
- Backend: Python 3.9+ / FastAPI / SQLite (dev) + PostgreSQL (prod)
- AI signal extraction: Claude (Anthropic) — Haiku for KOL batch analysis, custom model for Trump live scoring
- On-chain data: Etherscan API (ERC-20 wallet tracking) + Hyperliquid public API (perp positions)
- Price data: Binance WebSocket (BTC/ETH/SOL/TRUMP/BNB/DOGE/LINK/AAVE) + Hyperliquid allMids (HYPE/PURR)
- Frontend: Next.js 16 / TypeScript / wagmi (Ethereum wallet connect)
- Alerts: Telegram bot with per-user signal preferences
## URLs
- Homepage / landing page: https://trumpsignal.com
- Trump Truth Social signal dashboard: https://trumpsignal.com/en/trump
- Macro Vibes (BTC cycle + macro + funding): https://trumpsignal.com/en/macro
- KOL signals & talks-vs-trades divergence: https://trumpsignal.com/en/kol
- Signal methodology (full technical explanation): https://trumpsignal.com/en/methodology
- Glossary (AHR999, Pi Cycle, MVRV-Z, KOL, divergence...): https://trumpsignal.com/en/glossary
- Case studies (documented Trump crypto post events with price impact): https://trumpsignal.com/en/case-studies
- FAQ: https://trumpsignal.com/#faq
## Contact
Site: https://trumpsignal.com