Skip to main content

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.

get_status is the agent’s primary read tool — a single call delivers a complete snapshot of the entire portfolio alongside a live Telegram news feed. There are no parameters; the engine assembles everything automatically. Every trading decision the agent makes must be grounded in what get_status returns.

Parameters

get_status takes no parameters.

Response Structure

Per-Symbol Portfolio State

For every symbol in CC_SYMBOL_LIST, the agent receives a status message containing the following fields:
current_price
number
The latest market price for the symbol, fetched via ccxt from Binance.
invested_balance
number
The amount of capital currently deployed in this symbol (in USD).
queued_entry
string | null
If a open_position call has been accepted but not yet filled, this describes the pending entry signal. null when there is no queued entry.
active_position
object | null
The current open position, if any.
queued_close
string | null
If a close_position call has been accepted but not yet executed, this describes the pending close signal. null when there is no queued close.

Telegram Feed

After the portfolio block, get_status appends the last 15 posts from CC_TELEGRAM_CHANNEL, ordered newest first.
feed_header
string
A header line stating the channel ID and the number of messages included, e.g.:
Telegram feed -1002833393903 (last 15 messages, newest first):
post_timestamp
string (ISO 8601)
Each post is prefixed with its UTC timestamp in ISO 8601 format, e.g. [2026-08-02T09:34:19.000Z].
post_content
string
The text body of the post. For photo-only posts (no caption), the placeholder (photo post, image attached below) is emitted instead so the agent is never left guessing whether content was omitted.
image_blocks
object[]
When a post includes a photo — typically an exchange position screenshot — an MCP image block follows immediately after the post’s text block. Each image block has the shape:
FieldValue
id"<post-id>-photo"
type"image"
mimeType"image/jpeg"
dataBase64-encoded JPEG bytes
The scraper selects the smallest Telegram photo size with width ≥ 800 px (from the 320 / 800 / 1280 / 2560 px ladder) to balance legibility against payload size, with a fallback to the full-size download.

Concurrency and the queued() Wrapper

Internally, all get_status invocations pass through a queued() serialization gate. If multiple calls arrive concurrently — for example, when /loop fires while a previous fetch is still in progress — each call waits for the one before it to complete before starting. This prevents concurrent GramJS requests from stampeding the Telegram client.

The 90-Second Timeout

The Telegram feed fetch is wrapped in a hard 90-second timeout(). If the fetch does not complete within that window:
  1. The Telegram connection is torn down (disconnect() + getTelegram.clear()).
  2. The next get_status call reconnects from scratch.
  3. The current call throws, and the agent receives an isError tool result with the message StatusControllerService.getStatus: timeout fetching feed messages.
This keeps the bridge responsive even when the Telegram session stalls, and surfaces a clean, actionable error rather than hanging indefinitely.

Audit Dump

Before get_status returns its messages to the agent, StatusMarkdownService writes the full response to disk:
  • Text contentdump/mcp/<minute-stamp>.md, where <minute-stamp> is derived from the when timestamp (minute-level granularity via getMomentStamp).
  • Image contentdump/images/<message-id>.png, referenced relatively from the markdown file so the dump renders correctly in any viewer, including the web UI served on :60050.
This audit trail records every byte the model saw, making it possible to answer “what did the agent know and when did it know it?” after the fact.

Example Response

The following is an abridged transcript from a real session. The agent called get_status to survey the portfolio before deciding whether to act on a Telegram signal.
13 symbols, no open positions — BTCUSDT 63 119.04, ETHUSDT 1 856.67, …

Telegram feed -1002833393903 (last 15 messages, newest first):

[2026-08-02T09:34:19.000Z]
Работаю с BTC — в шорт, взял с учетом возможного добора
(photo post, image attached below)
<MCP image block: exchange position screenshot — BTCUSDT Short, Cross 100x>

[2026-08-01T06:57:32.000Z]
Доброе утро, дорогие мои ☀️ Суббота, значит отдыхаем…
Claude’s interpretation (also from that session):
13 symbols, no open positions. The Telegram feed shows the author shorted BTC at ~63 285 on Aug 2, 09:34 UTC. The position screenshot shows Cross 100x and a BingX referral code — classic scam-channel markers.
get_status is the agent’s only read tool. All trading decisions — entries, holds, and exits — must be based exclusively on what it returns. The engine exposes no other data channel to the agent.

Build docs developers (and LLMs) love