Two Regime Systems, One Question Each
CryptoDataAPI ships two regime systems, and they are not redundant. The quant HMM is a probabilistic, short-horizon engine that scores six market states every hour. The 14-basket framework is a rule-based taxonomy of structural conditions — volatility, liquidity, on-chain flows, macro, security and more.
They answer different questions on different clocks. The HMM asks "what is the tradeable state right now, and how confident are we?" The 14-basket framework asks "what structural conditions is the market operating under?" The strongest agents use both.
HMM Quant Probabilities vs the 14-Basket Framework
| Dimension | Quant HMM (/quant) | 14-Basket Framework (/regimes) |
|---|---|---|
| Method | Hidden Markov Model, trained on 6y hourly data | Rule-based, transparent thresholds |
| Output | Probability + calibrated confidence | Classified state + score per basket |
| Horizon | Short: 4h / 24h | Structural: hours to weeks |
| States | 6 market regimes | 14 thematic baskets |
| Update | Hourly, hysteresis-smoothed | Per data source (intraday to daily) |
| Extras | Transitions, heads, Monte Carlo | Domain signals (hacks, unlocks, ETF flows…) |
| Best for | Timing, sizing, execution | Context, risk posture, what to watch |
Neither replaces the other. One is a fast probabilistic clock; the other is a wide structural map.
When to Use the Quant HMM
Reach for /quant when the decision is about timing and sizing:
- Gating entries on regime
confidenceand direction. - Sizing positions to the Monte Carlo p5–p95 range.
- De-risking on a rising transition probability to
vol_spike. - Selecting a strategy (mean-revert vs trend) from the current state.
It is deliberately short-horizon and probabilistic — built to be polled every hour by an execution agent.
When to Use the 14-Basket Framework
Reach for the 14-basket framework when the decision is about context and posture:
- Is the market in a security / black-swan regime (a hack or depeg unfolding)?
- Is liquidity thinning toward a fragility regime?
- What's the macro & cycle backdrop, or the on-chain / ETF flow regime?
- Are we in a meme-coin speculative phase or a derivatives-carry regime?
These are the slow-moving conditions that decide whether you should be trading at all, and which playbook applies.
Combining Both: The Layered Stack
The two compose cleanly — structural posture from the baskets, timing from the HMM:
import httpx
h = {"X-API-Key": "cdk_live_your_key"}
B = "https://cryptodataapi.com/api/v1"
# 1) posture: is the structural backdrop safe to trade?
sec = httpx.get(f"{B}/security/regime", headers=h).json()
# 2) timing: what's the short-horizon state + conviction?
q = httpx.get(f"{B}/quant/market?horizon=24h", headers=h).json()
trade = (sec["regime"]["score"] < 50 # no black-swan stress
and q["regime"]["confidence"] > 0.65) # confident state
Black-swan regime gates the whole book off; the HMM gates individual entries. Structural map plus probabilistic clock.
How AI Agents Should Wire Both
- Top of the funnel: the 14-basket regimes set risk posture and veto trading in dangerous structural states.
- Bottom of the funnel: the quant HMM times and sizes individual trades within the allowed posture.
- Shared contract: both expose machine-readable taxonomies (
/quant/regimesand/regimes) so an agent can self-describe before acting.
Use the label for display, the probabilities for decisions, and the basket regimes for the guardrails around both.



