CCCryptoContext Docs
Tool reference

Account and history

Equity, positions, orders, trade history and P&L.

get_account_info

Equity (single definition: wallet + unrealized PnL), free/used margin, margin ratio, spot balances valued in USDT, account mode. Responses on a simulated connection carry mode:"simulated". Available on every tier.

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

No parameters.

Example request:

{}

get_positions

Open positions with stable position_uid, entry, size_usdt, unrealized PnL, R multiple, liquidation price, funding paid, and protection modes (native|worker|none) for stop/take-profit/trailing/ratchet. Responses on a simulated connection carry mode:"simulated". Available on every tier.

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

ParameterTypeRequiredDefaultDescription
symbolstringno—

Example request:

{}

get_orders

Open and trigger orders; always echoes expires_at and expiry_mode (native|worker). Responses on a simulated connection carry mode:"simulated". Available on every tier.

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

ParameterTypeRequiredDefaultDescription
symbolstringno—

Example request:

{}

get_trade_history

Closed positions (position-level rows) with realized PnL net of fees and funding, R multiple and exit reason; include_fills for fills (fills_order:"chronological"; each fill reports amount_base, size_usdt = amount_base * price, and contracts for swaps). Available on every tier.

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

ParameterTypeRequiredDefaultDescription
fromstringno—
tostringno—
symbolstringno—
limitintegerno100
include_fillsbooleannofalse
position_uidstringno—

Example request:

{}

get_trade_stats

Win rate, profit factor, expectancy, avg R, drawdown — counts positions, not fills. Requires the analytics capability (Pro and above).

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

ParameterTypeRequiredDefaultDescription
fromstringno—
tostringno—
symbolstringno—
market_typespot | swapno—

Example request:

{}

get_pnl_by_symbol

Net PnL per symbol with components {trading, fees, funding}. Requires the analytics capability (Pro and above).

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

ParameterTypeRequiredDefaultDescription
fromstringno—
tostringno—

Example request:

{}

get_pnl_by_time

Net PnL per day/week/month with components. Requires the analytics capability (Pro and above).

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

ParameterTypeRequiredDefaultDescription
fromstringno—
tostringno—
bucketday | week | monthno"day"

Example request:

{}

get_funding_payments

Funding payments received/paid per position. Requires the analytics capability (Pro and above).

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

ParameterTypeRequiredDefaultDescription
fromstringno—
tostringno—
symbolstringno—

Example request:

{}

On this page