---
title: What Trading Algorithms Can You Build with the Helious API and MCP Server?
description: "Six event-driven trading algorithms to build on the Helious API and MCP server: releases, auctions, headlines and the close. One replayed on real prints."
source: Helious
canonical: "https://helious.io/blog/trading-algorithms-you-can-build-with-helious-in-2026"
---

# What Trading Algorithms Can You Build with the Helious API and MCP Server?

Helious · 18 November 2026 · 7 min read

Event-driven ones: algorithms that act on a US release, a Treasury auction, a headline or the closing auction, sized by how big the surprise was. Helious sends each of those already scored, over a WebSocket on Pro, and the same data reaches an AI agent as 27 MCP tools. This post lists six algorithms worth building in 2026 and replays one on the real prints of 17 November. One limit comes first: Helious sends data, not orders. The broker, the execution and the risk are yours.

## 1. What does an event-driven algorithm need?

Four things, and Helious supplies each as a field your code can test:

- **The schedule.** `/v1/calendar` gives each event's time, impact and consensus up to 365 days ahead.

- **The print, pushed as Helious captures it.** The WebSocket at `wss://api.helious.io/v1/stream` pushes every release, auction and headline. Pro holds 2 live connections a key and Ultimate holds 5.

- **A size for the surprise.** A printed US release that Helious has sized carries `sigma`, the miss in standard deviations for that release. A row with no consensus, an earnings row and a release outside the US carry none, so test for the field. One threshold works across CPI, payrolls and the PMIs.

- **A filter for the regime.** `/v1/context` says whether the session is event-driven, event-adjacent, flow-driven or quiet. `/v1/vol` gives each volatility gauge its percentile.

Speed is measured, not promised. Over the 30 days to 17 November 2026 the median High-impact US print was captured in 8 seconds, and nine in ten within 22, across 18 prints. On 17 November Retail Sales was due at 13:30:00 UTC and Helious captured it at 13:30:07. The live figures are public at `https://api.helious.io/api/seo/latency-stats`. They cover US economic prints seen within an hour of their scheduled time. Treasury auctions, releases outside the US and a print first seen later than that are not in them.

## 2. Which trading algorithms can you build?

| Algorithm | What it acts on | Endpoints | MCP tools |
| --- | --- | --- | --- |
| Release-surprise reactor | A print that misses consensus by more than your threshold | `/v1/stream`, `/v1/calendar` | get_economic_calendar |
| Auction reactor | A Treasury auction that tails or stops through | `/v1/auctions` | get_auctions |
| Headline filter | A wire headline scored for bonds or for stocks | `/v1/stream`, `/v1/feed` | get_feed |
| Closing-auction module | Net dollars to buy or sell into the NYSE close | `/v1/imbalance` | get_market_imbalance |
| Volatility gate | A stressed tape, where size should come down | `/v1/context`, `/v1/vol` | get_market_context, get_vol_board |
| Earnings handler | A mega-cap report: stand down before it, read the beat or miss after | `/v1/earnings`, `/v1/nasdaq100` | get_earnings, get_nasdaq100 |

## 3. How do you build the release-surprise reactor?

Open the socket and watch the calendar messages. Each one carries the rows that just changed and says what moved on each row:

```
import asyncio, json, websockets   # websockets 14 or later

KEY = "hel_your_key_here"
SIGMA = 1.5   # one threshold for every release

def on_calendar(msg):
    for row in msg.get("events", []):
        moved = msg.get("changed", {}).get(row.get("id"), [])
        sigma = row.get("sigma")
        if ("actual" in moved and sigma is not None
                and row.get("impact") in ("High", "Medium")
                and abs(sigma) >= SIGMA):
            print("SIGNAL", row["title"], row["actual"],
                  "against", row.get("forecast"), f"{sigma:+.2f} sigma")

async def run():
    async with websockets.connect(
        "wss://api.helious.io/v1/stream",
        additional_headers={"Authorization": f"Bearer {KEY}"},
    ) as ws:
        async for raw in ws:
            msg = json.loads(raw)
            if "error" in msg:
                print("refused:", msg["error"]["code"])
            elif msg["type"] == "hello":
                print("lane:", msg["mode"])   # live on Pro and Ultimate
            elif msg["type"] == "calendar":
                on_calendar(msg)

asyncio.run(run())
```

We replayed the US rows that printed on 17 November 2026 through that handler. It stayed quiet through the 13:30 UTC retail sales rows: Retail Sales printed 0.2 against 0.2, a sigma of 0.00, and Retail Sales ex Autos printed 0.6 against 0.4, a sigma of +0.71. It fired once, at 14:15 UTC: `SIGNAL Industrial Production (MoM) -0.4 against 0.1 -1.61 sigma`. One rule, two releases, no table of per-release thresholds.

Four details of the protocol matter for a build:

- **There is no calendar snapshot at connect.** Connect first, then load `/v1/calendar?detail=full`, then apply each calendar message in order. Replace a row whole by its `id`.

- **A live socket draws no credit.** Do not poll the calendar every second for a number the stream pushes.

- **The lane is in the hello.** `mode` reads `live` on Pro and Ultimate. Below Pro the same message shapes arrive in one snapshot a minute, with prices at least an hour behind.

