How to build news trading signals for algo trading
Turn real-time news, entity detection and sentiment scores into machine-readable signals your trading system can consume
Written by Tasha Tatum
July 6, 2026
How to build news trading signals for algo trading
To feed news into a trading system, combine three APITube features: the SSE stream (/v1/news/stream) delivers matching articles as they are indexed, entity detection pins each article to the companies it actually talks about, and entity-level sentiment scores the tone toward each company on a -1 to 1 scale. Your bot consumes a single filtered stream and reacts to scored, machine-readable events instead of parsing headlines.
curl -N -H "X-API-Key: YOUR_API_KEY" \
"https://api.apitube.io/v1/news/stream?organization.name=Tesla&language.code=en"
Every filter of a normal search works on the stream, so the query above pushes only English articles mentioning Tesla — nothing to poll, nothing to deduplicate across repeated searches.
What latency should you expect from news signals?
Be realistic about the clock: the stream checks for new matching articles roughly every 30 seconds and delivers them as they are indexed, not tick-by-tick. That makes APITube signals right for minute-scale strategies — sentiment shifts, breaking-event reaction, coverage-volume spikes — not for microsecond arbitrage against the exchange feed. Two practical knobs matter for a bot: stream.max_age (a rolling window in minutes) drops late-indexed backfill before it is delivered or billed, so an old article can never fire a “new news” rule; and the connection lives at most 6 hours before the server asks you to reconnect. Details are in how to stream news in real time with SSE.
How do you score an article into a signal?
A usable signal needs a number, not a headline. Every article already carries scores your pipeline can threshold without any NLP of your own:
- Tone toward the company:
entity.sentiment.polarity(positive/negative/neutral) and the bracketing filtersentity.sentiment.score.min/entity.sentiment.score.maxmeasure sentiment toward the entity itself, so a negative remark about one ticker inside a neutral market wrap still triggers. - Tone of the whole article:
sentiment.overall.score.min/.maxon the same -1 to 1 scale. - Urgency:
is_breaking=1keeps only stories flagged as breaking.
This request streams only strongly negative coverage of one company — an early-warning feed ready for a threshold rule:
curl -N -H "X-API-Key: YOUR_API_KEY" \
"https://api.apitube.io/v1/news/stream?organization.name=Tesla&entity.sentiment.polarity=negative&entity.sentiment.score.max=-0.5"
If a company name fails to resolve, look up its stable numeric id first and pass entity.id instead — how to get sentiment toward a specific company or person shows the lookup.
How do you keep noise out of the signal?
False positives cost money, so gate the stream on quality before the score ever reaches your strategy:
- Source floor:
source.rank.opr.min=7keeps only widely-referenced publishers (OPR is a 0–10 authority scale) — a rumor blog and a wire service should not move the same signal. - Scope:
category.id=medtop:04000000limits coverage to the IPTC economy, business and finance category. - Payload trim: the
flparameter selects only the fields you consume (sayid,title,published_at,entities), shrinking each event your parser handles.
For backtesting, run the identical filters against /v1/news/everything with a published_at.start / published_at.end window — the search endpoint accepts the same parameters as the stream, so your historical sample matches what the live feed would have delivered. The full parameter list is in the official News API reference.
Common Questions
- Can I stream several tickers on one connection?
- How is streaming billed for a bot that runs 24/7?
- Should I use webhooks instead of SSE?
Can I stream several tickers on one connection?
Yes — filters accept comma-separated values, so organization.name=Tesla,Nvidia matches articles mentioning either company on a single connection. Your consumer then reads the entities array of each event to route the article to the right per-ticker signal, including each entity’s own sentiment block.
How is streaming billed for a bot that runs 24/7?
Streaming draws from its own credit pool, separate from REST requests, and you pay per delivered article — an open connection that delivers nothing costs nothing beyond its slot. Narrow filters are therefore also a cost control: the negative-only Tesla stream above bills a fraction of an unfiltered firehose. See how credits work.
Should I use webhooks instead of SSE?
Use SSE when your bot is a long-running process that can hold a connection; use webhooks when you would rather APITube call your HTTP endpoint as matches appear — for example from a serverless stack. The filters are the same saved-search model either way, so switching later does not change your query logic.