How to Add Verified News Intelligence to TradingAgents
Replace raw news feeds in the TradingAgents framework with confidence-scored intelligence from Polaris. Better sentiment data, bias detection, and structured predictions for your trading agents.
New: Trading agents can now pay for Polaris intelligence autonomously — no API key required. Learn more →
The Full Trading Toolkit
Polaris ships a complete trading intelligence layer — 11 endpoints purpose-built for agents that think in tickers and trade on signals.
{
"ticker": "NVDA",
"composite_score": 0.72,
"signal": "bullish",
"components": {
"sentiment": { "current_24h": 0.8, "week_avg": 0.48 },
"momentum": { "value": 0.35, "direction": "accelerating" },
"volume": { "briefs_24h": 7, "velocity_change_pct": 40 },
"events": { "count_7d": 1, "latest_type": "earnings" }
}
}Resolve NVDA to Nvidia with exchange, sector, and live sentiment.
/ticker/:symbolResolve up to 20 tickers in one call.
/ticker/resolveFloat scores -1.0 to +1.0 per entity, batch queryable.
/entities/sentimentDaily timeseries — avg/min/max sentiment with brief counts.
/ticker/:symbol/historyAutomatic alerts when sentiment shifts beyond your threshold.
/ticker/:symbol/signalsCo-occurring tickers with aligned or inverse relationships.
/ticker/:symbol/correlations17 sectors ranked by volume with sentiment signals.
/sectorsSingle trading signal from sentiment, momentum, volume, events.
/ticker/:symbol/scoreSend holdings, get intelligence ranked by relevance.
/portfolio/feedEarnings, FDA decisions, launches. Filter by ticker or type.
/events/calendarPre-market, regular, after-hours, overnight on every brief.
?market_session=...TradingAgents is a 30,000-star open-source framework that mirrors real-world trading firms — deploying specialized LLM agents for fundamental analysis, sentiment scoring, technical analysis, and risk management. It's an impressive piece of work.
But every trading agent is only as good as its data. And right now, TradingAgents relies on basic news feeds and social sentiment scraping that give you raw text with no quality signal. Your News Analyst agent gets headlines. Your Sentiment Analyst gets raw social posts. Neither knows which sources to trust, whether coverage is biased, or how confident to be in what they're reading.
Polaris fixes that. Instead of feeding your trading agents raw headlines, you feed them structured intelligence with confidence scores, bias detection, counter-arguments, and source verification — so every trading decision is backed by data your agents can actually evaluate.
What Your Trading Agents Get
News Analyst
Goes from raw headlines to structured briefs with confidence scores (0-1), source counts, and counter-arguments. Instead of “Oil prices rise on Middle East tensions,” your agent gets a scored brief with evidence from 7 verified sources, a confidence of 0.92, and counter-arguments flagging that supply routes remain open.
Sentiment Analyst
Gets bias detection across outlets. Polaris shows how Reuters (center), Fox News (right), and The Guardian (left) frame the same story differently — so your sentiment model doesn't mistake editorial framing for market signal.
Risk Management
Gets access to /forecast — structured predictions with confidence scores, timeframes, and invalidation conditions. Your risk agent can evaluate “Oil prices will remain in the $90-110 range (75% confidence, invalidated if Hormuz blockade occurs)” instead of guessing from headlines.
Setup: 5 Minutes
Install the Polaris Python SDK:
pip install polaris-news
Set your API key:
export POLARIS_API_KEY=pr_live_xxx
Free tier gives you 1,000 credits/month — enough to test the full integration.
Replace the News Analyst Data Source
The simplest integration: replace the news data flowing into the News Analyst agent with Polaris intelligence.
from polaris_news import PolarisClient
client = PolarisClient()
def get_polaris_news(ticker: str, category: str = "markets"):
"""Fetch verified intelligence instead of raw news."""
# Search for briefs related to this ticker
results = client.search(
query=ticker,
category=category,
limit=10
)
# Format for TradingAgents news analyst
intelligence = []
for brief in results.briefs:
intelligence.append({
"headline": brief.headline,
"summary": brief.summary,
"confidence": brief.confidence,
"bias_score": brief.bias_score,
"source_count": brief.source_count,
"category": brief.category,
"published_at": brief.published_at,
"counter_argument": brief.counter_argument,
"entities": getattr(brief, "entities", [])
})
return intelligenceYour News Analyst now receives briefs that include confidence scores and counter-arguments — two things no raw news feed provides.
Add Bias-Aware Sentiment Analysis
Polaris compares how different outlets cover the same story. Use this to give your Sentiment Analyst a bias-adjusted view:
def get_bias_comparison(topic: str):
"""Compare outlet framing for sentiment calibration."""
comparison = client.compare_sources(topic=topic)
return {
"topic": comparison.topic,
"source_analyses": comparison.source_analyses,
"polaris_analysis": comparison.polaris_analysis,
"polaris_brief": comparison.polaris_brief
}When Reuters says “markets are cautious” and Fox News says “markets are panicking,” your agent sees both framings and the synthesis — instead of treating one outlet's spin as ground truth.
Add Predictive Intelligence with /forecast
This is the highest-value integration. Instead of your trading agents inferring what might happen from raw headlines, ask Polaris directly:
import httpx
API_KEY = "pr_live_xxx"
BASE = "https://api.thepolarisreport.com"
def get_forecast(topic: str, depth: str = "standard"):
"""Get structured predictions with confidence and invalidation criteria."""
resp = httpx.post(
f"{BASE}/api/v1/forecast",
headers={"X-API-Key": API_KEY},
json={"topic": topic, "depth": depth}
)
forecast = resp.json()
return {
"executive_summary": forecast["executive_summary"],
"trend": forecast.get("trend"),
"predictions": [
{
"prediction": p["prediction"],
"confidence": p["confidence"],
"timeframe": p.get("timeframe"),
"invalidated_if": p.get("invalidated_if")
}
for p in forecast.get("predictions", [])
],
"signals_to_watch": forecast.get("signals_to_watch", []),
"wildcards": forecast.get("wildcards", [])
}Your Risk Management agent can now evaluate: “Oil prices staying in $90-110 range, 75% confidence, 30-day timeframe, invalidated if Hormuz blockade occurs.” That's a structured input for risk models, not a headline to interpret.
Verify Claims Before Trading
Before your trading agent acts on any claim, verify it:
def verify_claim(claim: str):
"""Fact-check a claim against verified intelligence."""
resp = httpx.post(
f"{BASE}/api/v1/verify",
headers={"X-API-Key": API_KEY},
json={"claim": claim}
)
result = resp.json()
return {
"verdict": result["verdict"], # supported, contradicted, partially_supported, unverifiable
"confidence": result["confidence"],
"evidence": result.get("evidence", []),
"counter_arguments": result.get("counter_arguments", []),
"sources_checked": result.get("sources_checked", 0)
}
# Example: before acting on a rumor
verification = verify_claim("NVIDIA is facing GPU supply constraints")
if verification["verdict"] == "supported" and verification["confidence"] > 0.7:
# Proceed with trade logic
passSet Up Watchlists for Real-Time Alerts
Monitor entities relevant to your portfolio and get notified when new intelligence publishes:
def create_watchlist(name: str, entities: list, webhook_url: str):
"""Watch entities and get webhook alerts on new intelligence."""
# Create watchlist
resp = httpx.post(
f"{BASE}/api/v1/watchlists",
headers={"X-API-Key": API_KEY},
json={"name": name}
)
watchlist = resp.json()
# Add watch items
for entity in entities:
httpx.post(
f"{BASE}/api/v1/watchlists/{watchlist['id']}/items",
headers={"X-API-Key": API_KEY},
json={
"item_type": "entity",
"value": entity,
"notify": "webhook",
"callback_url": webhook_url
}
)
return watchlist
# Watch key entities for your portfolio
create_watchlist(
name="Trading Portfolio",
entities=["NVIDIA", "TSMC", "OpenAI", "Federal Reserve"],
webhook_url="https://your-agent.example.com/webhook"
)Your trading agent gets push notifications when the intelligence changes — no polling required.
Full Integration Example
Here's how it all comes together in a TradingAgents workflow:
import httpx
from polaris_news import PolarisClient
from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents.default_config import DEFAULT_CONFIG
API_KEY = "pr_live_xxx"
BASE = "https://api.thepolarisreport.com"
polaris = PolarisClient()
def enhanced_analysis(ticker: str):
"""Full Polaris-enhanced trading analysis."""
# 1. Get verified intelligence
news = polaris.search(query=ticker, category="markets", limit=10)
# 2. Check bias across outlets
bias = polaris.compare_sources(topic=ticker)
# 3. Get forward-looking predictions
forecast = httpx.post(
f"{BASE}/api/v1/forecast",
headers={"X-API-Key": API_KEY},
json={"topic": f"{ticker} stock price", "depth": "standard"}
).json()
# 4. Verify any specific claims
verification = None
if news.briefs:
top_claim = news.briefs[0].headline
verification = httpx.post(
f"{BASE}/api/v1/verify",
headers={"X-API-Key": API_KEY},
json={"claim": top_claim}
).json()
return {
"intelligence": news,
"bias_analysis": bias,
"forecast": forecast,
"verification": verification
}
# Run analysis
analysis = enhanced_analysis("NVDA")
# Feed into TradingAgents
ta = TradingAgentsGraph(debug=True, config=DEFAULT_CONFIG.copy())
_, decision = ta.propagate("NVDA", "2026-03-20")What Changes for Your Trading Agents
| Without Polaris | With Polaris |
|---|---|
| Raw headlines, no quality signal | Confidence-scored briefs (0-1) |
| Single-source sentiment | Multi-source bias comparison |
| Backward-looking only | Forward-looking predictions with invalidation criteria |
| No claim verification | Fact-check any claim before acting |
| Manual monitoring | Watchlist webhooks for real-time alerts |
| Static snapshots | Living briefs that evolve with new sources |