Skip to main content

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 the X-API-Key header; WebSocket uses the api_key query parameter:
API keys are created in the TradingNews Dashboard after subscribing.

Plans

All plans can be billed monthly or annually (annual saves 30%).

REST API

GET /v1/news — List articles

Query parameters:
  • limit (int, 1-100, default 50) — number of articles
  • urgency (string, optional) — filter: breaking, flash, or regular
  • since (ISO datetime, optional) — articles at or after this time (Starter: 24h max, Pro/Max: 7 days max)
  • order (desc or asc, default desc) — sort by received time
  • after_id (26-character ULID, optional) — forward cursor; requires order=asc and since
  • insights (boolean, default false) — Max-only explicit opt-in; Starter and Pro return 403 when true
Response:
Article fields: 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)

Query parameters:
  • q (string, 2-500 chars, required) — natural-language query
  • limit (int, 1-100, default 20)
  • insights (boolean, default false) — Max-only explicit opt-in; Starter and Pro return 403 when true
Response:
Starter and Pro keys receive 403. Returns 503 if the embedding service is temporarily unavailable — retry with backoff.

GET /v1/account/usage — Check your plan

Response:
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 tickers field on each message; Pro streams omit it
  • News Insights is available to Max with &insights=true; Starter and Pro opt-in connections close with 1008. 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