Risk governance API for autonomous crypto trading agents
Website · API Reference · SKILL.md · X/Twitter
A deterministic policy engine that tells AI trading agents how much risk is allowed — not what to trade.
One API call returns position limits, allowed actions, and policy constraints computed from 30+ real-time signals across macro, on-chain, derivatives, and DeFi health.
curl -X POST https://riskstate.netlify.app/v1/risk-state \
-H "Authorization: Bearer $RISKSTATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"asset": "BTC"}'{
"exposure_policy": {
"max_size_fraction": 0.42,
"leverage_allowed": true,
"allowed_actions": ["DCA", "LONG_SHORT_CONFIRMED"],
"blocked_actions": ["ALL_IN", "LEVERAGE_GT_2X"]
},
"policy_level": 4,
"risk_flags": {
"structural_blockers": [],
"context_risks": ["HIGH_COUPLING"]
},
"binding_constraint": {
"source": "MACRO",
"reason_codes": ["MACRO_NEUTRAL", "COUPLING_NORMAL"]
}
}Your agent reads max_size_fraction, checks structural_blockers, and acts. No parsing. No interpretation.
Autonomous trading agents can execute trades. None of them know when to stop.
| Without governance | With RiskState |
|---|---|
| Agent sizes position based on signal confidence | Agent caps position at max_size_fraction |
| No awareness of macro regime | RISK-OFF → blocked_actions: ["AGGRESSIVE_LONG"] |
| DeFi health factor ignored | Wallet health feeds directly into position limit |
| Leverage unbounded | max_leverage: "1x" enforced per policy level |
| No circuit breaker | structural_blockers non-empty → halt |
Sign up at riskstate.ai — email only, free during beta.
curl -X POST https://riskstate.netlify.app/v1/risk-state \
-H "Authorization: Bearer $RISKSTATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"asset": "BTC"}'import requests
policy = requests.post(
"https://riskstate.netlify.app/v1/risk-state",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"asset": "BTC"}
).json()
# Hard stop: structural blockers
if policy["risk_flags"]["structural_blockers"]:
return # Do not trade
# Size cap
max_size = policy["exposure_policy"]["max_size_fraction"]
position_size = min(desired_size, portfolio_value * max_size)
# Action filter
if "LEVERAGE" in policy["exposure_policy"]["blocked_actions"]:
leverage = 1.0| Level | Label | Max Size | What your agent can do |
|---|---|---|---|
| 1 | BLOCK Survival | <15% | Reduce exposure, hedge only |
| 2 | BLOCK Defensive | <35% | Wait, hedge, small scalps |
| 3 | CAUTIOUS | <60% | DCA, R:R >2:1 only |
| 4 | GREEN Selective | <80% | Trade with confirmation |
| 5 | GREEN Expansion | ≥80% | Full operations, leverage up to 2x |
- BTC — Full signal coverage (30+ indicators)
- ETH — Full coverage including ETH structural score, ETH/BTC ratio analysis, staking dynamics
Direct HTTP calls. Any language, any framework.
Drop SKILL.md into your agent's repo. Compatible with Claude Code, Copilot, Cursor, and Gemini via skills.sh.
npm install @riskstate/mcp-serverOr run directly with npx @riskstate/mcp-server. Docker: ghcr.io/likidodefi/riskstate-mcp.
One tool: get_risk_policy — same parameters as the REST API. Compatible with Claude Desktop, Claude Code, Cursor, and any MCP-compatible client. See MCP README for full setup.
- awesome-mcp-servers — Finance & Fintech category
- LobeHub MCP — Auto-discovered
- ClawHub.ai — Skill marketplace
- skills.sh — Vercel skills registry
- Glama.ai — AAA score
When consuming the response, agents must evaluate fields in this order:
risk_flags.structural_blockers— if non-empty, abort new entriesexposure_policy.blocked_actions— actions the agent must not takeexposure_policy.reduce_recommended— reduce exposure iftrueexposure_policy.max_size_fraction— maximum position size (0.0–1.0)exposure_policy.max_leverage— maximum leverage allowed
RiskState ingests 30+ real-time signals from:
- Price & Derivatives — Binance, OKX, Bybit (funding, OI, basis, L/S ratio)
- On-chain — MVRV, NUPL, exchange netflow, supply metrics (CoinGlass)
- Macro — DXY, US yields, S&P 500, Gold, Fed balance sheet (FRED, Yahoo Finance)
- DeFi — Spark Protocol, Aave V3 health factor and liquidation thresholds
- Sentiment — Fear & Greed, ETF flows, institutional treasuries
- ETH-specific — Staking ratio, burn rate, DEX volume, fees, stablecoin TVL
Free during beta. Rate limit: 60 requests/minute.
| Tier | Calls/month | Price |
|---|---|---|
| Free | 100 | $0 |
| Builder | 5,000 | $49/mo |
| Growth | 25,000 | $149/mo |
| Scale | 100,000 | $399/mo |
Paid tiers coming after beta. Sign up now to lock in early access.
- API Reference — Full endpoint documentation, field types, error codes
- SKILL.md — Agent discovery file with decision rules and failure modes
- Changelog — Version history and release notes
- Website — Landing page with interactive examples
- Website: riskstate.ai
- X/Twitter: @riskstate_ai
- API:
POST https://riskstate.netlify.app/v1/risk-state
Built by likidodefi · © 2026 Digital Venture Asset LLC