We're building the most comprehensive crypto data API we can, and it's still growing — there's always a coin, a field or an endpoint we haven't got to yet.
Please tell us about any data you think Crypto Data API should nail but doesn't. We're data nerds who love to geek out about market data, trading bots, AI agents, or how to make your trading stack work in general. Prefer a form? Send feedback.
3 regime switching strategies for crypto, from the AlgoBrain wiki. Detect the market's current state and switch strategy, leverage or exposure to match it. Each one lists the indicators it uses, the Crypto Data API endpoints that feed it and copy-paste prompts for an AI agent to build and backtest it. All of them are in the API: GET /api/v1/strategies?group=regime-switching.
A macro-driven position basket of Hyperliquid perp positions that tracks the global monetary liquidity cycle — central bank balance sheets, dollar liquidity conditions, and the broad DXY trend — and tilts long risk-crypto during expansion phases, reduces or flips short during contraction.
Why it works: Central banks and institutional allocators shift liquidity conditions over months; crypto acts as a high-beta lever on global risk appetite, so leading indicators of liquidity expansion or contraction provide a directional bias weeks before price fully adjusts.
Via API/api/v1/strategies/global-liquidity-expansion-contraction
AI-agent prompts
Build it with an AI agent
Build the Global Liquidity Expansion / Contraction (Hyperliquid Basket) crypto trading strategy using the CryptoDataAPI (X-API-Key header, base https://cryptodataapi.com).
1. Read the playbook first: GET https://cryptodataapi.com/api/v1/algobrain/page?path=wiki/strategies/hyperliquid-baskets/global-liquidity-expansion-contraction.md
2. Pull the inputs:
- GET https://cryptodataapi.com/api/v1/market-health/altcoin-breadth
- GET https://cryptodataapi.com/api/v1/coins/top
- GET https://cryptodataapi.com/api/v1/event/calendar
- GET https://cryptodataapi.com/api/v1/regimes/current
- GET https://cryptodataapi.com/api/v1/quant/market
- GET https://cryptodataapi.com/api/v1/sentiment/macro
3. Compute Funding Rate, Open Interest on 1d bars (pinned: interval=1d, lookback=500 bars, universe=BTC,ETH,SOL unless the playbook says otherwise).
4. Emit entry/exit rules, position size (risk 1% of equity per trade) and a stop, as JSON: {"symbol","side","entry","stop","target","size_pct","reason"}.
5. State which regime the rules are valid in (GET /api/v1/regimes/current) and stand aside outside it. Research only — do not place orders.
Backtest it
Backtest the Global Liquidity Expansion / Contraction (Hyperliquid Basket) strategy on CryptoDataAPI history before trusting it.
- Bars: GET https://cryptodataapi.com/api/v1/backtesting/klines?symbol=BTC&interval=1d (Pro)
- Funding: GET https://cryptodataapi.com/api/v1/backtesting/funding?symbol=BTC (Pro)
- Rules: from the playbook at /api/v1/algobrain/page?path=wiki/strategies/hyperliquid-baskets/global-liquidity-expansion-contraction.md
Pinned: fees 4.5 bps taker per side, 2 bps slippage, funding applied every 8h, signals on bar close only (no lookahead), 70/30 in-sample/out-of-sample split. Report CAGR, Sharpe, max drawdown, trade count and out-of-sample vs in-sample decay.
Regime detection uses statistical models — primarily Hidden Markov Models (HMMs) and clustering — to infer the current market state and switch strategies accordingly.
Why it works: Crypto returns are a mixture of persistent states (trend, chop, vol-shock); the overlay infers the current state and switches sub-strategies so you stop running mean-reversion into a trend or trend-following into chop — harvesting regime persistence and avoiding the strategy-regime mismatch that bleeds undisciplined books.
Build the Regime Detection crypto trading strategy using the CryptoDataAPI (X-API-Key header, base https://cryptodataapi.com).
1. Read the playbook first: GET https://cryptodataapi.com/api/v1/algobrain/page?path=wiki/strategies/quantitative/regime-detection.md
2. Pull the inputs:
- GET https://cryptodataapi.com/api/v1/derivatives/funding-rates
- GET https://cryptodataapi.com/api/v1/hyperliquid/funding-rates
- GET https://cryptodataapi.com/api/v1/derivatives/open-interest
- GET https://cryptodataapi.com/api/v1/hyperliquid/open-interest
- GET https://cryptodataapi.com/api/v1/market-intelligence/liquidations
- GET https://cryptodataapi.com/api/v1/volatility/regime
3. Compute Momentum, Volatility, Funding Rate, Open Interest, Liquidation on 4h bars (pinned: interval=4h, lookback=500 bars, universe=BTC,ETH,SOL unless the playbook says otherwise).
4. Emit entry/exit rules, position size (risk 1% of equity per trade) and a stop, as JSON: {"symbol","side","entry","stop","target","size_pct","reason"}.
5. State which regime the rules are valid in (GET /api/v1/regimes/current) and stand aside outside it. Research only — do not place orders.
Backtest it
Backtest the Regime Detection strategy on CryptoDataAPI history before trusting it.
- Bars: GET https://cryptodataapi.com/api/v1/backtesting/klines?symbol=BTC&interval=4h (Pro)
- Funding: GET https://cryptodataapi.com/api/v1/backtesting/funding?symbol=BTC (Pro)
- Rules: from the playbook at /api/v1/algobrain/page?path=wiki/strategies/quantitative/regime-detection.md
Pinned: fees 4.5 bps taker per side, 2 bps slippage, funding applied every 8h, signals on bar close only (no lookahead), 70/30 in-sample/out-of-sample split. Report CAGR, Sharpe, max drawdown, trade count and out-of-sample vs in-sample decay.
Market regimes are persistent — a trending regime lasts weeks to months, not days; volatility clusters; ranging markets persist until a catalyst breaks them. This persistence means correctly identifying the current regime lets you deploy the right strategy for most of its remaining duration.
Why it works: Regime persistence means that correctly detecting a trending vs ranging vs crisis regime and deploying the right sub-strategy generates above-average returns across each regime window; the counterparty is the static-allocation participant who runs a trending strategy during choppy regimes and a premium-selling strategy into a crash.
Via API/api/v1/strategies/regime-adaptive-strategy
AI-agent prompts
Build it with an AI agent
Build the Regime-Adaptive Strategy crypto trading strategy using the CryptoDataAPI (X-API-Key header, base https://cryptodataapi.com).
1. Read the playbook first: GET https://cryptodataapi.com/api/v1/algobrain/page?path=wiki/strategies/combinations/regime-adaptive-strategy.md
2. Pull the inputs:
- GET https://cryptodataapi.com/api/v1/derivatives/funding-rates
- GET https://cryptodataapi.com/api/v1/hyperliquid/funding-rates
- GET https://cryptodataapi.com/api/v1/derivatives/open-interest
- GET https://cryptodataapi.com/api/v1/hyperliquid/open-interest
- GET https://cryptodataapi.com/api/v1/volatility/regime
- GET https://cryptodataapi.com/api/v1/volatility/index
3. Compute VIX (CBOE Volatility Index), Average Directional Index (ADX), Bollinger Bands, Moving Averages, Relative Strength Index (RSI) on 4h bars (pinned: interval=4h, lookback=500 bars, universe=BTC,ETH,SOL unless the playbook says otherwise).
4. Emit entry/exit rules, position size (risk 1% of equity per trade) and a stop, as JSON: {"symbol","side","entry","stop","target","size_pct","reason"}.
5. State which regime the rules are valid in (GET /api/v1/regimes/current) and stand aside outside it. Research only — do not place orders.
Backtest it
Backtest the Regime-Adaptive Strategy strategy on CryptoDataAPI history before trusting it.
- Bars: GET https://cryptodataapi.com/api/v1/backtesting/klines?symbol=BTC&interval=4h (Pro)
- Funding: GET https://cryptodataapi.com/api/v1/backtesting/funding?symbol=BTC (Pro)
- Rules: from the playbook at /api/v1/algobrain/page?path=wiki/strategies/combinations/regime-adaptive-strategy.md
Pinned: fees 4.5 bps taker per side, 2 bps slippage, funding applied every 8h, signals on bar close only (no lookahead), 70/30 in-sample/out-of-sample split. Report CAGR, Sharpe, max drawdown, trade count and out-of-sample vs in-sample decay.
Any key works, Free included — mint one in a single call. The list endpoint returns summaries; the per-slug endpoint adds the prompts, edge mechanism and data inputs. Full playbooks come from /api/v1/algobrain/page?path=… using each entry's wiki_path. Or use the MCP server.
What are regime switching crypto trading strategies?
Detect the market's current state and switch strategy, leverage or exposure to match it.
Which indicators do regime switching strategies use?
Most often Funding Rate, Open Interest, Momentum, Volatility.
Can an AI agent build these strategies from an API?
Yes. GET /api/v1/strategies?group=regime-switching lists them; GET /api/v1/strategies/{slug} returns the build and backtest prompts, and each prompt names the exact Crypto Data API endpoints to call. Any API key works, Free included.