CCCryptoContext Docs
Tool reference

Research and backtesting

Backtests, session statistics, relative strength, scans and snapshots.

backtest_strategy

Backtest a long or short condition strategy over closed bars with USDT position sizing, round-trip cost_bps (fees + slippage) and optional historical funding. Supported conditions: rsi_above, rsi_below, price_above_ema, price_below_ema, macd_cross_above_zero, macd_cross_below_zero. Signals evaluate at bar close; fills at that close; assumptions are echoed. Requires the analytics capability (Pro and above).

Capability: analytics · read-only · REST: POST /v1/tools/backtest_strategy

ParameterTypeRequiredDefaultDescription
symbolstringyes—Canonical ccxt symbol: BTC/USDT:USDT (perp) or BTC/USDT (spot). Aliases like BTCUSDT are accepted and the canonical symbol is echoed.
timeframeM1 | M5 | M15 | M30 | H1 | H4 | D1 | W1yes—
barsintegerno1000
strategyobjectyes—
sidelong | short | buy | sellno"long"
initial_balance_usdtnumberno10000
position_size_usdtnumberno—
position_pctnumberno—
cost_bpsnumberno10
fundingbooleannofalse

Example request:

{
  "symbol": "BTC/USDT:USDT",
  "timeframe": "M1",
  "strategy": {}
}

simulate_rule_template

Replay a hypothetical long/short on historical bars with and without a protection template (breakeven, trailing, or R-ratchet) — the SAME math the live worker and simulated matcher run. Per bar the adverse extreme is checked before the favourable one (conservative); stops tighten only. Reports R outcome with and without the template. Requires the analytics capability (Pro and above).

Capability: analytics · read-only · REST: POST /v1/tools/simulate_rule_template

ParameterTypeRequiredDefaultDescription
symbolstringyes—Canonical ccxt symbol: BTC/USDT:USDT (perp) or BTC/USDT (spot). Aliases like BTCUSDT are accepted and the canonical symbol is echoed.
timeframeM1 | M5 | M15 | M30 | H1 | H4 | D1 | W1no"H1"
sidelong | short | buy | sellyes—
entry_pricenumberno—
stop_lossnumberyes—
take_profitnumberno—
bars_after_entryintegerno100
entry_bars_agointegerno100
templateanyyes—

Example request:

{
  "symbol": "BTC/USDT:USDT",
  "side": "long",
  "stop_loss": 0,
  "template": "<template>"
}

get_session_stats

Historical per-session behaviour from H1 bars over fixed UTC windows (asia 00-08, london 07-16, new_york 13-22, weekend Sat-Sun). Ranges and drift in bps of price; bias, breakout continuation and reversal percentages; sample_days with insufficient_samples below 20. Requires the analytics capability (Pro and above).

Capability: analytics · read-only · REST: POST /v1/tools/get_session_stats

ParameterTypeRequiredDefaultDescription
symbolstringyes—Canonical ccxt symbol: BTC/USDT:USDT (perp) or BTC/USDT (spot). Aliases like BTCUSDT are accepted and the canonical symbol is echoed.
sessionasia | london | new_york | weekendyes—
daysintegerno60

Example request:

{
  "symbol": "BTC/USDT:USDT",
  "session": "asia"
}

get_symbol_session_profile

Per (symbol, session) profile from M15 bars: typical range (median/p80), drift, typical minute of the extreme, and sensitivity to high-impact USD events. Includes the weekend pseudo-session (crypto trades 24/7 but weekend liquidity differs). Buckets under 10 samples report insufficient_samples. Units: bps of price. Requires the analytics capability (Pro and above).

Capability: analytics · read-only · REST: POST /v1/tools/get_symbol_session_profile

ParameterTypeRequiredDefaultDescription
symbolstringyes—Canonical ccxt symbol: BTC/USDT:USDT (perp) or BTC/USDT (spot). Aliases like BTCUSDT are accepted and the canonical symbol is echoed.
sessionasia | london | new_york | weekendyes—
daysintegerno30

Example request:

