AI Agent Skill
Copy the SKILL.md below into your project to teach AI coding agents how to use the TradingNews API. Works with Claude Code, Cursor, GitHub Copilot, and other AI tools.Full Skill Content
TradingNews provides a unified, real-time financial news API. It aggregates breaking news from multiple curated sources into a single structured stream.Base URL
Authentication
REST requests require an API key via theX-API-Key header; WebSocket uses the api_key query parameter:
Plans
All plans can be billed monthly or annually (annual saves 30%).
REST API
GET /v1/news — List articles
limit(int, 1-100, default 50) — number of articlesurgency(string, optional) — filter:breaking,flash, orregularsince(ISO datetime, optional) — articles at or after this time (Starter: 24h max, Pro/Max: 7 days max)order(descorasc, defaultdesc) — sort by received timeafter_id(26-character ULID, optional) — forward cursor; requiresorder=ascandsinceinsights(boolean, defaultfalse) — Max-only explicit opt-in; Starter and Pro return403when true
since lookback is capped at 24h for Starter and 7 days for Pro/Max.
Response tiers: Base/Pro return the six article fields above; Max additionally returns tickers. Max requests with insights=true additionally return the public insights object described in News Insights.
GET /v1/news/search — Semantic search (Max only)
q(string, 2-500 chars, required) — natural-language querylimit(int, 1-100, default 20)insights(boolean, defaultfalse) — Max-only explicit opt-in; Starter and Pro return403when true
403. Returns 503 if the embedding service is temporarily unavailable — retry with backoff.
GET /v1/account/usage — Check your plan
tier is one of starter, pro, max, expired (7-day grace at 1 req/min after cancellation), or free (never subscribed — blocked from API access). This endpoint is free (does not count toward rate limit).
WebSocket Streaming (Pro and Max)
Connect for real-time push delivery of all articles as they arrive:- No subscription message needed — connect and receive (firehose)
- Pro or Max plan required — Starter keys get rejected (code 1008)
- 1 active connection per user — a new connection supersedes the old one; the old socket closes with code
1000 - Articles arrive as JSON, same format as REST
- Max streams include the
tickersfield on each message; Pro streams omit it - News Insights is available to Max with
&insights=true; Starter and Pro opt-in connections close with1008. Defaults stay unchanged. See News Insights. - Subscription status is re-checked every 5 minutes — expired subs are dropped with code 1008
Python example
Reconnection pattern
Error Handling
Python Integration Example
Node.js Integration Example
Common Patterns
Poll for new articles (Starter)
News-driven trading signal
Docs & Support
- Full API docs: https://docs.tradingnews.press
- Dashboard: https://tradingnews.press/dashboard
- Status: https://tradingnews.press/status