CCCryptoContext Docs
Tool reference

Technical analysis and sizing

Indicators, levels, patterns, structure, regimes, correlation and position sizing.

get_indicator

Compute one of 16 indicators (RSI, MACD, ATR, SMA, EMA, BOLLINGER, ADX, STOCHASTIC, CCI, PARABOLIC_SAR, ICHIMOKU, WPR, MFI, STDDEV, DEMARKER, MOMENTUM) server-side from closed bars. order:"newest_first": values[0] is the latest CLOSED bar and equals current. Raw numbers only (no signals). Available on every tier.

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

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—
indicatoranyyes—
paramsobjectno—Indicator parameters, e.g. {"period":14}. Defaults are listed by the indicator.
applied_priceCLOSE | OPEN | HIGH | LOW | MEDIAN | TYPICALno"CLOSE"
countintegerno3

Example request:

{
  "symbol": "BTC/USDT:USDT",
  "timeframe": "M1",
  "indicator": "<indicator>"
}

check_confluence

Evaluate up to 10 indicator/price conditions on the latest closed bar (cross_above/cross_below use the previous bar). Returns per-condition booleans (met:null when an input is unavailable — never guessed) and counts; no buy/sell verdict. Requires the analytics capability (Pro and above).

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

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—
conditionsobject[]yes—
matchall | anyno"all"

Example request:

{
  "symbol": "BTC/USDT:USDT",
  "timeframe": "M1",
  "conditions": []
}

get_key_levels

Support/resistance candidates: classic pivots from the previous completed bar of pivot_timeframe, recent fractal swing highs/lows, the lookback high/low, and psychological round numbers scaled to the price magnitude (step echoed in criteria). Raw levels, nearest first within ±10% of price. Available on every tier.

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

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"H4"
pivot_timeframeM1 | M5 | M15 | M30 | H1 | H4 | D1 | W1no"D1"
lookbackintegerno200

Example request:

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

get_fibonacci_levels

Fibonacci retracement/extension levels between the most recent swing high and swing low in the lookback (or an explicit high/low). direction "up" means the move went low→high (levels retrace down from the high) and uses a swing low that came before its swing high; "down" the reverse. Without a direction the most recent swing ends the leg; when no swing pair fits, insufficient_history is returned. Available on every tier.

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

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"H4"
lookbackintegerno200
highnumberno—
lownumberno—
directionup | downno—

Example request:

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

detect_patterns

Candlestick patterns (doji, hammer, bullish/bearish engulfing) over the last N closed bars, order:"chronological", each with bar_time. Raw detections; no direction advice. Available on every tier.

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

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—
barsintegerno50

Example request:

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

detect_structure

Smart-money structures over closed bars: fair-value gaps, order blocks, liquidity sweeps, BOS and CHoCH with fixed criteria echoed in the response. order:"chronological". Requires the analytics capability (Pro and above).

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

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—
barsintegerno200
typesstring[]no—

Example request:

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

get_market_structure

Multi-timeframe HH/HL/LH/LL swing sequence, trend (uptrend/downtrend/range) and BOS/CHoCH events per timeframe, plus whether the trends are aligned. Close-based confirmation; criteria echoed. Requires the analytics capability (Pro and above).

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

ParameterTypeRequiredDefaultDescription
symbolstringyes—Canonical ccxt symbol: BTC/USDT:USDT (perp) or BTC/USDT (spot). Aliases like BTCUSDT are accepted and the canonical symbol is echoed.
timeframesstring[]no["H1","H4","D1"]
barsintegerno200

Example request:

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

get_volatility_regime

Classify volatility as compressed/expanding/trending/choppy from ATR ratio, Bollinger-bandwidth percentile and Kaufman efficiency ratio (fixed thresholds echoed). Also returns er and, with include_adx, adx_h4/adx_d1 so label-vs-ER overrides need no extra calls. Available on every tier.

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

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"H4"
lookbackintegerno100
include_adxbooleannofalse

Example request:

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

get_correlation_matrix

Pairwise correlation (symbols default to the connection's trade universe, up to 20; scope:"exchange_top" uses the top USDT markets of the connection's market type by volume) of log returns (method "returns") or closes aligned by bar time, with single-linkage clusters above cluster_threshold. residual_vs:"BTC" first removes each asset's BTC beta (crypto is one-factor dominated: raw alt correlations are all high) and reports beta_to_btc. NaN cells (insufficient overlap) are returned as null. Requires the analytics capability (Pro and above).

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

ParameterTypeRequiredDefaultDescription
symbolsstring[]no—
scopeuniverse | exchange_topno"universe"
timeframeM1 | M5 | M15 | M30 | H1 | H4 | D1 | W1no"H4"
barsintegerno200
methodreturns | closeno"returns"
residual_vsBTCno—
cluster_thresholdnumberno0.7

Example request:

{}

calculate_position_size

Size a position from a stop distance and a risk budget (risk_usdt, or risk_percent of account equity). Uses the single sizing function shared with CHECK_ORDER. Returns size_usdt (what to pass to place_order), amount_base, contracts, actual risk, min-notional check, rounding loss, required margin and estimated liquidation vs the stop, and max_leverage_for_stop (the highest leverage that keeps liquidation ≥ 1.5× the stop distance beyond the stop, ≈ 1 / (1.5 × stop_distance_pct + mmr)). Available on every tier.

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

ParameterTypeRequiredDefaultDescription
symbolstringyes—Canonical ccxt symbol: BTC/USDT:USDT (perp) or BTC/USDT (spot). Aliases like BTCUSDT are accepted and the canonical symbol is echoed.
entry_pricenumberno—
stop_pricenumberyes—
risk_usdtnumberno—
risk_percentnumberno—
leveragenumberno—

Example request:

{
  "symbol": "BTC/USDT:USDT",
  "stop_price": 0
}

estimate_fill

Estimate a market order's fill by walking the live order book for size_usdt: average price, slippage vs mid in bps, levels consumed, taker fee and total cost. Basis is "book_walk" (no queue position, no latency). Requires the analytics capability (Pro and above).

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

ParameterTypeRequiredDefaultDescription
symbolstringyes—Canonical ccxt symbol: BTC/USDT:USDT (perp) or BTC/USDT (spot). Aliases like BTCUSDT are accepted and the canonical symbol is echoed.
sidebuy | sell | long | shortyes—
size_usdtnumberyes—

Example request:

{
  "symbol": "BTC/USDT:USDT",
  "side": "buy",
  "size_usdt": 0
}

On this page