📖 Documentation

FAQ & API Reference

Everything you need to know about Trump-Meter — from how sentiment is scored to integrating our REST API into your own application.

💬 General

Trump-Meter is a real-time AI sentiment dashboard that scores Trump-related posts and news headlines for their likely market impact. Every 5 minutes, new content from Truth Social, financial news (via Finnhub), and other sources is fetched, scored by an AI model on a −1 to +1 scale, and aggregated into an overall sentiment index.

The goal is simple: give traders and investors a quantified signal of how Trump's social media activity and news coverage are likely to move financial markets — before those moves happen.

We ingest from two primary sources:

  • Truth Social — Trump's own posts, pulled via a mirrored Telegram channel that relays content in near-real-time.
  • Finnhub financial news — Major financial news outlets (Reuters, AP, Bloomberg, etc.). All general market news is ingested and automatically tagged: headlines mentioning Trump are flagged as Trump-related and feed the main sentiment score; the rest feed the market sentiment section (Fed, Trade, Energy, Geopolitical topics).

Each piece of content is individually scored by an AI model (Claude Haiku) before being stored in our TimescaleDB database. Raw source text is not stored permanently — only the headline, source metadata, sentiment score, and impact summary.

The ingestion and scoring pipeline runs every 5 minutes, 24/7 — there are no trading-hours restrictions. New content is scored the moment it appears. The dashboard updates live via Server-Sent Events (SSE) — you'll see changes appear automatically without refreshing.

Free accounts receive data with a small delay. Pro accounts receive real-time data with zero delay.

Not yet. The web dashboard is fully responsive and works well on mobile browsers. Native iOS/Android apps are on the roadmap. Pro users can also use webhooks to push alerts to their own notification pipelines (Telegram bots, custom apps, etc.).

📊 Scoring & Data

Each headline or post is scored individually on a −1.0 to +1.0 scale by an AI model:

  • +1.0 = strongly market-bullish (tax cut announcement, trade deal signed)
  • 0.0 = neutral or unclear market impact
  • −1.0 = strongly market-bearish (tariff escalation, sanctions, conflict rhetoric)

The overall score shown on the dashboard is a weighted average of individual scores within the selected time window. More impactful headlines (e.g. breaking news vs routine posts) receive a higher weight multiplier in the aggregation.

Capitulation is detected when sentiment rapidly reverses from strongly negative to neutral/positive within a short window — historically associated with mean-reversion bounces (Trump backs down from a tariff position, for example). It's flagged as a potential BUY setup.

Escalation is detected when posting frequency spikes significantly above average — often a leading indicator that something aggressive is about to be announced. It's flagged as a SELL/caution signal.

Both are supplementary signals, not standalone trading advice.

The velocity stat shows the current annualised posting rate: how many scored items per 24 hours if the current intraday pace continued. High velocity (e.g. 80+/day) often coincides with escalation events. Very low velocity (below 5/day) means thin data — scores will be less reliable.

History depends on your account tier:

  • Free — 24-hour window only
  • Pro — 24h, 48h, 7-day, 30-day windows, plus custom date-range via the Sentiment Calendar and Archive

The full historical database extends back to early 2025, accessible via the Archive search (Pro) or the export API.

General market news (non-Trump) is scored for relevance to these asset classes: S&P 500, Nasdaq, Oil, Gold, US Dollar, Bonds. Each headline can tag multiple markets. The breakdown shows weighted average score and volume of headlines per market within the selected window.

Market sentiment is broken down by topic: Fed/Economy, Trade, Geopolitical, Energy, Other. Market Sentiment is a Pro feature.

REST API

API Reference Download

OpenAPI-compatible JSON spec — import into Postman, Insomnia, or your HTTP client of choice.

