The feed, as an API.
Every headline the terminal collects is available to your own systems. REST covers history and filters, and a WebSocket delivers each article with its voice audio.
API plan: $299 a month, cancel any time. See pricing
Quick start
Create a key in Settings, then send it on every call as Authorization: Bearer tnc_… or x-api-key. A key is shown once and stored hashed.
Read articles
curl -H "Authorization: Bearer tnc_…" \ "https://api.tradenewscast.com/v1/articles?limit=5"
import requests
r = requests.get(
"https://api.tradenewscast.com/v1/articles",
params={"limit": 5},
headers={"Authorization": "Bearer tnc_…"},
)
print(r.json()["items"][0]["title"])const res = await fetch("https://api.tradenewscast.com/v1/articles?limit=5", {
headers: { authorization: "Bearer tnc_…" },
});
const { items } = await res.json();
console.log(items[0].title);The fetch example is what you run in Bun. It also works in Node 18+, and in a browser if you proxy the key yourself.
Open the live stream
const ws = new WebSocket("wss://api.tradenewscast.com/v1/stream", {
headers: { authorization: "Bearer tnc_…" },
});
ws.onopen = () =>
ws.send(JSON.stringify({ type: "subscribe", categories: ["stocks", "crypto"] }));
ws.onmessage = (event) => {
const msg = JSON.parse(String(event.data));
if (msg.type === "article") {
console.log(
msg.article.title,
msg.audio ? `${msg.audio.durationMs} ms of audio` : "no audio"
);
}
};import asyncio
import json
import websockets
async def main():
# websockets below 14 calls this extra_headers
async with websockets.connect(
"wss://api.tradenewscast.com/v1/stream",
additional_headers={"Authorization": "Bearer tnc_…"},
) as ws:
await ws.send(
json.dumps({"type": "subscribe", "categories": ["stocks", "crypto"]})
)
async for raw in ws:
msg = json.loads(raw)
if msg["type"] == "article":
print(msg["article"]["title"])
asyncio.run(main())How it behaves
The limits and the failure codes, as the server enforces them.
- Keys
- 5 per account
Create and revoke them in Settings, under API.
- Rate limit
- 300 requests a minute, per key
Over the limit the call returns 429 with tryAgainIn in milliseconds.
- Stream connections
- 3 open sockets per key
A fourth upgrade on the same key is refused.
- Audio
- Up to 8 seconds
An article waits 8 seconds for its voice audio. After that it is sent with audio: null, and the audio stays at /v1/articles/{id}/audio once it is cached.
- Close codes
- 4401 and 4403
4401 when the key is revoked, switched off or expires, 4403 when API access expires or is taken away.
- Refused upgrades
- 401, 402, 429
401 for a key the server will not accept, 402 without an active API plan, 429 at the rate limit or the socket cap.
- Header
- Authorization: Bearer tnc_… or x-api-key
Both are read on REST calls and on the stream upgrade.