{
  "symbol": "BTC/USDT:USDT",
  "session": "asia"
}

get_relative_strength

Rank a universe (default: the connection's trade universe via get_trade_universe; scope:"exchange_top" ranks the top USDT markets of the connection's market type by 24h volume instead) by % change over the last N bars, both raw and volatility-normalised (change / ATR%), strongest first. vs:"BTC" ranks the change relative to BTC. low_confidence when fewer than 30 bars. Requires the analytics capability (Pro and above).

Capability: analytics · read-only · REST: POST /v1/tools/get_relative_strength

ParameterTypeRequiredDefaultDescription
universestring[]no—
symbolsstring[]no—
scopeuniverse | exchange_topno"universe"
top_nintegerno20
timeframeM1 | M5 | M15 | M30 | H1 | H4 | D1 | W1no"H4"
barsintegerno24
vsUSDT | BTCno"USDT"

Example request:

{}

get_market_snapshot

One-call overview: tick plus up to 6 indicators across up to 4 timeframes (current closed-bar values). Defaults: RSI14, EMA20, ATR14 over M15/H1/H4/D1. Raw values. Available on every tier.

Capability: read · read-only · REST: POST /v1/tools/get_market_snapshot

ParameterTypeRequiredDefaultDescription
symbolstringyes—Canonical ccxt symbol: BTC/USDT:USDT (perp) or BTC/USDT (spot). Aliases like BTCUSDT are accepted and the canonical symbol is echoed.
indicatorsobject[]no[{"indicator":"RSI"},{"indicator":"EMA"},{"indicator":"ATR"}]
timeframesstring[]no["M15","H1","H4","D1"]

Example request:

{
  "symbol": "BTC/USDT:USDT"
}

scan_symbols

Scan a universe (given symbols; otherwise the connection's trade universe, or with scope:"exchange_top" the top-N USDT markets by 24h volume) with filters: spread_bps_max, rsi_above/rsi_below, atr_pct_above/atr_pct_below (on the chosen timeframe), min_quote_volume_24h, funding_abs_above (perps). Returns matches with the metrics used, order:"quote_volume_desc"; symbols whose data is unavailable are listed in missing_inputs, never silently passed. Available on every tier.

Capability: read · read-only · REST: POST /v1/tools/scan_symbols

ParameterTypeRequiredDefaultDescription
symbolsstring[]no—
scopeuniverse | exchange_topno"universe"
market_typespot | swapno—
top_nintegerno30
timeframeM1 | M5 | M15 | M30 | H1 | H4 | D1 | W1no"H1"
spread_bps_maxnumberno—
rsi_abovenumberno—
rsi_belownumberno—
atr_pct_abovenumberno—
atr_pct_belownumberno—
min_quote_volume_24hnumberno—
funding_abs_abovenumberno—

Example request:

{}

get_spread_alert

Compare each symbol's current spread (bps) with its own rolling median of recorded tickers; alert when current >= threshold_multiple × median. Needs at least 20 recorded samples, otherwise insufficient_history (no estimate is invented). Requires the analytics capability (Pro and above).

Capability: analytics · read-only · REST: POST /v1/tools/get_spread_alert

ParameterTypeRequiredDefaultDescription
symbolsstring[]yes—
threshold_multiplenumberno3

Example request:

{
  "symbols": []
}

get_state_delta

What changed since the last call with the same cursor_id (per account + connection + symbol): price move since baseline, new closed bars, position/order count changes. The first call establishes the baseline and returns baseline_created:true. Available on every tier.

Capability: read · read-only · REST: POST /v1/tools/get_state_delta

ParameterTypeRequiredDefaultDescription
symbolstringyes—Canonical ccxt symbol: BTC/USDT:USDT (perp) or BTC/USDT (spot). Aliases like BTCUSDT are accepted and the canonical symbol is echoed.
cursor_idstringno"default"
timeframeM1 | M5 | M15 | M30 | H1 | H4 | D1 | W1no"M15"

Example request:

{
  "symbol": "BTC/USDT:USDT"
}

On this page