🔑
Authentication — All /api/v1/* endpoints require a Pro API key passed in the request header:
X-API-Key: tm_live_xxxxxxxxxxxxxxxxxxxx
Generate your key from the Account page. Keys are rate-limited to 500 requests / day.
⏱ 500 req / day · resets at midnight UTC
GET /api/v1/score Current sentiment score + metadata PRO

Returns the current weighted sentiment score for Trump-related content, including trend delta, frequency, capitulation/escalation flags, and historical statistics.

Query Parameters
NameTypeDefaultDescription
hoursfloat4.0Lookback window in hours (1–168)
Example Request
curl "https://trump-meter.com/api/v1/score?hours=24" \
  -H "X-API-Key: tm_live_xxxxxxxxxxxxxxxxxxxx"
Response Schema
200 OK
"intraday_avg": -0.014, // weighted avg score, current window "intraday_count": 23, // headlines scored in window "weekly_avg": -0.011, // 7-day weighted average "weekly_count": 366, // headlines in last 7 days "total_count": 469, // all-time total scored "trend_delta": -0.078, // change from prior window (momentum) "post_frequency": 0.0, // posts/hour deviation from 30d avg "capitulation_active": false, // rapid reversal event active "escalation_active": false, // posting frequency spike active "score_correlation": 0.164, // 30d hourly correlation with S&P "accuracy_n": 104, // sample size for correlation "last_updated": "2026-04-12T10:45:00Z", "tier": "pro", // caller's tier "delayed": false // false for Pro, true for Free
GET /api/v1/headlines Recent headlines with full scoring data PRO

Returns the most recent scored headlines, including the AI impact summary, signal classification, and market tags.

Query Parameters
NameTypeDefaultDescription
limitint50Number of headlines to return (1–200)
filterstringallall | trump | market | posts | news
Example Request
curl "https://trump-meter.com/api/v1/headlines?limit=10&filter=trump" \
  -H "X-API-Key: tm_live_xxxxxxxxxxxxxxxxxxxx"
Response Schema (single item)
200 OK
"time": "2026-04-12T09:31:00Z", "headline": "Trump announces new 90-day tariff pause", "source": "Reuters", "sentiment_score": 0.72, // -1.0 to +1.0 "signal_type": "reversal", // action | reaction | reversal | neutral "impact": "Bullish reversal — tariff pause reduces recession risk...", "url": "https://reuters.com/...", "markets": "[{\"name\":\"S&P 500\",\"direction\":\"bullish\"},{\"name\":\"Oil\",\"direction\":\"bearish\"}]", "is_trump": true, // false = general market news "weight": 1.5, // impact weight multiplier "topic": "tariffs", // economy|tariffs|military|energy|other "market_move_15m": null // S&P 15min price change post-headline (if tracked)
GET /api/v1/timeseries Sentiment time series (4-hour buckets) PRO

Returns time-bucketed sentiment averages. Each bucket is 4 hours wide. Use for charting, backtesting signal overlays, or correlation analysis.

Query Parameters
NameTypeDefaultDescription
hoursint24Lookback in hours (1–168)
Response Schema (array of buckets)
200 OK
// Array of 4-hour buckets, oldest first [ { "bucket": "2026-04-12T04:00:00+00:00", "avg_score": -0.082, // weighted avg for this bucket "n": 7 // number of items in bucket }, ... ]
GET /api/v1/markets Per-market sentiment breakdown PRO

Returns aggregated sentiment scores broken down by market (S&P 500, Nasdaq, Oil, Gold, etc.) over the specified window.

Query Parameters
NameTypeDefaultDescription
hoursint168Lookback in hours (1–720)
Response Schema
200 OK
[ { "market": "S&P 500", "avg_score": -0.06, "n": 300, // number of headlines referencing this market "pct_bullish": 0.41, // fraction with score > 0 "pct_bearish": 0.59 }, ... ]
GET /api/v1/signals Structured BUY / SELL signal output PRO

Returns machine-readable BUY/SELL signals derived from the current sentiment state. If no signal conditions are met, no_signal: true is returned. Designed for algorithmic consumption.

Example Request
curl "https://trump-meter.com/api/v1/signals" \
  -H "X-API-Key: tm_live_xxxxxxxxxxxxxxxxxxxx"
Response Schema
200 OK
{ "timestamp": "2026-04-12T10:45:00Z", "score": -0.42, // current 4h avg score "trend": -0.12, // momentum delta "no_signal": false, "signals": [ { "signal": "BUY", // BUY | SELL "type": "bearish_sentiment", // capitulation | escalation | bearish_sentiment | bullish_sentiment "confidence": "low", // high | medium | low "reason": "Sentiment strongly bearish — mean reversion setup", "score": -0.42 } ] }
GET /api/v1/correlation 30-day sentiment ↔ S&P 500 correlation PRO

Returns the Pearson correlation coefficient between hourly sentiment scores and S&P 500 (MES futures) returns over the trailing 30 days.

Response Schema
200 OK
{ "correlation_30d": 0.164, "sample_n": 104, "interpretation": "weak/no correlation", // strong positive | moderate positive | weak/no | moderate negative | strong negative "timestamp": "2026-04-12T10:45:00Z" }
GET /api/v1/mes S&P 500 (MES) price data PRO

Returns MES (Micro E-mini S&P 500) OHLCV bars from our internal price database. Useful for overlaying price on sentiment charts.

Query Parameters
NameTypeDefaultDescription
hoursint24Lookback in hours (1–168)
Python Quick-Start
import requests

API_KEY = "tm_live_xxxxxxxxxxxxxxxxxxxx"
BASE    = "https://trump-meter.com"
HEADERS = {"X-API-Key": API_KEY}

# Current score
score = requests.get(f"{BASE}/api/v1/score", headers=HEADERS, params={"hours": 4}).json()
print(f"Score: {score['intraday_avg']:.3f}  |  Capitulation: {score['capitulation_active']}")

# Latest 20 headlines
headlines = requests.get(f"{BASE}/api/v1/headlines", headers=HEADERS,
                         params={"limit": 20, "filter": "trump"}).json()
for h in headlines:
    print(f"[{h['sentiment_score']:+.2f}] {h['headline']}")

# Signals
signals = requests.get(f"{BASE}/api/v1/signals", headers=HEADERS).json()
if not signals["no_signal"]:
    for s in signals["signals"]:
        print(f"{s['signal']} ({s['confidence']}) — {s['reason']}")

🔔 Webhooks

Webhooks let Trump-Meter push real-time events to any URL you control — a personal server, a cloud function, a Telegram bot, or a trading system. When a trigger condition fires, we POST a JSON payload to your endpoint within seconds.

To configure: go to Account → Webhooks, enter your HTTPS URL, and optionally configure alert thresholds. Use the "Test" button to send a sample payload and verify your endpoint is reachable.

Currently supported webhook events:

score_threshold
Fired when the 4-hour sentiment score crosses above or below your configured thresholds (default: ±0.30).
capitulation
Fired when a capitulation event is detected — rapid sentiment reversal from negative to neutral/positive.
escalation
Fired when posting frequency spikes significantly above the 30-day average.
test
Triggered manually from the Account page to verify your webhook endpoint is reachable.

Every webhook POST uses Content-Type: application/json. The shape varies by event:

score_threshold payload
{
  "event":       "score_threshold",
  "score":       -0.38,
  "direction":  "below",    // "above" | "below"
  "threshold":  -0.30,
  "headline":   "Trump threatens 200% tariffs on EU autos",
  "source":     "Reuters",
  "timestamp":  "2026-04-12T10:45:00Z"
}
capitulation / escalation payload
{
  "event":       "capitulation",
  "score":       0.12,
  "message":    "Capitulation detected — sentiment reversed from -0.45 to +0.12",
  "timestamp":  "2026-04-12T11:00:00Z"
}

Your endpoint should return HTTP 2xx within 10 seconds. Failed deliveries are not retried in the current version.

Currently we do not sign payloads with an HMAC signature (coming soon). In the meantime, you can verify authenticity by checking:

  • The payload contains a valid timestamp within the last 5 minutes
  • The source IP matches our server (87.106.29.252)

HMAC signature verification (similar to Stripe's Stripe-Signature header) is planned for the next Pro release.

📥 Export

Pro users can export scored headlines in JSON or CSV format from the Archive page, or programmatically via /pro/export/headlines.

Export API
ParameterValuesDescription
formatjson | csvOutput format
filterall | trump | market | posts | newsContent type filter
date_fromYYYY-MM-DDStart date (inclusive)
date_toYYYY-MM-DDEnd date (inclusive)
searchstringFilter by keyword in headline text
marketstringFilter by market name (e.g. "Oil")
# Requires session auth (JWT cookie) — use browser or pass Authorization header
curl "https://trump-meter.com/pro/export/headlines?format=csv&filter=trump&date_from=2026-01-01&date_to=2026-04-01" \
  -H "Authorization: Bearer <your_jwt_token>" \
  -o headlines.csv

The CSV includes: time, headline, source, sentiment_score, signal_type, weight, topic, impact, url. Each row is one scored headline. The impact column contains the full AI-generated rationale text.

💳 Account & Billing

  • Free — 24h window, 20 headlines, delayed data, no chart history, no overlays
  • Pro — Real-time data, 24h/48h/7d/30d windows, 50+ headlines, all price overlays (NQ, Oil, DJI), sentiment calendar, archive search, REST API access, CSV/JSON export, webhooks

Pro subscriptions are coming soon. Sign up free to be notified when Pro launches.

We store your email address, hashed password, subscription tier, and alert preferences. We do not store your payment card details (handled by Stripe). API key usage is logged for rate-limiting purposes only — we don't log the content of your API requests.

The sentiment data we collect is derived from publicly available sources (Truth Social, financial news). We don't collect any data about what you read or how you use the dashboard beyond standard anonymous analytics (Umami, self-hosted).

Go to Account → Danger Zone → Delete Account. This immediately cancels any active subscription, deletes your API keys, and removes your user record. This action is irreversible.

Send feedback to info@trump-meter.com. We read everything and try to respond within 24 hours.