News triggers for trading bots and alerts
A trading bot that waits on a poll interval is late. The useful pattern is a WebSocket subscription for the names you trade, plus a REST backfill if the socket drops.
How does a stock news API help developers of trading bots and alert systems?
MarketNewsAPI pushes each new stock article to a WebSocket channel you choose, such as a ticker or press releases, and REST covers anything you missed.
When this stock news workflow fits
- Your bot should react to a headline, not to a timer.
- You need a stable article id so the same story is not traded twice.
- You want server-side filters so your process does not parse every headline.
The call
WebSocket subscribe
The same article shape on every guide: ticker, type, timestamps, summary, and a link. Press releases include the full text.
{"action":"subscribe","channels":["ticker:NVDA","type:press_release"]}How do you request stock news for this workflow?
Subscribe narrowly
Subscribe to ticker:NVDA for that name, or type:press_release for wire releases. Channels are OR. See channel rules.
Dedupe on id
Each article id is art_ plus 16 hex characters of the canonical URL. The same release syndicated under several tickers is one id.
Fill gaps
After a reconnect, call GET /v1/news with from set to the last published_at you processed and sort=published_asc.
Frequently asked questions
Which plan includes the stock news stream?
What is the burst limit on the API?
Can I run a trading bot from a serverless function?
Other stock news API workflows
Event-driven traders
Catch a press release or a sharp headline on a name you trade, with the ticker already attached.
Read the guideQuant desks
Turn headlines into features: event type and the minute the story was stored.
Read the guideAI agents
Let an agent answer “what just happened to NVDA?” from summaries and source links, not from a scraped page.
Read the guideReal-time stock news for $15 a month.
Start a 7-day Pro trial. A card is required. REST, WebSocket, and MCP are included. If you don't subscribe, the account stays on Free.