Structure Engine
Are we near an inflection?
Maps the market's structure: breakout and breakdown triggers, the 180-day range, friction levels, and validated events with a public track record.
Three deterministic engines: market structure, trading playbooks, risk permissions.
One audit trail.
v1.4.0 live · Free during beta · Institutional pilot ready
Three engines
Each engine is independent, deterministic and usable on its own. Together they form one governed decision.
Are we near an inflection?
Maps the market's structure: breakout and breakdown triggers, the 180-day range, friction levels, and validated events with a public track record.
Is there a setup to trade?
A locked registry of setups evaluated live against market state. Every fire carries the navigator's vote and the gate's verdict.
How much is allowed?
Live market state in, a pre-trade gate out: policy level, max exposure, leverage cap, allowed and blocked actions, and a policy hash for the audit trail.
Use one, two or all three. The same audit discipline runs through every answer.
The decision record
One object runs through the stack: state in, verdict out, outcome back, hashed. That record is the track record.
Measurable outcomes
Deep-loss containment, measured: 16.6% vs 40.4% max drawdown and 3.4% vs 23.8% weekly deep-tail frequency vs unmanaged exposure on the live record — see Research
Max drawdown, governed vs ungoverned, on 39 live playbook fires. The gate gave up 2.0 pp of return to cut drawdown by 8.9 pp.
7-day hit rate of the Extreme Fear Reversal event on BTC against the base rate over the same window.
7-day mean return per episode of the Funding Reset event on ETH against the base rate.
Win rate on closed governed positions.
Out-of-sample mid-vs-top quintile contrast of the composite score, pre-specified before the cutoff.
Hash-linked decision ticks, each chained to the previous one and verifiable end to end.
Same inputs, same permissions, byte-identical. Full audit trail: policy_hash · scoring_version · reason_codes · distribution_hash
Integration
Four ways to plug the stack into agents, bots, desks and execution systems.
Three plain HTTP endpoints — one per engine. Any language, any framework. Playbooks are public; structure and the gate take a key.
import requests
BASE = "https://api.riskstate.ai"
H = {"Authorization": "Bearer $TOKEN"}
structure = requests.post(f"{BASE}/v1/market-structure",
headers=H, json={"asset": "BTC"}).json()
playbooks = requests.get(f"{BASE}/api/playbook-data").json() # public
gate = requests.post(f"{BASE}/v1/risk-state",
headers=H, json={"asset": "BTC"}).json()
max_size = gate["exposure_policy"]["max_size_fraction"]Add the stack to claude.ai or ChatGPT as a custom connector — no install, no key. Developers run the npm server for full responses.
# Remote — keyless, for claude.ai and ChatGPT connectors
https://api.riskstate.ai/mcp
# Local — full responses, API key
npx -p @riskstate/mcp-server riskstate-mcp
# tools: get_risk_state · get_market_structure
# get_playbook_status · check_tradeTyped clients for the Structure and Playbook engines, with the exact response types and offline fixtures. Python twins: riskstate-market-structure, riskstate-trading-playbook.
import { MarketStructureClient } from "@riskstate/market-structure-engine";
import { PlaybookClient } from "@riskstate/trading-playbook-engine";
const structure = new MarketStructureClient({ apiKey });
const playbooks = new PlaybookClient(); // no key needed
const s = await structure.get("BTC");
const p = await playbooks.get();
s.headline; // "RANGE INTACT"
playbooks.firingNow(p, "BTC"); // setups live right nowDiscovery standard for autonomous agent ecosystems. One file tells an agent what the engine does, how to authenticate, and how often to poll.
# SKILL.md
name: riskstate
version: 1.4.1
category: risk-management
auth: bearer-token
endpoint: POST https://api.riskstate.ai/v1/risk-state
assets: [BTC, ETH]
refresh: 60s cache, recommend 5min polling
repository: https://github.com/Riskstate/risk-engineWho it's for
Navigate the structure. Run the playbooks. Enforce the gate.
Structure and playbooks as tools: read the regime, the triggers and which setups are live before deciding.
A deterministic gate before every order: max size, leverage cap, allowed actions. Same inputs, same answer.
REST, MCP (keyless remote or npm) and SKILL.md. An ungoverned agent is hard to fund; a governed one is easier to trust with capital.
Portfolio-level gate (v2): aggregation, stress scenarios, ES95/ES99 loss distributions.
Per-key mandate enforcement: max gross, leverage caps, blocked protocols, per-asset caps. Tightens only.
A hashed audit log of every decision and its forward outcome: the process you show LPs.
The navigator shows where the triggers and walls are; the playbooks say when a setup is live and when it's in cooldown.
The gate replaces emotional sizing: tighter in PANIC / EUPHORIA, wider in confirmed TREND.
BTC/ETH spot, perps and DeFi borrowing in one policy view. Execute it non-custodially on Hyperhelm.
Trust
Three engines, one discipline: deterministic, published, forward-validated.
Same inputs, same outputs, across all three engines: a policy hash on every gate response, a state hash on every structure state, locked playbook definitions. Scoring is frozen in 6-month windows — no silent tuning.
External mathematical review of all scoring functions and normalization curves. Smooth sigmoids, logistic policy caps, Fisher z-transform confidence intervals. Every formula and every cap is published at conceptual level — calibration is not, but the shape is.
Read the methodology →Every claim is tested against real forward returns: permutation tests, circular block bootstrap for time-series dependency, base rates beside every hit rate — including what does not beat a simple baseline yet. Framework in Backtest; dated findings in Research.
See the backtest framework →Every engine has a free, keyless live view, and the remote MCP is keyless too. What you see is what the API returns.
Open the live engines →RiskState does not execute trades or custody assets. Structure and playbooks describe, the gate permits — execution stays in your stack, or on Hyperhelm, non-custodially.
Pre-vendor due-diligence brief: architecture, data classification, audit trail with 365-day retention (7-year export tier on request), mandate enforcement via per-key policy_config, security posture, and a SIG Lite mapping table. NDA pilot scope negotiated separately.
Read the institutional guide →FAQ
Free during beta. Delivered to your inbox instantly. One key unlocks REST, MCP and the SDKs.