Documentation Index
Fetch the complete documentation index at: https://mintlify.com/backtest-kit/ai-trading-mcp/llms.txt
Use this file to discover all available pages before exploring further.
open_position queues a market entry for a symbol in the traded universe. The engine — not the agent — owns every execution detail: take-profit level, stop-loss level, and position cost are all computed engine-side and cannot be overridden. The agent’s role is to supply the symbol, direction, and a permanent note explaining its reasoning.
Parameters
The Binance spot symbol to trade, e.g.
BTCUSDT. Must be present in the CC_SYMBOL_LIST whitelist (13 pairs by default). Symbols outside the whitelist are rejected by the engine — no prompt engineering is involved.Direction of the trade.
"long" queues a market buy; "short" queues a market sell.The agent’s reasoning or signal source for this entry. The note is recorded in the position immediately and echoed back verbatim in every subsequent
get_status response for the entire life of the position. It also appears in the markdown audit dump under dump/mcp/.Best practices for the note:- Record the signal source precisely: Telegram channel ID, post timestamp, and a summary of the post content.
- Acknowledge any caveats about source reliability (e.g., scam-channel markers, unverifiable P&L).
- State the agent’s own confidence level and whether independent technical confirmation exists.
What Happens After the Call
Whenopen_position is called, the engine runs its validation chain before queuing anything:
- Whitelist check — the symbol must be in
CC_SYMBOL_LIST. - Duplicate check — the symbol must have no active position and no pending entry signal.
- If valid — a market entry is queued with engine-computed TP, SL, and cost. The note is persisted immediately.
- If invalid — an error message is returned in the response envelope and surfaced to the agent as an
isErrortool result.
Common Rejection Reasons
| Reason | Engine message |
|---|---|
Symbol not in CC_SYMBOL_LIST | Symbol is not live-enabled |
| Symbol already has an active position | Duplicate open rejected |
| Symbol already has a pending entry signal | Pending signal already exists |
Execution by Mode
Paper mode — the engine simulates the fill at the current market price fetched viaccxt. No real order is placed. TP and SL brackets are tracked in memory and against the live price stream.
Live mode — the spot broker adapter places a limit order with a poll-then-market-top-up guarantee: the order is polled up to 10 times at 10-second intervals; if it has not filled, the adapter cancels it (treating a cancel race as a fill) and places a market order for any remaining quantity. Once the entry is confirmed, an OCO (TP + stop-limit SL in a single freeze) protects the position. Idempotent recovery by clientOrderId = signalId prevents position doubling on engine revalidation.
The note Field
The note is the agent’s primary contribution to the audit trail. Because open_position has no size or leverage parameters, the note is the only agent-authored artifact attached to a trade. A well-written note makes it possible to reconstruct why a position was opened days or weeks later.
Example note from a real session (translated):
Example
get_status call the agent will see queued_entry populated for BTCUSDT, and once filled, an active_position with the note echoed back.
Position sizing is entirely engine-controlled.
open_position intentionally has no size, quantity, or leverage parameters — the engine computes cost and risk levels from its own configuration. This is by design: the blast radius of any single agent decision is bounded by the engine, not by the prompt.