CCCryptoContext Docs
Tool reference

Portfolio risk

Exposure, risk summary and holding risk across the open book.

check_portfolio_exposure

Exposure by base asset and by BTC-beta-weighted notional (Σ notional × beta), clusters on residual (BTC-neutral) correlation, and open risk from stops (positions without a stop are listed as unbounded_risk). Optionally evaluates a proposed addition. Caps are parameters: max_asset_notional_pct (default 50), max_beta_notional_pct (150), max_open_risk_pct (5), all of equity; breaches are listed, never auto-enforced here. Requires the analytics capability (Pro and above).

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

ParameterTypeRequiredDefaultDescription
proposedobjectno—
max_asset_notional_pctnumberno50
max_beta_notional_pctnumberno150
max_open_risk_pctnumberno5
cluster_thresholdnumberno0.6

Example request:

{}

get_risk_summary

Account risk at a glance: per-asset net notional, leverage-weighted exposure, margin ratio, positions without a stop, and positions protected only by the server-side worker (not natively on the exchange). Requires the analytics capability (Pro and above).

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

No parameters.

Example request:

{}

get_holding_risk

Risks of holding a position for hold_hours: high/medium-impact USD events in the window, the projected funding cost (sum of upcoming funding payments at the current rate, longs pay positive rates) versus an optional risk budget, and a weekend flag (thin liquidity). Replaces FX swap logic. Requires the analytics capability (Pro and above).

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

ParameterTypeRequiredDefaultDescription
symbolstringyes—Canonical ccxt symbol: BTC/USDT:USDT (perp) or BTC/USDT (spot). Aliases like BTCUSDT are accepted and the canonical symbol is echoed.
hold_hoursintegerno24
sidelong | short | buy | sellno"long"
size_usdtnumberno—
risk_budget_usdtnumberno—

Example request:

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

On this page