- **A refusal is a message, then a close.** A key that does not exist gets an error with the code `bad_key` and close code 4401. A key that already holds its connections gets 4409.

## 4. How do you build the auction reactor?

A Treasury auction is a scheduled event with a clean measure of demand: the tail, which is the yield the auction stopped at against the when-issued yield just before it. `/v1/auctions` returns the tail with the context to judge it.

Take the 10-year note of 10 November 2026. It stopped at 5.02% against a when-issued 5.01%, a tail of 1.0 basis point. The bid to cover was 2.46 against a 12-auction average of 2.53. Indirect bidders took 61.2% against an average of 72.6%. Helious's verdict was WEAK. A reactor reads four fields, `tail_bps`, `btc`, `indirect_pct` and `verdict`, and the calendar told it the time days ahead. [How to read an auction](https://helious.io/blog/how-to-read-treasury-bill-note-and-bond-auctions) covers what each field means.

## 5. How do you build the headline filter?

Every item on the Helious news wire carries two scores from -10 to +10: `score` for bonds and `equity_score` for stocks. Filter on the channel you trade.

A headline timed 22:16 UTC on 17 November said Nvidia had beaten earnings estimates. It scored 0 for bonds and +2 for stocks, with this `helious_read`: "Nvidia beat profit forecasts, which lifts shares a bit, but it does little for government bonds." A rates algorithm ignores that item. An index algorithm does not. One score would have forced a choice.

Two more fields keep the count honest. A story that is retitled keeps its `thread_id`, so count stories by it. A feed message can carry `removed` ids for a withdrawn post, so drop them.

## 6. How do you build the closing-auction module?

`/v1/imbalance` returns net dollars to buy or sell into the NYSE opening and closing auctions, summed by Helious from every listing's own auction print. Reads land at 9:28:05 and 9:29:40 ET for the open, and at 15:50:10, 15:55:10 and 15:58:30 ET for the close. Each basket carries `net_usd`, a direction and a size tier.

The coverage is NYSE listings, about 2,400 companies. Stocks listed on Nasdaq and the NYSE Arca ETFs are not in it, so the S&P basket is the NYSE part of the index. The reads are live on Pro and Ultimate. [One real close is worked through here](https://helious.io/blog/market-on-close-imbalance-how-to-read-it).

## 7. Where does an AI agent fit?

In the slow loop, not the fast one. An agent thinks between tool calls, and the stream is a WebSocket for code, not an MCP feature. An agent connected to `https://api.helious.io/mcp` is the right tool for three jobs around the algorithm:

- **Plan the session.** It reads the calendar and lists the rows to arm for and the ones to stand down around.

- **Explain the print.** After a signal, `get_market_context` says what the session rests on and what it does not cover.

- **Plan the build.** `get_build_plan` returns the calls in order and the monthly cost, and draws no credit. It answers over plain HTTP with no key:

```
curl -s -X POST https://api.helious.io/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_build_plan",
       "arguments":{"goal":"a bot that trades CPI","cadence":"every trading day"}}}'
```

On 17 November that call answered: one pass is 6 credits, about 132 a month every trading day.

## 8. What must be true before it trades money?

- **You have tested the rule.** Helious holds each release's consensus, first actual, previous and revised prior on `/v1/calendar/history`, as far back as your plan reads: 24 months on Pro, 10 years on Ultimate. Test a surprise rule there.

- **You run the scores forward.** Helious's own captured prints and scores start in mid-2026. A score is Helious's reading of an item, not a proven signal. Test it against your own fills before it sizes a trade.

- **You are not racing machines.** A print captured in 8 seconds is fast for a person and for a discretionary system. It is not a co-located feed. [The edge left for the rest of us](https://helious.io/blog/where-is-the-trading-edge-in-an-algorithmic-world) is in reading the surprise, not in arriving first.

- **You own the rest.** Orders, position limits and the kill switch are your code. Nothing here is trading advice.

## 9. What does it cost, and where do I start?

Pro is $39.99 a month: the live stream on 2 connections a key, every price live, 3,000 credits a month and 24 months of history. The live socket draws no credit, so the credits go on the REST calls around it. One pass of the full recipe is 6 calls, about 132 credits a month run once every trading day. Ultimate is $99 a month: 5 connections a key, no credit cap and 10 years of history.

Start with no account: `curl "https://api.helious.io/v1/calendar?days_back=1&country=US"` returns the last 24 hours of prints, with a sigma on each release Helious has sized, and the week ahead. With no key a print is held for its first hour. Then open the [trading algorithm recipe](https://helious.io/developers/use-cases/#trading-algorithm). The other two posts in this set cover the [macro systems](https://helious.io/blog/macro-systems-you-can-build-with-helious-in-2026) that tell an algorithm which regime it is in, and the [macro forecasts](https://helious.io/blog/macro-forecasts-you-can-build-with-helious-in-2026) that tell it what to expect.

The trading algorithm recipe: the schedule, the stream, the auction and the headline filter, with a working sample. The first call needs no key.

[See the trading algorithm recipe →](https://helious.io/developers/use-cases/#trading-algorithm)
