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

All requests require an API key via the X-API-Key header:
API keys are created in the TradingNews Dashboard after subscribing.

Plans

PlanPriceREST Rate LimitWebSocketSemantic SearchPer-Ticker Sentiment
Starter$20/mo1 req/minNoNoNo
Pro$50/mo30 req/minYes (1 connection)NoNo
Max$100/mo60 req/minYes (1 connection)YesYes
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 after this time (Starter: 24h max, Pro: 7 days max)
Response:
Article fields:
FieldTypeDescription
idstringUnique ULID, sortable by time
contentstringArticle text
urgencystringbreaking, flash, or regular
sentimentstring?Sentiment label (when available)
published_atstringISO 8601 publication time
received_atstringISO 8601 time API received it
tickersobject[]Max only. Per-ticker sentiment, e.g. [{"ticker": "AAPL", "sentiment": "positive"}]. Empty array when no tickers detected. Absent on Starter/Pro.
since lookback is capped at 24h for Starter and 7 days for Pro/Max.

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)
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 connection per user — second connection is rejected
  • Articles arrive as JSON, same format as REST
  • Max streams include the tickers field on each message; Pro streams omit it
  • Subscription status is re-checked every 5 minutes — expired subs are dropped with code 1008

Python example

Reconnection pattern


Error Handling

StatusMeaningAction
401Invalid or missing API keyCheck X-API-Key header
403Subscription expired or inactive keyRenew subscription
404Article not foundNormal — no charge
429Rate limit exceededWait and retry

Python Integration Example

Node.js Integration Example


Common Patterns

Poll for new articles (Starter)

News-driven trading signal


Docs & Support