CCCryptoContext Docs
Tool reference

Journal, coaching and shadow trades

The structured journal, the equity curve, execution quality, explanations and hypothetical trades.

write_trade_note

Write a journal note (thesis, executed, outcome, note, reflection, review) linked to a position_uid and/or order_id; scoped to the session's connection automatically. Available on every tier.

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

ParameterTypeRequiredDefaultDescription
notestringyes—
kindstringno"note"
run_idstringno—
rolestringno—
payloadobjectno—
position_uidstringno—
order_idstringno—
symbolstringno—
setupstringno—
tagsstring[]no—

Example request:

{
  "note": "<note>"
}

query_journal

Query journal entries by position_uid, order_id, tag, setup, kind, role, run_id, dates or text; connection-scoped (no cross-connection mode). order:"newest_first"; pass next_cursor back as cursor for the next page. Available on every tier.

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

ParameterTypeRequiredDefaultDescription
position_uidstringno—
order_idstringno—
symbolstringno—
tagstringno—
setupstringno—
kindstringno—
run_idstringno—
rolestringno—
searchstringno—
fromstringno—
tostringno—
cursorstringno—
limitintegerno50

Example request:

{}

score_journal_entry

Score a journal entry's completeness/consistency against its linked trade (fixed rubric echoed in the response). Available on every tier.

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

ParameterTypeRequiredDefaultDescription
entry_idstringyes—

Example request:

{
  "entry_id": "<entry_id>"
}

get_equity_curve

Realized equity curve from closed positions (net of fees and funding), order:"chronological": cumulative realized PnL and drawdown per closed position, plus total funding. Not mark-to-market. Available on every tier.

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

ParameterTypeRequiredDefaultDescription
fromstringno—
tostringno—
limitintegerno500

Example request:

{}

get_execution_quality

Slippage of fills versus the reference price captured at submission (bps, positive = worse than requested), by liquidity (maker/taker) with mean/median/p80/p95, plus the fill basis mix. Simulated connections report fill_basis (book_walk, trade_through, ...) so optimistic simulation is visible. Requires the analytics capability (Pro and above).

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

ParameterTypeRequiredDefaultDescription
fromstringno—
tostringno—
symbolstringno—Canonical ccxt symbol: BTC/USDT:USDT (perp) or BTC/USDT (spot). Aliases like BTCUSDT are accepted and the canonical symbol is echoed.
limitintegerno500

Example request:

{}

get_behavioral_insights

Behaviour patterns from closed positions with fixed, echoed thresholds: revenge entries (re-entry within 30 min of a loss at >1.5× the size), over-trading days (>10 positions), cutting winners short (avg winner hold < 0.5× avg loser hold), concentration and UTC hour-of-day PnL. Raw counts and flags; fewer than 10 positions → insufficient_history. Requires the analytics capability (Pro and above).

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

ParameterTypeRequiredDefaultDescription
fromstringno—
tostringno—
limitintegerno500

Example request:

{}

explain_trade

Reconstruct one closed position by position_uid: entry/exit, R multiple, MAE/MFE in R, fees, funding, exit reason, its fills and every journal note linked to it. Facts only. Requires the analytics capability (Pro and above).

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

ParameterTypeRequiredDefaultDescription
position_uidstringyes—

Example request:

{
  "position_uid": "<position_uid>"
}

explain_setup

Track record of a named setup (the setup tag used in journal notes): matching closed positions, win rate, average R (populated because the original stop is persisted), expectancy in R and total net PnL. Available on every tier.

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

ParameterTypeRequiredDefaultDescription
setupstringyes—
limitintegerno200

Example request:

{
  "setup": "<setup>"
}

track_hypothetical

Record a candidate the crew did not take (vetoed, passed, shadow) so the server simulates it forward on closed 1m bars with no hindsight: run_id, symbol, side buy|sell, entry_type market|limit|stop, entry, sl, tp, verdict (e.g. VETO, PASS, SHADOW), expiry (default 7 d, max 30 d), notes. Validated against the current quote; a duplicate unresolved record for the same run/symbol/side/type is DUPLICATE. Nothing is sent to the exchange. Available on every tier.

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

ParameterTypeRequiredDefaultDescription
run_idstringyes—
symbolstringyes—
sidebuy | sell | long | shortyes—
entry_typemarket | limit | stopyes—
entrynumberyes—
slnumberyes—
tpnumberyes—
verdictstringyes—
expirystringno—
notesstringno—

Example request:

{
  "run_id": "<run_id>",
  "symbol": "BTC/USDT:USDT",
  "side": "buy",
  "entry_type": "market",
  "entry": 0,
  "sl": 0,
  "tp": 0,
  "verdict": "<verdict>"
}

list_hypotheticals

Shadow results newest first (status pending|open|closed, fill, outcome tp|sl|expired, realized_r, mae_r, mfe_r, current_r, ambiguous_bar) filtered by from/to, verdict, run_id, symbol, status, plus aggregates over all matches (fill_rate, win_rate, mean/median/total R, mean MAE/MFE) and per group with group_by verdict|symbol|run_id|side|entry_type. Available on every tier.

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

ParameterTypeRequiredDefaultDescription
fromstringno—
tostringno—
verdictstringno—
run_idstringno—
symbolstringno—
statuspending | open | closedno—
group_byverdict | symbol | run_id | side | entry_typeno—
limitintegerno50

Example request:

{}

On this page