For builders

The engine is the product. Build against it.

Everything the Stax app does runs through one backtesting and screening engine. That engine is open: call it over REST, hand it to an AI agent over MCP, or drive it from your terminal. The rules, the fills, and the fees are identical no matter which door you come through.

api.staxlabs.org/api/v1

curl -X POST https://api.staxlabs.org/api/v1/backtest \

-H "Authorization: Bearer sk_YOUR_KEY" \

-H "Content-Type: application/json" \

-d '{ "strategy": { "symbols": ["AAPL","MSFT","JNJ","PG"],

"reviews": "monthly", "sell_rule": "loss_over_10_pct" },

"start": "2021-01-02", "end": "2025-12-31" }'

{

"status": "complete", // 4.1s

"starting_value": 10000,

"ending_value": 13850,

"worst_stretch": -1940, // dollars, peak to trough

"trades": 214, // each carries its reason

"fees_included": true,

"fills": "next_day_open", // no hindsight allowed

...

}

Door one: REST

A plain HTTP API with nothing clever to learn.

POST a screen and get back the companies that pass your filters. POST a strategy and get back its full simulated record: growth, worst stretch, and every trade with its reason. One Bearer key authenticates everything, and GET /account tells you exactly where your limits stand.

There is no SDK to install and no session handshake to manage. If your language can send JSON over HTTPS, it can run the same engine the app runs.

Explore the API
api.staxlabs.org/api/v1

curl -X POST https://api.staxlabs.org/api/v1/backtest \

-H "Authorization: Bearer sk_YOUR_KEY" \

-H "Content-Type: application/json" \

-d '{ "strategy": { "symbols": ["AAPL","MSFT","JNJ","PG"],

"reviews": "monthly", "sell_rule": "loss_over_10_pct" },

"start": "2021-01-02", "end": "2025-12-31" }'

{

"status": "complete", // 4.1s

"starting_value": 10000,

"ending_value": 13850,

"worst_stretch": -1940, // dollars, peak to trough

"trades": 214, // each carries its reason

"fees_included": true,

"fills": "next_day_open", // no hindsight allowed

...

}

claude· connected to stax

> find me solid large companies and put a tested plan on paper

screen_stocks{ "roe": ">15", "pe": "<20", "mcap": ">10B" }

87 companies match. Top by size: AAPL, MSFT, JNJ, PG, COST…

backtest{ "symbols": ["AAPL","MSFT","JNJ","PG"], "years": 5 }

Done in 4.2s. 214 trades, fees included, every buy and sell listed.

deploy_strategy{ "name": "Steady large caps", "capital": 10000 }

Deployed to a paper slot. It now trades simulated cash you can watch.

done Your agent screened, tested, and deployed. No real cash is involved until you say so.

Door two: MCP

Give your agent real tools instead of opinions.

The Stax MCP server exposes ten tools to Claude or any MCP client: screening, backtesting, tuning, saving, and paper deployment. Your agent proposes an idea, the engine makes it survive years of real prices, and the winner lands in a practice slot you can watch.

Connection is one command with your key in a header. No custom integration work.

See the MCP server
Door three: the terminal

The stax command, for people who live in a shell.

The bundled CLI wraps the same API: stax screen narrows the market with readable flags, stax backtest replays a strategy file over the years you choose, and stax deploy puts the result in a paper slot. Run stax on its own and it walks you through building a strategy interactively.

Keys, deployments, and community strategies are all reachable without leaving the terminal.

staxterminal session

$ stax screen --roe ">15" --pe "<20"

87 companies pass. Top by size: MSFT, V, JNJ, PG, COST

$ stax backtest strategy.json --start 2022-01-01 --end 2024-12-31

Done in 3.9s. $10,000 grew to $12,410. Worst stretch -$1,610. 142 trades, fees counted.

$ stax deploy strategy.json --name "Steady large caps" --capital 10000

Deployed to a PAPER slot. It trades simulated cash from tomorrow. Watch it: stax deployments

One engine, wherever you call it from

1
engine behind the app, the API, the MCP server, and the CLI
10
MCP tools your agent can compose in a single conversation
Next-day
fills in every simulation, so no test can peek at the future

API and MCP deployments go to paper slots only. Real brokerage connections stay a human decision inside the app.

Questions people ask

Do the API and the app ever disagree?

No. The API is not a separate implementation; it is a thin door into the same engine the app calls. A backtest run over REST and the same backtest run in the app produce the same trades, the same fees, and the same result.

How do I get a key?

Sign up free, open the account area, and mint one. Keys look like sk_ followed by an id and a secret, and you can list or revoke them any time, from the app or from the API itself.

What are the rate limits?

They follow your account tier. You never have to guess: GET /account returns your tier, your slots in use, and where your limits stand, and the API answers with a clear 429 plus a reset time if you run past them.

Can my script or agent touch real money?

No. Programmatic deployment is paper only, trading simulated cash on real prices. Connecting a live brokerage account is a separate, deliberate step inside the app on the highest tier, and no API call can do it for you.

Where do I start if I just want to poke at it?

Mint a key, then send one POST to the screen endpoint with a filter or two. You will have a shortlist of real companies back in a couple of seconds, and the backtest endpoint accepts the same shapes the docs show.

Point your code at a real engine.

A free account comes with a key. The first screen call takes about a minute to write.