News Endpoints

abstract

Manage economic calendar events — fetch from external source, view, and trigger LLM impact analysis to determine whether trading should be paused during high-impact events.

🔒 Authentication

PropertyValue
MechanismNone
RequiredNo

Endpoints in this group (7 total)

MethodPathDescription
GET/api/v1/newsList all economic events (with filters)
GET/api/v1/news/{event_id}Get single event detail
PATCH/api/v1/news/{event_id}Update event fields (e.g., mark as reviewed)
POST/api/v1/news/fetchFetch fresh events from external calendar API
POST/api/v1/news/{event_id}/analyzeLLM analyze event impact
POST/api/v1/news/{event_id}/analyze-debugLLM analyze with full debug output
POST/api/v1/news/analyze-todayBatch analyze all today's events

GET /api/v1/news

Returns economic calendar events (e.g., NFP, CPI, Fed rate decisions) filtered by date and impact level.

Request

ParameterLocationTypeRequiredDescription
from_dateQuerystringNoStart date filter
to_dateQuerystringNoEnd date filter
impactQuerystringNohigh | medium | low

200 OK example:

[
  {
    "id": 12,
    "title": "Non-Farm Payrolls",
    "currency": "USD",
    "impact": "high",
    "event_time": "2026-05-02T12:30:00Z",
    "actual": "200K",
    "forecast": "185K",
    "previous": "175K",
    "llm_verdict": "bullish_usd",
    "llm_analyzed": true
  }
]

Pydantic Schema: backend/api/routes/news.py :: EconomicEventResponse


POST /api/v1/news/fetch

Calls an external economic calendar API to pull fresh events for the next N days. Deduplicates by event time + title.

Response: { "fetched": 24, "new": 8, "updated": 3 }


POST /api/v1/news//analyze

Sends event data to LLM to determine trading impact: bullish/bearish/neutral, which pairs to avoid, and whether to halt trading.


RolePath
Routerbackend/api/routes/news.py
RoleLink
Frontend PagePage - News