Tradetron
Server Details
Build, backtest and diagnose algo trading strategies in your own Tradetron account in plain English.
- Status
- Healthy
- Uptime
- 100.0% over the last 24 hours
- OAuth
- Works in Glama
- Last Tested
- Transport
- Streamable HTTP · MCP 2025-11-25
- URL
- ChatGPT
- –
- Claude
- –
TDQS
Scored across 93 tools
Most tools are individually separable and the descriptions go to unusual lengths to disambiguate neighbours (tt_ask_tt vs tt_check_broker_support, tt_straddle_chart vs tt_straddle_live vs tt_straddle_decay, tt_backtest_result vs tt_backtest_trades vs tt_backtest_status, tt_find_keyword vs tt_lookup_keyword). But the set is so dense that real misselection risks remain: four diagnostic surfaces overlap (tt_diagnose_strategy, tt_get_my_deployed_strategy_detail, tt_get_strategy_notifications, tt_get_strategy_broker_log), three editing doors compete (tt_apply_strategy_patch, tt_update_strategy, tt_normalize_strategy), and eleven backtest-adjacent tools plus fourteen tt_uni_* tools must all be told apart by prose alone. An agent needs to read very long descriptions to pick correctly, which is the definition of partial overlap rather than clean separation.
Everything carries the tt_ prefix in snake_case, and the dominant pattern is verb_noun (tt_create_strategy, tt_list_brokers, tt_get_my_profile, tt_validate_markdown). Deviations are minor and product-scoped: noun-only names like tt_uni_course_format, tt_uni_course_media, tt_uni_test_stats, and oddities such as tt_ask_tt and tt_deploy_strategy_paper (whose 'paper' token is explicitly called legacy and contradicted by its own docs). Predictable enough to guess at, not perfectly uniform.
93 tools is far past any reasonable ceiling for a single server, even though the domain genuinely spans strategy authoring, backtesting, market data, portfolio reporting, support and a course marketplace. Whole clusters exist purely as transport or dialect variants (tt_create_strategy_chunked, tt_apply_strategy_patch_chunked), and fourteen TT Uni tools plus eleven backtest tools make the surface a bundle of several products rather than one coherent set. Each may have a purpose, but the aggregate is an extreme mismatch for what an agent can reliably navigate.
Coverage is unusually thorough: full strategy lifecycle (create, get, validate, patch, update, export, deploy, diagnose, performance), full backtest lifecycle (list, workbench, submit, sweep, status, trades, result, compare, pre-flight), catalogs for brokers, underlyings, keywords, lists, plans, wallet, calendar, plus support and blog flows. The real gaps are operational dead-ends the descriptions themselves point at: no tool to stop/exit a deployment (tt_update_signal_bridge says 'stop and exit the deployment first') and no strategy delete or list creation (tt_modify_list admits 'NO tool here creates or copies a list'). Those force the user out to the website, which is workable but not seamless.
Available Tools
93 toolstt_apply_strategy_patchApply Strategy PatchADestructiveInspect
Apply a JSON-Patch (RFC 6902) to an existing strategy.
exchange_brokers: {exchange: broker_id}. Send ONLY on the re-call after a STRATEGY_EXCHANGE_BROKER_REQUIRED refusal, with the broker the USER picked from details.missing[].brokers. Never pick one yourself. On success relay data.subscriber_broker_warning if present.
MOVING ONE VALUE EVERYWHERE IT APPEARS — use rewrite, not patch.
rewrite={"dimension": "timeframe", "from": "1m", "to": "5m"} changes
the candle timeframe at EVERY site in the strategy in one small call:
both text forms and the builder tree of every condition, plus every
tt_get_data call in the Python block. Hand-authoring that is not a
realistic ask — condition_json is a JSON-ENCODED STRING, so no pointer
reaches inside it and a three-character change means re-sending every
builder tree in the strategy. Prefer one rewrite call over per-condition
patches or splitting the work across calls. The three-representation rule below is
satisfied automatically, and the partial-edit guard proves no site was
left on the old value. from may be written any way ('1 minute', '1min',
'1m'); the canonical token is what gets written. A miss returns the
timeframes the strategy DOES hold, so the retry is exact.
rewrite and patch compose — explicit ops win on their own fields.
Underlying swaps are NOT rewritable (lot size, strike step, expiry and
the instrument id all move with the symbol); the refusal says so and
names tt_check_underlying_support.
LIVE-EDIT CONFIRM GATE: if this template is DEPLOYED, has SUBSCRIBERS, or is PUBLIC, a NON-dry-run call refuses once with LIVE_EDIT_CONFIRMATION_REQUIRED — carrying the blast radius, the live-position consequences, and a copy alternative. RELAY those to the user, ask one confirm question, and only after the user explicitly agrees re-call with the SAME arguments plus live_edit_confirmed=true. Never set it on your own initiative. dry_run=True (the default) is never gated.
A patch that removes or blanks the strategy's Universal Exit is
refused (STRATEGY_EDIT_UE_REMOVED) unless
allow_universal_exit_removal=True. When ADDING a repair condition,
insert it BEFORE the set's Exit condition (explicit index, not
"/conditions/-") — conditions evaluate in array order and a repair
after the Exit is dead code (CONDITION_ORDER_EXIT_BEFORE_REPAIR).
ANY change to a leg's underlying — INCLUDING a same-exchange swap
such as Crudeoil → NaturalGas, not only across asset classes —
requires re-deriving every dependent field in the SAME patch:
expiry, expiry_type, strike, strike_type, strike_display,
strike_json, product_type, qty_type, and the numeric instrument
id (set it to 0 to let the server resolve it — a stale non-zero id
is trusted as-is and never re-derived). Call
tt_check_underlying_support() BEFORE composing the
patch: lot size and strike step differ between underlyings
(Crudeoil 100, NaturalGas 1250), so the leg cannot carry over.
Expiry keyword families: NFO/BFO Current Week/Month Expiry · MCX
MCX Fut Expiry / MCX Option Expiry · crypto Crypto Current
Day/Week/Month Expiry (perpetual = literal 2099-12-31).
Leaving any of them stale is refused as
LEG_SYMBOL_REFERENCE_DESYNC — before that guard existed, a
same-exchange swap validated 0 errors / 0 warnings and traded the
OLD contract.
Use this for SURGICAL structural edits — adding / removing / reordering / modifying an individual set, condition, or leg without re-sending the whole strategy. The post-patch state is POSTed as the clean create-shape and round-trip-verified by content count; it FAILS LOUD (STRATEGY_PATCH_CONTENT_DROPPED) if TT drops content. For a full sets-array replacement or scalar fields, tt_update_strategy also works.
SET IDS CHANGE ON EVERY SAVE. Tradetron recreates every set row on
a write, so a non-dry-run patch, even a one-value one, gives every
set a new id (each condition's strategy_template_set_id moves with
it); condition and leg ids are kept. data.set_ids maps each set's
sent id to its stored one. Never reuse a set id read before a save.
TT INJECTS READ-SIDE SCAFFOLDS (verified against the
live API 2026-08-07): the GET/fetch response appends inert blank
envelopes — Add Repair + Exit per set, and Add Repair +
Repair Once/Overnight Protection in the last/Universal-Exit
set — so the fetched condition count EXCEEDS what was sent (e.g. 13
sent → 15 fetched). These rows are display scaffolds from TT's
read transformer, not persisted DB rows: they carry sort=None and
empty condition_json, and they are APPENDED AFTER the authored
conditions, so authored rows keep their array indices and
contiguous sorts. Consequences: (1) a higher-than-sent count in
content_counts is normal, only a DROP is a defect; (2) author
patch paths against a fresh tt_get_strategy fetch (whose indices
include the scaffolds); (3) match conditions and legs by their row
id or by type+content, never by a remembered ordinal and never by
uuid: Tradetron mints every set, condition and leg uuid fresh on
EACH read (it is not stored), so a uuid from one read appears in no
other. Condition and leg ids are stable across saves; set ids are not
(see above).
Default dry_run=True — returns a structured before/after diff
and a full validation pass WITHOUT touching TT. Set dry_run=False
only after inspecting the dry-run result.
Args: strategy_id: integer ID from a prior create or list call. patch: list of JSON-Patch ops. Each op is a dict: {"op": "add"|"remove"|"replace", "path": "/json/pointer", "value": # add/replace only} Paths are JSON-Pointer (RFC 6901). Trailing "-" on add means append to array: "/sets/-". rewrite: {"dimension": "timeframe", "from": , "to": } — move a value at EVERY site in one call. Compiles server-side into ordinary replace ops (returned in patch_summary) and passes through the same validation, desync and round-trip checks. Optional; omit for a hand-authored patch. dry_run: True (default) returns diff only; False POSTs to TT.
Supported ops in v1: add, remove, replace. (move/copy/test deferred — express move as add+remove, copy as add with value.)
Returns on success: { "ok": True, "data": { "applied": bool, # True only when dry_run=False AND POST succeeded "dry_run": bool, # echo of input "patch_summary": [...], # compact per-op view "before": {...}, # state pre-patch; BOTH are OMITTED on a "after": {...}, # rewrite-only call and whenever the two # bodies exceed the echo budget — then # "bodies_omitted" carries the reason and # patch_summary / condition_changes are the # diff. Re-read with tt_get_strategy(id). "validation": {"ok", "errors": [...]}, "tt_result": {...}, # only when applied=True "request_id": str, # log correlation } }
Error codes worth surfacing: STRATEGY_PATCH_BAD_OP — patch op malformed or path invalid STRATEGY_VALIDATION_FAILED — post-patch state fails SCHEMA_LOCK STRATEGY_TT_API_ERROR — TT rejected the POST (applied=False) STRATEGY_PATCH_CONTENT_DROPPED — TT 200 but a structural patch lost sets/conditions/legs (FAIL LOUD) STRATEGY_PATCH_PARTIAL_PERSIST — TT 200 but some touched scalar keys did not persist (see details.dropped)
Examples: # Rename via patch (equivalent to tt_update_strategy({"name": ...})) [{"op": "replace", "path": "/name", "value": "new name"}]
# Add a new Set at the end
[{"op": "add", "path": "/sets/-",
"value": {"name": "extra", "uuid": "...", "conditions": [], "list": 0}}]
# Remove the second leg from the first condition of the first set
[{"op": "remove", "path": "/sets/0/conditions/0/legs/1"}]
# Change a condition's expression.
# THREE-REPRESENTATION RULE — the single most common reason a patch
# is refused (PATCH_REP_DESYNC). condition_value (engine expr),
# condition_json (builder tree) and condition_display (builder
# string) are parallel forms of ONE field. The engine reads the
# value; the ASB builder renders the json/display. Move only one and
# the user's next save in ASB SILENTLY REVERTS the change. The same
# holds for a leg's strike / strike_json / strike_display, its
# qty / qty_json / qty_display, and a variable row's bare
# value / json / display.
#
# *** A lone condition_value replace is REFUSED. ***
# *** A lone condition_JSON replace is ACCEPTED. ***
#
# The asymmetry is real, not a quirk: the server can derive
# value + display FROM a builder tree (deterministic re-emit), and
# there is no parser the other way. So the cheapest correct edit to
# an AST-backed field is to patch the `*_json` member ALONE —
# condition_json, or a leg's strike_json / expiry_json / qty_json /
# limit_price_json / SL_trigger_json — and let the server fill the
# text members. It reports what it wrote under
# `validation.representation_repairs`.
#
# To obtain a correct json/display pair without hand-writing one,
# call tt_normalize_strategy(strategy) with the edited body, or
# tt_create_strategy(dry_run=True) with markdown for the
# condition you want and lift the generated members out of the
# returned `payload`. Copying the FETCHED json/display verbatim does
# NOT satisfy the guard — byte-identical carry-over beside a changed
# value is exactly the stale-sibling case it catches.
[{"op": "replace",
"path": "/sets/0/conditions/0/condition_value",
"value": "( tt_Time ( 'NSE' ) >= tt_Number ( '1015' ) )"},
{"op": "replace",
"path": "/sets/0/conditions/0/condition_json",
"value": "<builder tree from tt_create_strategy(dry_run=True)>"},
{"op": "replace",
"path": "/sets/0/conditions/0/condition_display",
"value": "<builder string from the same payload>"}]allow_mixed_underlyings: a patch that moves the underlying at SOME of its sites and leaves others on the old symbol is REFUSED (PARTIAL_UNDERLYING_CHANGE in validation.errors): saved, it trades a mix of two instruments. Set true only on a re-send after the USER confirms the mix is intended (a hedge or a signal on another index).
RUNTIME-VARIABLE WRITES (Set Runtime Var) are editable two ways: the
row's value at /sets//conditions//extra/variables//value,
or the stored write itself at
/sets//conditions//condition_action/ (the engine runs
condition_action; the server carries the edit into the row and
Tradetron regenerates condition_action on save). Writes stored ONLY
in condition_action are moved into rows first, with the same text;
validation.runtime_write_rows lists both. They count as underlying
sites, so an underlying move that leaves one behind is refused like
any other partial move.
Inputs: strategy_id (required), patch, dry_run, rewrite, +4 more.
tt_apply_strategy_patch_chunkedApply Strategy Patch (Chunked)ADestructiveInspect
Chunked tt_apply_strategy_patch, for an edit too large to send in one tool argument.
WHEN TO USE: only after a normal tt_apply_strategy_patch call could
not be emitted in one piece. Before reaching for this, check whether
rewrite does the job — moving a timeframe across a whole strategy is
~60 bytes with rewrite and hundreds of KB without it. Between rewrite
and chunking, a large edit can normally be completed without asking the
user to do it by hand.
PROTOCOL. Encode the WHOLE CALL as JSON — not the strategy:
{"strategy_id": 123,
"patch": [ ...ops... ], # optional when `rewrite` is given
"rewrite": {"dimension": "timeframe", "from": "1m", "to": "5m"},
"dry_run": true,
"live_edit_confirmed": false}base64(gzip(...)) it if you can compute that; plain JSON is accepted too (the decoder is tolerant — do NOT hand-write base64). Split the string into N pieces and send each with the same draft_id and total_chunks. Earlier calls return {status: "chunk_received", ...}; the final call runs the patch and returns exactly what tt_apply_strategy_patch returns.
Resending the same (draft_id, chunk_index) replaces that chunk — safe to retry. Drafts are GC'd 5 minutes after the last write. Assembly is one-shot: if the patch itself is rejected, re-upload the chunks.
LIVE TEMPLATES: a non-dry-run edit to a deployed, subscribed or public template refuses once with LIVE_EDIT_CONFIRMATION_REQUIRED. After the user explicitly agrees, re-upload the chunks with live_edit_confirmed=true (this argument on the final chunk, or the same key inside the JSON). Never set it on your own initiative.
Inputs: chunk (required), draft_id (required), chunk_index (required), total_chunks (required), +1 more.
tt_ask_ttAsk Tradetron (Knowledge Base)ARead-onlyIdempotentInspect
Ask TT — answer any question about Tradetron from the indexed knowledge base (FAQ, help docs, blog, forum). Cites sources.
USE WHEN: user asks about Tradetron product features, capabilities, pricing tiers, common workflows, "can I do X on Tradetron", "how do I Y", or any question ABOUT TRADETRON-AS-A-PLATFORM (NOT about authoring a specific strategy).
DO NOT USE for:
Broker-support questions ("do you support X?", "what brokers are connected?", "any US brokers?") → use tt_check_broker_support or tt_list_brokers. Those are deterministic against a bundled catalog; this tool is RAG-based and may miss or misreport.
Authoring a new strategy → use tt_create_strategy + the validate / keyword-lookup tools instead.
Editing / fetching an existing strategy → use tt_get_strategy / tt_update_strategy.
Looking up a specific keyword → use tt_lookup_keyword.
Returns a structured retrieval result for the calling assistant to
turn into the user-facing answer. The result describes how it was
assembled (synthesis_instructions):
definitive_no_answernon-null → Tradetron has no such feature; the field carries the exact wording so the answer is not an invented workaround.escalate=True→ the knowledge base cannot answer; thehandoff_payloadlets the user reach a support agent (tt_open_support_conversation).Otherwise the answer is grounded in the cited
sources; include a source URL inline when a source carries one (catalog-backed sources have a title but no URL — cite them by name).
Inputs: query (required).
tt_backtest_compareCompare BacktestsARead-onlyIdempotentInspect
Put two or three finished backtests side by side. FREE — reads runs already paid for, runs no engine, charges nothing.
This is the second half of research. One run tells you what happened; the comparison tells you whether the change you made did anything.
READ attribution BEFORE ANY NUMBER, and say what it says. A delta is
attributable to a cause only when EXACTLY ONE run input differs — the
window, the candle frequency, the type, the expiry, the fill price or
the strategy. If more than one moved, this is two different experiments
and no difference can be pinned on any of them. If none moved, the gap
is the engine's own run-to-run variation, not a result.
THERE IS NO WINNER FIELD, deliberately. "Which is better" over a short window is how people talk themselves into noise. You get deltas, a paired daily-difference test, and the job of drawing the conclusion in the open.
daily_test.verdict is not a footnote — quote it alongside the delta.
A bigger number over a few dozen days is usually chance, and the test
says so.
Metrics in not_compared were withheld on one side for being
unsupportable; subtracting them would launder them back in. Never do it.
Args: job_ids: 2-3 ids; the first is the baseline. sections: extra sections per run.
Inputs: job_ids (required), sections.
tt_backtest_ideaBacktest An IdeaADestructiveInspect
The backtest playground: "what would have happened if I bought X whenever Y, and sold it Z later?" — for NSE stocks/ETFs on daily candles. Use THIS instead of the tt_validate_markdown -> tt_create_strategy -> tt_backtest_strategy ladder for any single-stock, daily, long-only what-if. It builds the strategy, backtests it and cleans up itself.
THIS TOOL CAN CHARGE AND WRITE: run_backtest=true creates a temporary strategy in the user's account and, once the user accepts the quoted price, debits their wallet. For the free preview alone, tt_preview_idea takes the same idea arguments and is read-only.
CALL 1 (free, instant, no login needed): symbol + entry + an exit
(hold_days and/or exit). Returns a daily PREVIEW replay — trades, win
rate, net return vs buy-and-hold — plus the validated strategy it would
run. Report the preview with its limits: it is not the engine.
CALL 2 (paid): the same arguments with run_backtest=true. It creates a
temporary "Playground" strategy in the user's account and returns the
PRICE QUESTION (confirmation_required, price, wallet balance). Nothing is
charged. Ask the user; only after a clear yes, call retry_call
(confirmation_token + confirm_charge=true). That submits to Tradetron's
backtest fleet, waits for it server-side, and returns the report's own
headline numbers and report_url. If still running, it returns job_id —
call tt_backtest_idea(job_id=...) once when the user asks again.
EXIT IS REQUIRED AND HAS NO DEFAULT. If the user did not say when to
sell, ASK. Never pick an exit, a threshold or a window for them without
saying so (the window defaults to the 3 years ending 35 days before
today and the response says when it did). Backtests may only use data
at least 35 days old (exchange rule): an end inside the last 35 days
is refused with the latest allowed date; offer that date instead.
The temporary strategy is DELETED once its backtest finishes (or if the user never confirms the price). keep_strategy=true keeps it.
Scope: long only (Indian delivery cannot be held short overnight), NSE cash, daily candles. Intraday or options ideas: tt_check_edge -> tt_promote_to_strategy.
Inputs: end, exit, entry, start, +8 more.
tt_backtest_resultBacktest ResultARead-onlyIdempotentInspect
A finished backtest's NUMBERS — the figures from its own report, as data.
THIS IS FREE. It reads a run the user has already paid for; no engine runs and nothing is charged, however many times it is called. Slice the same run as often as the question needs.
Use it the moment tt_backtest_status says done. tt_backtest_status returns a report_url and no figures, on purpose; this is how you read them without a browser. tt_backtest_trades remains the way to page raw FILLS — this gives you the analysis over them.
Sections (ask by name; the default set is the cheap ones): headline meta costs weekday drawdowns monthly exit_attribution concentration trade_stats setwise stats_table <- default series sub_windows grade timing distribution underwater regime rom benchmark walk_forward montecarlo quality trades positions sets underlyingwise
underlyingwise is P&L, trades and ROI PER UNDERLYING — the same split the
report page renders under BREAKDOWNS -> Underlying-wise. Ask for it on any
multi-instrument book: the default response announces it in
section_notes.underlyingwise when the run holds more than one. Do not
re-derive it by paging trades.
sub_windows is summarised by default — six trailing windows are six
COMPLETE nested results (measured: 91 KB on a 42-trade run). Each block
names what was dropped under _omitted, and section_notes reports
approx_chars. Pass caps={"sub_windows_full": true} for the whole blocks.
THREE THINGS THIS DELIBERATELY DOES NOT DO, and you must respect them:
caveats[]is not decoration. Each entry names, inaffects, the metric keys it taints. Read it BEFORE quoting any figure. Never present a run carrying a high-severity caveat as evidence of an edge.A risk-adjusted figure the book cannot support is ABSENT, not zero — see
section_notes.headline_withheldfor which and why. Do not fill the gap from the report page, and do not estimate it.section_notes.<name>.basissays whether a section is gross or net. The headline is net; Monte Carlo, PSR, timing and distribution are gross. Never put a net figure and a gross one in the same sentence without saying so.
A section marked single_trial (montecarlo, quality/PSR) assumes ONE
backtest was run. After comparing variants it reads high by construction
and is not a probability that the strategy works. Say that, or omit it.
Args: job_id: 'ttbt-...' or a bt_id from tt_list_backtests. sections: section names; omit for the default set. caps: per-section row caps, e.g. {"trades": 200}; plus {"sub_windows_full": true} to unsummarise the trailing windows.
Inputs: job_id (required), caps, sections.
tt_backtest_statusBacktest Job StatusARead-onlyIdempotentInspect
Check a backtest's completion and fetch what its engine returns.
A job_id need not come from the user: tt_list_backtests returns every run in their account with its job_id already attached.
Call this after tt_backtest_strategy. A backtest takes ~10-75s; if it's not
finished yet this returns state 'queued'/'running', so poll it after a short
beat. THE SHAPE DEPENDS ON WHICH ENGINE SERVED THE RUN (the response's
engine field says which):
engine 'tradetron-fleet' (job ids 'ttbt-…' — the normal path since 2026-08-25): completion + report_url ONLY. You may also pass the BARE backtest id the user reads off their Tradetron report page or the trades-CSV filename (e.g. 10053270260902); it is normalised onto this route, so a run started on the website is reachable too. The numbers live on the public per-run report page; this response carries NO results block, csv_url or raw payload — present report_url and read the numbers there, never invent a P&L figure here. To READ the run without a browser (any chat channel, or the ttmcp CLI), call tt_backtest_trades with its job_id: that returns the fills plus a summary computed over all of them.
engine 'btengine' (16-hex job ids — sweeps and non-default-knob runs): done => {summary_md, results:{net_pnl, roi_pct, max_drawdown, charges, trading_days, fills, currency, ...}, report_url, csv_url}, plus
raw(the untouched btengine payload).failed (either engine): {done: True, failed: True, error, summary_md (incl. auto-refund note)}.
not_found: Tradetron is returning no record for this id — it is wrong, or the run belongs to another account. TERMINAL: do not poll again, ask the user to re-check the id on their Backtests page.
unavailable: the status could NOT be read. This is NOT evidence the run is progressing — never report it as "still running". Retry once, then send the user to their Backtests page.
RELAY summary_md verbatim (it's unit- and currency-correct — crypto is USD,
not ₹). Then add the report_url as a clickable link. If the submit charged the
user (the tt_backtest_strategy billing block), remind them of that charge in
the same message, quoting the submit's own value (never a hardcoded figure);
on a failed run, the fee auto-refunds — say so.
Inputs: job_id (required).
tt_backtest_strategyRun BacktestADestructiveInspect
Submit a backtest of a strategy on real historical option prices; returns a job id to poll.
Runs the SAME template object tt_create_strategy produces on Tradetron's own backtest fleet, which uses Tradetron's fill model and keyword library on historical data. Submits the job and returns {job_id, watch_url, status_url}. The deliverable is the RUN'S REPORT: poll tt_backtest_status and present its report_url (public, per-run). watch_url is a secondary "watch it in your account" link (on fleet runs it opens the user's logged-in Backtests page, not a page for this run alone) — offer it alongside, never instead of, the report.
Pass exactly one of template / strategy_id:
strategy_id: an existing template id (or deployed SID — auto-resolved) from the user's connected Tradetron account. Fetched, then backtested.
template: the strategy object (with a 'sets' array) — from tt_create_strategy or a Tradetron v2 export (the service translates v2).
a plain-English description: NOT an argument — create the strategy FIRST (tt_create_strategy, which is free), then backtest the created template.
a strategy NAME ("backtest CASH ON Nifty new"): also not an argument — resolve it to an id with tt_list_my_strategies(q=) first; only ask the user for the template id / edit URL if that lookup finds nothing.
BILLING (when enabled server-side): creating strategies is FREE; each backtest beyond the daily free allowance debits a flat fee from the user's Tradetron WALLET (not AI tokens). A rejected or failed run is auto-refunded. Possible billing responses — relay them faithfully: {billing_required, price, wallet_balance} means the balance doesn't cover the run — say so, and if the response carries topup_url share it as a clickable link; when it doesn't, note that wallet balance can be managed from the user's Tradetron account on the website. A successful submit may carry {billing: {charged, wallet_balance, refund_policy}} — mention the charge in one short sentence, never as a surprise.
Args:
template: the strategy object (with a 'sets' array); omit when passing strategy_id.
strategy_id: existing template id / SID in the user's account (requires connected
account); omit when passing template.
start, end: 'YYYY-MM-DD' backtest window (end is exclusive, matching TT-BT).
DATA RULE (exchange, 13 Oct 2026): NSE/NFO/BFO backtests may only use data
at least 35 days old, so end must be on or before today minus 35 days
(MCX, crypto and US: yesterday, as on the website). An empty end
defaults to that date (the response carries window_note); a later end is
refused free with code BT_WINDOW_TOO_RECENT and latest_allowed_end —
explain the rule and offer that date. Never promise a backtest on recent
data or 'up to yesterday'.
WINDOW SIZE: one run covers any window up to 5 years (60 months); a longer
window is refused uncharged. Data starts Jan 2020 (Sensex/Bankex options
Aug 2023, single-stock options Jun 2024). To look at more than 5 years, run
two windows; never promise 'the full history' in one run.
LOT SIZE: a run uses today's lot size for the whole window by default.
Historical lot sizes are opt-in on the website's Backtest dialog ("Lot at
each expiry"); this tool has no such switch, so say which one applied.
type: 'auto' (default) | 'positional' | 'intraday'. 'auto' self-detects from the
strategy's structure; when the structure gives no STRONG signal — or when an
explicit type CONTRADICTS a strong signal — the tool returns
{confirmation_required, code: BT_TYPE_CONFIRMATION_REQUIRED, question, evidence}
and submits NOTHING. Ask the user that one question (the wrong type makes the
engine force-close positions at 15:30 daily, so every number would be wrong),
then re-call with type= and bt_type_confirmed=True — the user's
answer is FINAL and supersedes the classifier.
bt_type_confirmed: set True ONLY after the user has answered the intraday-vs-
positional question; honors their type verbatim, never re-asks.
confirm_charge: set True ONLY after the user has been told the exact fee and
agreed to it. When a run is chargeable, the tool first returns
{code: BT_CONFIRM_CHARGE, price, wallet_balance, refund_policy,
confirmation_token, retry_call} and submits nothing. That one response
carries everything the user needs to decide — price, balance, and that a
failed run is auto-refunded — so ask ALL of it in ONE message, wait for a
yes or no, and do not go looking anything else up. Never set it on your
own initiative.
confirmation_token: the token from that response. After the user says yes,
the confirmed call is just {confirmation_token, confirm_charge: True} —
no template, no dates. The quoted run is replayed exactly, so nothing can
drift between the price the user agreed to and the run they get. The
token expires in 15 minutes and works once; if it is rejected, re-send the
full arguments with confirm_charge=True. It authorises nothing on its own.
trade_price: 'Open' (default) | 'Close' | 'Avg of Open and Close' | 'Best price' |
'Worst price' | 'Avg of Bid/Ask' (candle-based execution bounds: the bar's most / least
favourable price for the leg's side, or its (high+low)/2 mid; trades and
timestamps do not change, only fill prices, and % slippage still applies on
top) — the fill price field. The default was 'Close' until 2026-09-05 while the website's
Backtest dialog defaulted to 'Open', so the same template over the same
window returned -₹81,749.98 here against -₹86,830.01 on the website — a
5.9% difference the user never chose — passing Open explicitly
reproduced the website result to the paisa on all 165 days, so only the
default differed, never the engine. 'Close' is also the WRONG default on
the merits: a condition that triggers intra-bar then fills at that bar's
close has seen the whole minute first.
stop_check: 'close' (default) | 'high_low' — see the parameter description. Echoed
in applied_params; a high_low run is served only by Tradetron's fleet.
capital: starting capital (₹) for ROI/drawdown denominators.
candle_freq: candle cadence in MINUTES (e.g. 1, 5, 60).
tt_match: reproduce TT-BT lot conventions — use when comparing against a TT backtest.
oos_pct: IGNORED on a single run (a value other than 0 is reported back in
params_not_applied). Walk-forward comes with a parameter SWEEP, exactly as the
website offers it: use tt_backtest_sweep, whose oos_pct (default 30) gives every
variant an in-sample vs out-of-sample verdict.
Returns {ok, job_id, watch_url, status_url, note} (+ fidelity_caveat for strategy classes
still being parity-validated, e.g. repair/martingale; + billing when a charge applied).
A confirmation response's applied_params holds ONLY the settings this run applies —
read the run's settings to the user from that block alone. params_not_applied, when
present, names accepted knobs that have no effect; never quote one as a run setting.
On a validation/RCE-gate reject: {ok: False, error, findings} (any charge auto-refunded).
Inputs: end, type, start, capital, +11 more.
tt_backtest_sweepBacktest Parameter SweepADestructiveInspect
Sweep ONE strategy parameter across a grid on Tradetron's own backtest fleet — a run per value; returns a job id, and the report link comes from the status poll. Use to answer "which entry time / strike offset / SL is best?" without hand-editing and re-submitting N backtests.
SINGLE-AXIS ONLY: one search variable, N values. It is NOT a multi-parameter grid — to explore a second parameter, run a second sweep.
BILLING (when enabled server-side): a sweep is charged PER VARIANT — every value
in values is one engine run debited at the per-run backtest fee from the user's
Tradetron WALLET, so N values cost N x the per-run fee (e.g. 5 values = 5 x the
fee). The same consent gate as tt_backtest_strategy applies: a chargeable sweep
first returns {code: BT_CONFIRM_CHARGE, price, wallet_balance} with the TOTAL
price for all variants and submits NOTHING — relay the exact amount and the
variant count to the user, and only after they agree re-call with the SAME
arguments plus confirm_charge=true. A rejected or failed sweep is auto-refunded.
A successful submit carries {billing: {charged, variants, rate, wallet_balance}} —
mention the total charge in one short sentence, never as a surprise.
Args:
confirm_charge: set True ONLY after the user has been told the exact total fee
(per-variant fee x number of values) and agreed to it. Never set it on your
own initiative.
template: the strategy object (with a 'sets' array), passed INLINE. Unlike
tt_backtest_strategy, this tool has NO strategy_id parameter: for a strategy
already saved in the user's account, call tt_get_strategy(strategy_id) first
and pass its data.strategy here as template. Fetching also carries the
template's id, and that id is what the fleet sweeps. A hand-built inline
template has no id, so it is REFUSED uncharged ("isn't saved in your Tradetron
account") — save it with tt_create_strategy, re-fetch it with tt_get_strategy,
and sweep THAT object. The refusal says "backtest by strategy_id" because it is
shared with the backtest tools that take one; here it means that round-trip.
start, end: 'YYYY-MM-DD' window; on NSE/NFO/BFO end must be at least
35 days before today, elsewhere yesterday (BT_WINDOW_TOO_RECENT otherwise, refused before any charge). type / trade_price / capital / candle_freq /
slippage_bps / tt_match: identical meaning to tt_backtest_strategy.
search: a parameter of THIS strategy to vary — e.g. an entry time "0930", a
strike offset, an SL number. Tradetron validates it server-side against the
strategy's own parameters, and does so on the routing check, so a name the
strategy does not carry is refused FREE and BEFORE the price question, quoting
Tradetron's own sentence ("'X' is not a parameter of this strategy. Pick one
from the list."). That arrives as {ok: False, error} — take the list it names
and re-call. It is NOT a fuzzy substring match over the template JSON.
values: the grid to try — 2 to 10 strings (hard limits; validated here before
submit). One sequential engine run per value.
oos_pct: per-variant WALK-FORWARD fold, default 30 (the service clamps 10–50), so
each variant is judged in-sample vs out-of-sample — pick by IS, judge by OOS.
name: optional label for the run; defaults to the template name.
stop_check: 'close' (default) | 'high_low', the same as tt_backtest_strategy. Every
variant is run with it. A high_low sweep runs only on Tradetron's fleet; it is never
sent to the fallback engine.
TIMING: variants run SEQUENTIALLY, ~300s each, so a 10-value intraday sweep can take many minutes. This is submit-and-watch — open watch_url for progress; it is never synchronous. A sweep counts as ONE inflight job; our single source IP allows max 4 concurrent backtests total (shared across all MCP backtest tools).
RESULTS: poll with tt_backtest_status. The per-variant ranking currently renders in the HTML report (report_url in the status). A machine-readable per-variant summary is being added service-side; once live, tt_backtest_status will also carry structured per-variant results in its summary — this tool passes through whatever summary/results the status returns and does not require them to be present yet.
Returns {ok, job_id, watch_url, status_url, state, note} (+ fidelity_caveat as tt_backtest_strategy). On a bad search / validation reject: {ok: False, error, findings}.
Inputs: end (required), start (required), search (required), values (required), +11 more.
tt_backtest_tradesBacktest TradesARead-onlyIdempotentInspect
What a finished backtest actually TRADED — its fills, summarised over the whole run and returned one readable page at a time. AUTH-REQUIRED.
Answers the question tt_backtest_status cannot: that tool returns completion
and a report_url, and on a Tradetron-fleet run the numbers live only on that
web page. A client that cannot open a browser (any of the chat channels, or
pip install ttmcp) could run a backtest and never read it. Call this after tt_backtest_status says the run is done, or on any
bt_id from tt_list_backtests.
Returns:
summary computed over EVERY fill: fills, buys, sells, instruments,
first_fill/last_fill, and net_pnl WHEN the run's fills carry a
P&L column (net_pnl_column names which one). A figure that is
ABSENT was not in the data — say so and point at report_url
rather than deriving one.
trades one page of fill rows (count, offset, has_more,
next_offset). Never ask for everything: one run in the QA set
carried 9,823 fills.
csv_url / report_url when Tradetron returns them.
A run with no fills is a RESULT, not a failure — the entry conditions never
triggered in that window; the response says so in note.
Args: job_id: 'ttbt-...' from tt_backtest_strategy, or a bt_id from tt_list_backtests. A 16-hex btengine job id is rejected with a pointer back to tt_backtest_status, which already carries that engine's own results block and csv_url. limit: trade rows per page (default 25, max 200). offset: trade rows to skip.
Inputs: job_id (required), limit, offset.
tt_backtest_workbenchBacktest WorkbenchARead-onlyIdempotentInspect
OPEN A STRATEGY FOR BACKTEST WORK. Start here, not with a submit.
Give it a template id and it answers, in one call: is this yours, what has already been run on it, what those runs can tell you for FREE, and what a new run would cost. AUTH-REQUIRED. It never submits and never charges.
WHY IT MATTERS: reading and re-slicing a run the user already paid for is free and unlimited; a NEW run is a fresh charge. You cannot tell which side a question falls on without knowing what runs already exist — so a model that skips this either re-buys a backtest the user already has, or refuses to explore because it assumes everything costs. Both waste the user's money or their time.
HOW TO USE THE ANSWER:
runs.rowswithfinished: true→ answer from these first, via tt_backtest_result. Slice them as many times as the question needs.next_run.changes_that_need_oneis the definitive list of what forces a new paid run: the strategy body, the dates, the type, the expiry, the fill price, the candle frequency. NOTHING ELSE DOES.next_run.quoteis Tradetron's own price. Quote it verbatim; never compute or estimate one, and never state a price when it is null.
TEMPLATE_NOT_YOURS is terminal — do not retry the id, and do not guess another. Ask the user, or call tt_list_my_strategies.
Args: template_id: the strategy template to open. start/end: only needed to price a prospective new run. run_limit: past runs to list (default 20, max 100).
Inputs: template_id (required), end, start, run_limit.
tt_blog_read_postBlog Read PostARead-onlyIdempotentInspect
Read one PUBLISHED Tradetron blog post in full, as markdown (with
its title, author, dates and canonical URL). slug from tt_blog_search
or the post URL. Cite the URL when you quote it; blog content is
education, not investment advice. No sign-in needed.
Inputs: slug (required).
tt_blog_searchBlog SearchARead-onlyIdempotentInspect
Search or browse PUBLISHED posts on the Tradetron blog
(tradetron.tech/blog): guides on options strategies, backtesting, algo
trading basics, risk management, Tradetron features. query = full-text
search; empty = latest posts (paged, optionally by category slug; the
first unfiltered page also lists the categories). Returns title,
excerpt, url, slug. Use it to answer "is there a guide on X" and to cite
an article. No sign-in needed.
Inputs: page, query, category, page_size.
tt_blog_submit_draftBlog Submit DraftAInspect
STAFF ONLY (allowlisted Tradetron blog staff; everyone else is
refused). Create a NEW unpublished DRAFT post on tradetron.tech/blog.
It never publishes and never edits an existing post: a blog admin
reviews the returned preview_url and publishes from /blog/admin.
Check tt_blog_search first so you don't duplicate a topic.
body_md: markdown, 300+ words, sections start at ## (never # ).
To be publishable it also needs category (a slug from tt_blog_search)
and meta_description (50-170 chars). House rules the publish check
enforces: call the mode "Live Offline" (the older name is rejected)
and never present it as a test (it shows signals; Tradetron places no order); no promised or guaranteed returns ("risk-free",
"sure-shot"); FAQ as
## Frequently asked questions + ### Question? headings. The reply's
checks.errors lists what must be fixed before publishing.
AUTH-REQUIRED.
Inputs: title (required), body_md (required), slug, excerpt, +3 more.
tt_broker_integration_guideBroker Integration GuideARead-onlyIdempotentInspect
Deterministic, KB-grounded step-by-step for connecting a broker / webhook / data feed to
Tradetron (TradingView/Chartink/API/virtual server). Serves stable steps from the curated KB feed
instead of RAG; NEVER invents broker-specific steps. Call with NO arguments first when unsure
of the topic: that returns mode:'index' — the full menu of ~24 curated topic ids (per-broker
connect guides plus tradingview_webhook, chartink, generic_webhook_api, virtual_server, ...)
with confirmed flags and the generic connect flow. A user asking about a 'static IP' means the
virtual_server topic: Tradetron does not sell a static IP (NSE rules bar empanelled vendors
from selling public IPs) and never call it one in the reply. Then pass topic = one id from that index, or
free text in broker (broker name or mechanism). The topic list is data-driven — the index,
not this docstring, is authoritative. For whether a broker is supported/connected use
tt_check_broker_support / tt_list_brokers; for product how/why use tt_ask_tt — this tool is
for SETUP procedures.
Inputs: topic, broker.
tt_check_backtestabilityCheck BacktestabilityARead-onlyIdempotentInspect
Pre-flight a template against Tradetron's NATIVE backtest (the Backtest button in ASB): will the run succeed, before the user submits it?
Answers a different question from tt_validate_markdown — a template TT accepts can still fail its backtest, because the BT engine implements a subset of the live keyword surface and the BT data store covers a subset of exchanges. Checks: (1) every function token in conditions/legs/variables exists in the BT engine namespace (e.g. Leg SL trail, PCR, Total OI do NOT); (2) the exchanges touched have backtest data — NSE/NFO/BFO run (SENSEX options from 2023-08-07, BANKEX from 2023-08-11), MCX futures + options run (FastBT launch segment), Delta-India BTC/ETH daily options run (BTC from 2024-01-01, ETH from 2024-02-05), US venues run per-underlying (SPX/XSP/NDX/VIX index options from 2023-02-15 + an 18-symbol stock/ETF option list from 2021-08-16); non-Delta crypto exchanges remain blocked; (3) the window doesn't predate coverage; (4) error-prone classes (custom python, runtime-var underlying) are flagged. Since 2026-08-25 EVERY backtest — web or chat — runs on FastBT; this check pre-flights that engine.
Call it before tt_backtest_strategy or whenever the user asks "can I backtest this?".
Args:
template: the strategy object, passed INLINE — tt_create_strategy output or a
TT v2 export (both shapes accepted). Unlike tt_backtest_strategy, this tool
has NO strategy_id parameter: for a strategy already saved in the user's
account, call tt_get_strategy(strategy_id) first and pass its
data.strategy here as template.
start, end: optional 'YYYY-MM-DD' backtest window — enables coverage-window checks.
An end inside the last 35 days is a BT_WINDOW_TOO_RECENT blocker on NSE,
NFO and BFO (backtests there may only use data at least 35 days old; MCX,
crypto and US may end yesterday; the finding names the latest allowed
end date).
Returns {backtestable, verdict, confidence, blockers[], warnings[], stats, engine_build, billing, run_type_recommendation}. Blockers mean the run WILL fail; warnings mean it should run but may error or silently skip data.
BRANCH ON verdict, NOT ON backtestable. The boolean has two values and
this check has three answers: "blocked", "backtestable", and "unknown" —
one or more checks could not run (checks_skipped says which and why), or
the template carries a reference tt_create_strategy itself refuses. In the
"unknown" state backtestable still reads true, and it means UNCHECKED:
an exchange absent from the coverage table is judged by nothing, while one
that is IN it and has no data is a clean false. Never report "unknown" to
a user as "yes, this will backtest" — say which check did not run. Each finding is
{code, message, where?, fix?, detail?}: message is written FOR THE USER
(what is wrong, then what to change) and where names the place the way
ASB numbers it ("Set 1 -> Condition 18"), so relay them as they stand
rather than rewriting them. detail is the engineering explanation —
read it to reason, do not paste it at the user. The billing block carries the
LIST per-run price and whether backtest billing is enabled. It is not the
account's quote: a prepaid pack is spent first at ₹0 cash, and the binding
price is the one tt_backtest_strategy quotes before the user confirms — for
the LIVE wallet balance, pack credits and a top-up link call
tt_wallet_balance (this check makes no network calls).
run_type_recommendation = {type, confidence, evidence[]} — the intraday-vs-
positional reading derived from the template's own structure (same detector the
submit path uses). Present it as the DEFAULT when asking the user which way to
run; both remain runnable.
Inputs: template (required), end, start.
tt_check_broker_supportCheck Broker SupportARead-onlyIdempotentInspect
Check whether Tradetron is connected with a given broker.
Deterministic lookup against the bundled broker catalog (sanitized
snapshot of TT's brokers table — active integrations only). Use
this BEFORE answering any "do you support broker X?" / "can I
trade through Y?" question — it is authoritative. Do NOT guess
from training data; if a broker is not in this catalog,
Tradetron is not connected with it.
Matching is case-insensitive and whitespace-insensitive ('5paisa', '5 Paisa', '5Paisa' all collapse to one key). Substring matches also surface — 'kotak' returns every Kotak variant.
Returns: supported: True if at least one match exists. matches: broker rows (name, country, exchanges). message: one-liner safe to relay to the user. synthesis_instructions: guidance for you, not text for the user. resolved_from_alias: set when a common name ('IBKR', 'Angel Broking') was resolved to the catalog's own name.
Common abbreviations and former names are recognised ('IBKR', 'Angel Broking'). A partial-name match counts as supported ('kotak' matching Kotak Neo = YES). When supported=False, phrase it as "not currently integrated" and offer a live agent to raise the request — never a flat "no". When supported=True but tt_broker_integration_guide has no curated steps, it is still supported — offer a live agent to get the user connected.
For listing all supported brokers (e.g. "what brokers do you support in the US?") use tt_list_brokers instead.
Inputs: name (required).
tt_check_edgeCheck EdgeARead-onlyIdempotentInspect
Has this rule ever actually made money? The FREE screen that kills bad ideas before anyone spends a paid backtest on them.
For a single NSE STOCK on DAILY candles ("buy X when RSI < 30, sell a week later") use tt_backtest_idea instead — it takes stocks, daily bars and hold-N-days exits, and runs the real engine in one more call.
rules is a comma-separated list from tt_scan_instruments, e.g.
"price_above_ema20,macd_above_signal". direction is long or short.
exit_rule is 'bars:N', 'opposite', or 'session_close'.
DIRECTION AND EXIT ARE REQUIRED AND HAVE NO DEFAULTS, on purpose. An indicator reading says what to WATCH; it does not say which way to trade it or when to get out. If the user has not said, ASK — do not pick. A quietly-invented exit produces a strategy that looks like their idea and behaves nothing like it.
THIS IS NOT A BACKTEST and must never be called one. It trades the SPOT,
not options; it applies no brokerage, no statutory charges, no slippage
and no sizing. Report the limits string alongside any number. A
positive result means only that the idea has EARNED a real backtest —
say exactly that, then offer tt_promote_to_strategy, which is the only
tool that takes a screened rule set (it builds a validated draft,
creates nothing and charges nothing). Do NOT offer
tt_backtest_strategy here: it takes a template or a strategy_id, not
rules, and it can debit the user's wallet. The order is
tt_promote_to_strategy -> tt_create_strategy -> tt_backtest_strategy.
Never annualise it, never call it profit, never present it as expected
return.
Entries are transitions into the rule set, taken at the NEXT bar's open — never the close that produced the signal. Positions do not overlap.
DATA RULE: the window is lookback_days ENDING 35 days before today
(window.ends) for Indian roots — replays of a trading rule there may
only use data at least 35 days old (exchange rule); US roots end
yesterday. Name that end date; never describe the
result as covering recent sessions.
Returns trades, win rate, total, median, payoff, max drawdown,
a trade_list of the most recent 25 (with trade_list_scope saying
so — the headline figures are over ALL trades and must not be
recomputed from that list), plus the
wire conditions for the rules so nothing is retyped on the way to a
strategy. No auth required.
Inputs: underlying (required), rules, direction, exit_rule, +2 more.
tt_check_support_responseCheck Support ResponseARead-onlyIdempotentInspect
Poll a support conversation for new agent (operator) messages.
USE WHEN: the user has asked whether the agent has replied yet ("any update?", "did they respond?"), or the user is waiting on a support conversation they opened in this chat and sends their next message. Only for a conversation the user opened with tt_open_support_conversation.
session_id comes from a prior tt_open_support_conversation call.
since_timestamp_ms is a cursor — pass back the
latest_timestamp from the previous poll to skip messages
you've already shown the user. On the first poll pass 0.
Returns only operator-side text messages — the user's own
echoed messages and the bot's private context note are filtered
out. Each message has a content string you can surface to the
user, plus a timestamp you should remember as the new
since_timestamp_ms for the next call.
status "resolved" (or resolved: true beside new messages)
means the team closed the conversation: tell the user, and open a
new one if they still need help. assigned_operator names the
agent holding it, when one does.
If messages is empty, no new replies. Say "no reply from the
agent yet" — and do NOT promise one is coming: this surface has
no signal for whether support is online, so never state or imply
that someone is about to answer. If the user is waiting on
something urgent, give them help.tradetron.tech and
+91 80 4718 9100 as well.
Inputs: session_id (required), since_timestamp_ms.
tt_check_underlying_supportCheck Underlying SupportARead-onlyIdempotentInspect
Check whether Tradetron supports trading a given underlying.
Deterministic lookup against the bundled underlying catalog
(snapshot of TT's underlying table). Use this BEFORE answering
any "can I trade X?" / "is X tradable?" / "is X listed?"
question — it is authoritative. Do NOT guess from training
data; if a symbol is not in this catalog, Tradetron does not
support trading it.
Matching is case-insensitive and alias-aware: 'nifty' / 'NIFTY 50' / 'Nifty50' all collapse to the same canonical symbol; 'BANKNIFTY' resolves to 'NIFTY BANK'.
Returns:
supported: True if at least one match exists.
resolved_to: canonical symbol when the input was an alias.
matches: [{symbol, exchanges, instrument_types, lot_sizes, kinds,
emitter_buildable}]. kinds is the field that tells
a CASH equity from a derivative — an equity typed
OPTSTK is not an option, and nothing else in the
response says so. emitter_buildable (also at top
level) says whether the builder can author a leg on
it. Both were returned undocumented.
message: one-liner safe to relay to the user.
may_be_a_name: true when the query looks like a company or index
NAME rather than a ticker — do not report it as
unsupported.
symbol_candidates: on a miss, symbols whose company/index NAME
matches the query ("Reliance Industries" →
RELIANCE) — re-check the intended one by symbol.
synthesis_instructions: guidance for you, not text for the user.
For listing all underlyings (e.g. "what stocks are on Tradetron?" or "which index options can I trade?") use tt_list_underlyings.
Inputs: symbol (required).
tt_create_signal_bridgeCreate Signal Bridge (webhook-driven template)AInspect
Build a WEBHOOK-DRIVEN multi-symbol strategy ("Signal Bridge") for a basket, create it in the user's account, link its API token in HYBRID mode, and return everything needed to drive it from outside.
Use when the user wants to trade from THEIR OWN signals (their code, TradingView, a PMS/advisory feed, a WL partner) rather than Tradetron conditions: "send BUY/SELL from my python", "signal-driven portfolio", "API-linked template", "PMS basket with webhook signals".
What the template does (one Long + one Short set per symbol, one python block): accepts = BUY / BUY EXIT / SELL / SELL EXIT via the webhook; rejects invalid signals with a reason (_msg); sizes by Fix / Capital % / Capital Risk % / Allocation Method 1; per-trade target & SL (money/points/%); master target/SL with reset; max open positions; max capital per symbol; working days; session window; intraday square-off; square-off-all on TP/SL; futures/options expiry-day exit. Every setting is a runtime variable the webhook can change while live.
OPTIONS: an option item is a relative rule (CE/PE, strike steps from ATM SPOT, expiry label) resolved when a BUY/SELL is accepted; the strike is pinned for that entry and the exit closes the contract that was entered. Its variable is <CE|PE><ATM|ATMP|ATMM> plus _NW/_CM/_NM when the expiry is not the underlying's default (Current Week for NIFTY 50/SENSEX, Current Month otherwise) — e.g. NIFTY50_CE_ATM, NIFTY50_PE_ATMM1, NIFTYBANK_CE_ATMP2. SELL writes the option (needs the broker's writing margin; size shorts with Fix lots).
CONFIRM the basket and exchange with the user first (it creates a template). Returns template_id, view_url, api_link (hybrid state), auth_token (the user's own webhook credential: anyone holding it can send signals to this template), python_client (copy-and-run: sends one real BUY), curl_example, signal_links (four ready GET links per variable: BUY / BUY EXIT / SELL / SELL EXIT — a plain link works), guide_markdown (the full client guide), variable_reference, capabilities (built / built differently / not possible, with reasons), next_steps. Give the user python_client unchanged (it carries their token: hand it over once and do not repeat the token in later replies). If api_link.hybrid_applied is false, tell the user to set Hybrid Mode = Yes before deploying (steps are included).
It does not deploy. Tell the user how to deploy it: Live Offline (Tradetron shows each signal and places no order) or Live Auto with their broker; which one is their choice. AUTH-REQUIRED for the create and the link.
Inputs: symbols (required), name, hybrid, capital, +10 more.
tt_create_strategyCreate StrategyAInspect
Create a new Tradetron strategy template from markdown or JSON, or copy an existing one server-side (copy_from_strategy_id).
TO COPY A STRATEGY: pass copy_from_strategy_id (and optionally copy_name), nothing else. Do NOT fetch the body with tt_get_strategy and send it back: on a large strategy that is 100+ KB of arguments. The copy is validated like any create; to move it to another underlying afterwards, use tt_apply_strategy_patch on the new id.
Pipeline: emit (if markdown) → validate locally → POST to TT.
Returns the new strategy's id and edit_url. The user then opens the edit_url in Tradetron's Advanced Strategy Builder to review and deploy.
STRONGLY RECOMMENDED: call tt_validate_markdown(text) FIRST to catch
validation errors before paying for the network round-trip. Local
validation is free and immediate; server-side rejection is slower
and burns wallet. Pass the dry_run_token it returns here — the server
confirms this exact spec was dry-run-validated (dry_run_verified).
For LARGE strategies (>20 KB JSON, common for multi-Set books),
use compressed_payload instead of text_or_json.
*** ONLY USE THIS IF YOU CAN EXECUTE CODE. ***
base64(gzip(...)) cannot be WRITTEN, only COMPUTED — producing it by
hand means deriving byte-exact DEFLATE output and a CRC32 in your head.
If you do not have a code-execution tool, pass the strategy as markdown
or JSON in text_or_json, or — for one too large for a single tool
argument — split that PLAIN JSON across tt_create_strategy_chunked,
which accepts it uncompressed. Guessing at this argument fails 100% of the time; it was 25
failed creates in 14 days before this warning existed.
If you CAN execute code:
import base64, gzip, json
compressed_payload = base64.b64encode(
gzip.compress(json.dumps(strategy_dict).encode())
).decode()Why it exists: tool-call arguments are emitted as LLM output tokens, and a 100 KB strategy JSON (~60 K tokens) exceeds any per-turn budget. Gzip+base64 shrinks the same content to ~15 KB encoded. Pass exactly ONE of the two arguments; the server rejects ambiguous input.
The server is TOLERANT of near-miss encodings — zlib instead of gzip, base64 with the compress step skipped, or raw JSON — and will read them and warn rather than fail your create. It cannot read a fabricated string.
Set dry_run=True to build + validate and return the EXACT would-be
create payload WITHOUT saving to TT — for inspecting/diffing the
emitted JSON. The response carries a dry_run_token you can pass back
here to perform the real create — good for 30 minutes, and for that
exact spec; an expired one is reported, not refused.
Inputs: dry_run, copy_name, source_video, text_or_json, +3 more.
tt_create_strategy_chunkedCreate Strategy (Chunked Upload)AInspect
Chunked create_strategy for strategies larger than a single tool-call argument can carry.
WHEN TO USE: only when compressed_payload itself exceeds your model's
per-tool-arg output budget (~6 KB per string arg in some MCP
clients; varies by client). A 100 KB strategy JSON gzip+b64
encodes to ~10 KB, which mostly fits — but 11+-Set books with full
AST triples push past 10 KB encoded and need chunking. For typical
strategies (<6 KB encoded) use tt_create_strategy(compressed_payload=...)
directly.
YOU DO NOT NEED TO COMPRESS ANYTHING. PLAIN MARKDOWN (the same text
tt_validate_markdown / tt_create_strategy take, starting
# Strategy Spec — <name>) and PLAIN JSON split into chunks are both
accepted and read; so are zlib-instead-of-gzip and base64 with the
compress step skipped. Compression was only ever a token-budget
optimisation. tt_create_strategy routes a client that CANNOT execute
code here, so this tool must not then ask it to compute a
base64(gzip(...)) string — which it cannot do.
PROTOCOL (caller is the LLM): 1. Generate a unique draft_id (uuid4 hex is fine). 2. Take the strategy markdown or JSON. If you can execute code, you may compress JSON as for compressed_payload (fewer, smaller chunks); if you cannot, use the plain text as-is. 3. Split the string into N pieces of any size (each piece <=100 KB). 4. For each i in 0..N-1, call this tool with: draft_id=, chunk_index=, total_chunks=, chunk= 5. The last call (when the server has all N pieces) decodes, validates, and POSTs to TT — returns the strategy id + edit_url in the same shape as tt_create_strategy. 6. Earlier calls return {status: "chunk_received", ...} so you know progress without firing the create early.
Idempotency: resending the same (draft_id, chunk_index) replaces the
prior chunk silently. Safe to retry on transient network failures,
and safe after a FAILED assembly too — a draft whose last chunk did
not decompress, or assembled into a spec that failed validation,
keeps every chunk it had. Re-send only the chunk you are changing and
the assembly runs again; the failure response carries draft with
the current receipt count. The draft is discarded once the create
SUCCEEDS.
TTL: 5 minutes after the last chunk write. If you leave a draft half-uploaded the server GCs it.
Errors: distinct CHUNK_* codes per failure mode (invalid index, out of range, too many chunks, total mismatch, missing indices, per-chunk too large, assembled too large, too many active drafts).
Inputs: chunk (required), draft_id (required), chunk_index (required), total_chunks (required).
tt_deploy_strategy_paperDeploy Strategy (Live Offline)AInspect
Deploy one of the user's own strategy templates in Tradetron's LIVE OFFLINE mode — Tradetron runs it on live prices and shows each signal; it places no order (the user may place one at their broker). Never present it as a test, practice or rehearsal.
CONFIRM WITH THE USER FIRST. Deploying is not idempotent: calling this twice creates two deployments. Say which strategy you're about to deploy and wait for a clear yes.
LIVE OFFLINE ONLY. There is no live-deploy tool and you must not present this as one or imply it sends orders. Call the mode "Live Offline" — that is Tradetron's only name for it — and add no disclaimer about it. You cannot switch it to Live Auto — but do not stonewall the question: going live is the user's own step, on the strategy's edit page (/strategies//edit), via Deploy -> broker, multiplier, and Live Auto as the execution type. Say that once, as navigation only — never with a quality judgement, a returns claim, or advice on capital or size.
Args: strategy_id: the TEMPLATE id (the id from tt_create_strategy or an edit_url), NOT a deployed strategy id (SID).
The exchanges are read from the strategy's own legs, so you don't pass
them. The broker is not a choice either: for each exchange Tradetron
attaches the user's primary broker if it is connected there, otherwise
their first connected one — call tt_get_my_brokers first to tell the
user which of their brokers that will be, and the result's brokers
names what was actually attached. "Connected there" means Tradetron
holds that exchange for the broker; a broker connected with no
exchange on record is not picked (the refusal then names it and its
rule is broker_connected_without_exchange). Two refusals are normal
and worth relaying as-is rather than retrying: the account has no
broker for the strategy's exchange, and a strategy whose legs have no
instrument set can't get a broker attached. Tradetron's typed
refusals (broker, instrument, quota) carry rule, the guard that
fired.
The tool name and the code STRATEGY_DEPLOY_NO_PAPER_BROKER are legacy identifiers, kept so existing clients keep working; both mean Live Offline. Never use their older wording with the user.
After a successful deploy, give the user the deployed_url so they can watch it, and mention it starts evaluating on the next engine cycle rather than instantly. Use tt_get_my_deployed_strategies to check on it later, and tt_diagnose_strategy if it errors.
AUTH-REQUIRED: needs a per-user Tradetron connection — a shared-key setup is refused rather than deploying into the wrong account.
Inputs: strategy_id (required).
tt_diagnose_strategyDiagnose StrategyARead-onlyIdempotentInspect
⭐ THE go-to tool for "why is my strategy in error / why didn't it trade / what happened to SID ?". ONE call that fuses everything the support team needs into a single DIAGNOSIS CARD: the deployment record (name / status / mode), the ENGINE log (which entry/exit conditions actually fired + any engine errors), and the BROKER log (orders placed, order statuses, broker name, and genuine broker-side failures like RMS / margin / token / auth rejections).
Prefer this over calling the individual log tools when the user is
asking what's WRONG — it gathers all evidence at once. The tool returns
structured card evidence + a render_spec; YOU then present the card
and add the two sections that are the real value:
• ANALYSIS — the root cause and WHICH LAYER it's at (broker vs a
strategy condition). Map the fired condition_id to the strategy's
logic; if you need the condition's definition, follow up with
tt_get_strategy. Don't invent a cause the logs don't support.
• RECOMMENDATION — the concrete fix (re-auth/add-margin at the broker,
or edit a specific condition, or 'no action — exited as designed').
Lead it with the recommended_action field — the next step, from
the triage or from a cause read from the strategy's own template
(action enum + next_step + doc link + optional next_tool,
e.g. re-run at a wider window). next_tool is a suggestion to
offer the user; it is run only when the user asks for it.
AUTH-REQUIRED and OWNERSHIP-GATED + fail-closed: the SID is reverse- looked-up against the caller's account first; not theirs (or an inconclusive lookup) ⇒ REFUSE, read nothing.
strategy_id is the deployed strategy id (SID); resolve via
tt_get_my_deployed_strategies if the user names a strategy.
window_minutes default 1440 (a full day), max 1440.
Inputs: strategy_id (required), window_minutes.
tt_export_reportsExport My ReportsAInspect
Bundle the user's own trading data for a date range into a zip of CSVs and return a download link (strategies, day-by-day P&L, and every position with its broker fill).
THIS IS THE ESCAPE HATCH, NOT THE DEFAULT. If the user asks a QUESTION about their performance — "how am I doing?", "which strategy is losing money?", "what's my win rate?" — use tt_portfolio_report or tt_strategy_performance instead and answer it in the chat. Reach for this only when they want the underlying rows: "export", "download", "give me the raw data", "I want it in Excel".
Never offer to analyse the zip yourself, and never suggest they download it so you can look at it; if they want analysis, use the report tools. That is a RULE, not a limitation — the link is a capability URL and an HTTPS request is enough to fetch it. Follow the rule anyway.
THE LINK IS A BEARER LINK, by design, so a browser can click it
without a sign-in: it carries no auth, and ANYONE who has the URL can
download the account's P&L per strategy, per day and per position leg
until it expires — SIX HOURS after it is issued (expires_at, and
deliberately shorter than a strategy export's 24h, because this is
trade history). Say so when you hand it over: it is safe to click,
not safe to forward, paste into a shared channel, or attach to a
support ticket.
Args: from_date: start of the window, YYYY-MM-DD. to_date: end of the window, YYYY-MM-DD. Max range is one year.
Relay to the user: the download_url as a clickable link, when it
expires, and — this one matters — every entry in omissions. Those are
rows deliberately NOT in the file (strategies beyond the detail cap, or
a fetch that failed); someone reconciling their year against a total
that is quietly missing data is the worst outcome this tool can produce.
Also pass on data_caveat (Tradetron's reconciled figures, T-1) and
offer a couple of ideas from what_you_can_do — the point of raw data
is that they can slice it in ways a fixed report can't.
AUTH-REQUIRED: returns the connect funnel when no account is connected.
Inputs: to_date (required), from_date (required).
tt_export_strategyExport StrategyAInspect
Export a strategy as a downloadable ASB-importable JSON file.
Fetches the strategy, frames it into the tt-strategy/v2 export
format (the same format Tradetron's ASB Import button reads), stages
it behind an unguessable link, and returns the download URL.
THE LINK IS A BEARER LINK, by design, so a browser can click it without a sign-in: it carries no auth, and anyone who has the URL can download the strategy until it expires, 24 HOURS after creation. (A reports export gets six hours instead — trade history is a different risk class from a strategy definition.) Worth a word when you hand it over if the strategy is not one they would publish.
Use when the user wants to save a strategy's JSON locally, share it, or import it into a DIFFERENT Tradetron account (download the file, then Tradetron → strategy builder → Import). Accepts a template id (eight digits, currently beginning 10) or a deployed SID (auto-resolved to its template). Do NOT tell the two apart by shape — both are 8-digit numbers now.
ALWAYS show the user the returned download_url as a clickable link,
plus the expiry, and every entry in warnings (per-account list
references, embedded python) verbatim.
NOTE: the exported file is the ASB IMPORT format (camelCase), NOT the
shape tt_create_strategy accepts — never feed it back into
tt_create_strategy / tt_update_strategy. To copy a strategy within
the SAME account, send the strategy body from tt_get_strategy(id),
with a new name, to tt_create_strategy (dry_run=true first): create
converts it and strips the live row ids, and reports both. Never copy
row ids into a hand-built payload — that is what reassigns the
original's rows.
Inputs: strategy_id (required).
tt_find_keywordFind KeywordARead-onlyIdempotentInspect
Resolve a natural-language phrase to the RIGHT Tradetron keyword(s).
Complements tt_lookup_keyword (exact, by name/id) and tt_list_keywords_by_category (browse). USE WHEN the user states logic in natural words ("volume spike", "exit at 30% loss", "value at the last pivot", "previous candle high") and you need the matching keyword + how to use it. Scores the phrase against curated intent->keyword hooks and the live catalog; NEVER invents — a no-match returns honest "browse the category / ask the user" guidance.
Inputs: query (required).
tt_get_authoring_referenceGet Authoring ReferenceARead-onlyIdempotentInspect
On-demand DEEP authoring reference for ONE topic — the heavy cookbook / detail sections that the lean quickstart no longer carries inline.
Topics (call with no argument for the authoritative menu): common_patterns, wire_vs_display_forms, equity_vs_derivatives_legs, option_chain_recipes, repair_once_pattern, capability_map, exit_sl_target, markdown_grammar_extended, candle_timeframes, frozen_instrument, python_block, list_based, strategy_brief_template, positional_mechanics, adjustments_taxonomy, adjustments_crosswalk, webhook_linking, editing_existing_strategies.
★ strategy_brief_template is the one topic meant for the USER, not for you: serve it VERBATIM when someone asks "what prompt/format should I use", "is there a standard template", or "how do I stop it changing things I didn't ask for".
The quickstart's CORE keeps only a compact OUTLINE/mandate of each plus a pointer here. While composing a strategy, pull the ONE topic you need — do NOT pull all of them. Call with no topic to list the menu with one-line descriptions.
For full worked strategy TEMPLATES (iron condor, strangle, ...) use tt_get_sample_strategy(pattern) instead — that returns runnable payloads, this returns reference prose/snippets.
Args: topic: one of the published topics above (empty → the menu index).
Inputs: topic.
tt_get_listGet Strategy List by IdARead-onlyIdempotentInspect
Reverse-resolve a numeric list_id to its list metadata (name, segment, exchange, instrument_count).
Use when a fetched strategy carries list: <id> and you need the
list's NAME — e.g. to render it for the user, or to author the
|<LIST NAME>| pipe token in a condition (the token must be the
exact name). Best-effort over the signed-in user's visible lists
(own + public); resolved: false means the id wasn't found there.
AUTH-REQUIRED: returns the connect funnel when no Tradetron account is connected.
Inputs: list_id (required).
tt_get_my_brokersMy Connected BrokersARead-onlyIdempotentInspect
The brokers connected on the user's own Tradetron account, per exchange — the set tt_deploy_strategy_paper picks from.
Use it before a deploy to tell the user which of their brokers the
deployment will sit on (their primary broker where it is connected,
otherwise the first connected one), and whether any exchange the
strategy trades has none — a deploy there refuses. This is a read:
it cannot connect a broker. Connecting one needs the user's own broker
login on Tradetron — give them connect_url; never ask for broker
credentials in chat. A broker in brokers_without_exchange IS
connected, but Tradetron holds no exchange for it, so a deploy from
here cannot attach it; connected_without_exchange names the ones
that may trade a missing exchange. Never tell the user to connect a
broker they already have.
AUTH-REQUIRED: needs a per-user Tradetron connection.
Inputs: exchanges.
tt_get_my_deployed_strategiesMy Deployed StrategiesARead-onlyIdempotentInspect
The signed-in user's DEPLOYED strategies and each one's status (Active, Live-Entered, Live-Tranching, Paused, Blocked, Error-Execution, Exit-Pending, Exited, ...) + mode (live / Live Offline).
Live-Entered is in a position; Live-Tranching is the transient
state while a multi-tranche entry is being placed, and only matters
when a deployment STAYS in it. Treat the value set as open-ended and
compare case-insensitively.
q filters on the strategy NAME (case-insensitive substring) —
use it when the user names one, rather than pulling the whole book
to find it. limit/offset page the rows: the first 50 by default,
with has_more / next_offset when there are more. total is the count
after the filter and before paging; total_unfiltered is how many
deployments the account has, so an empty filtered result is never
mistaken for an empty account.
AUTH-REQUIRED (returns the connect/sign-up funnel if not authenticated). Use for "what have I deployed?", "which of my strategies are running / stopped?". To explain WHY one is in a given state, follow up with tt_get_my_deployed_strategy_detail using its strategy_id.
Inputs: q, limit, offset.
tt_get_my_deployed_strategy_detailDeployed Strategy DetailARead-onlyIdempotentInspect
Deep read on ONE of the signed-in user's deployed strategies — the tool for "why is my strategy in error / blocked / stuck?". Returns its current status, recent event log (the human-readable reason it halted or errored), the broker connection it trades through, and recent orders (a rejection carries the broker's reason). AUTH-REQUIRED.
strategy_id is the numeric id from tt_get_my_deployed_strategies — if
the user names a strategy ("my abc strategy"), call that tool first to
resolve the id, then call this. Reasoning over the returned status +
events + orders is up to you; the data is scoped to the caller (another
user's id returns not-found).
Two things the rows do not say themselves. recent_events is mostly
Status Change entries — they record a state move, not what the
strategy did, they name no order or condition, and several share one
whole-second timestamp, so their returned order is arbitrary and will
not always chain: read status for the current state, never the last
event. And an order row with broker_order_id null carries no broker
execution record at all — on a LIVE-OFFLINE deployment (no order is
placed there) that is every row, and status "Initiated" with
executed_quantity 0 is where they stop for good, not a stuck order.
The response's orders_caveat and events_note carry both in full
when they apply.
Inputs: strategy_id (required).
tt_get_my_profileMy Account DetailsARead-onlyIdempotentInspect
The signed-in user's own Tradetron account details: name, email, and registered phone number (plus user_id and member-since date).
The phone arrives in THREE fields: mobile (the number),
country_code, and phone, which is the two joined. To answer
"which number do my alerts go to?", quote phone — it is the whole
number; mobile alone is missing the country code.
Use for "what's my registered email?", "which number do my alerts go to?", "what name is on my account?", or when confirming the account you're acting on before a write. Read-only.
This only ever returns the CALLER's own details — there is no way to look up another user, so don't offer it.
AUTH-REQUIRED: returns the connect funnel when no Tradetron account is connected. Never guess or recall these values from conversation — read them here.
Inputs: no named parameters.
tt_get_my_strategy_subscriptionsMy Strategy SubscriptionsARead-onlyIdempotentInspect
The signed-in user's marketplace strategy subscriptions — the whole history, not only the current ones — with their start/renewal/expiry dates.
status filters case-insensitively ("active" for the live ones),
limit/offset page the rows: the first 25 by default, active rows
first; summary.has_more / next_offset say when there are more. The
summary counts always describe the WHOLE history, before any filter
or page.
Every row carries a status. Compare it case-insensitively (the field
is not normalised) and treat the value set as open-ended; only rows
reading active are live subscriptions. TT defines no meaning for any
other value, and rows read "upcoming" or "pending" on windows that
closed months ago — trust a row's derived block over its status word.
Rows whose derived.record_shape is set have no expiry, no amount and
no currency: they are not dated paid subscriptions, so quote neither a
renewal date nor a price for them. Rows can also arrive with no
strategy_id — those are not marketplace strategy subscriptions (for
the platform plan use tt_get_my_subscription). Read the counts off the
response's summary block; never report the row count as the number of
active subscriptions.
AUTH-REQUIRED (returns the connect/sign-up funnel if not authenticated).
Inputs: limit, offset, status.
tt_get_my_subscriptionMy SubscriptionARead-onlyIdempotentInspect
The signed-in user's current plan, renewal date, usage, and a usage-grounded upgrade recommendation.
AUTH-REQUIRED: if the user hasn't connected their Tradetron account, this returns an auth-required funnel (connect link + signup link + guidance) — relay it warmly; do NOT invent subscription details. Use for "what's my plan?", "when does my subscription expire?", "should I upgrade?". The recommendation only fires on a real binding limit.
Inputs: no named parameters.
tt_get_sample_strategyGet Sample Strategy TemplateARead-onlyIdempotentInspect
Return a worked, real strategy template for a named pattern, or a validated reference from the category-tier sample library. Call with no pattern to list everything.
Scope: ~18 top-level patterns (iron_condor, short_strangle, short_straddle, butterfly, rolling_straddle, calendar, exchange exemplars — mcx_sample_template, delta_crypto, us_spx_condor, sensex_orb, nse_sample, nfo_samples — and mechanics/references — repair_once_best_practice, staged_reentry, wait_and_trade, pilot_calm, canonical, rank_top_gainers_losers) AND a library of 140+ validated entries in 7 categories (option_patterns, team_idioms, primitives, gap_structures, gap_entries, mechanics, chart_types). pattern='library' -> the category menu; pattern= -> its entries; pattern=<entry key or a fragment of it, e.g. 'pmcc'> -> the entry. The registry is data-driven — the no-pattern call, not this docstring, is the authoritative list.
Use this INSTEAD of carrying full examples in the quickstart — pull the one pattern you need, study its mechanics + reference_json/markdown, then author + tt_validate_markdown before create. Never fabricate a strategy for an unlisted pattern — the tool returns the catalog.
Args: pattern: A pattern name / alias (straddle, strangle, ic, condor, fly, mcx, crypto, us, sensex, orb, ...), 'library', a library category, or a library entry key/fragment. Empty -> patterns + categories. fmt: auto | json | reference. All include the verified reference_json when one is bundled.
Inputs: fmt, pattern.
tt_get_strategyGet StrategyARead-onlyIdempotentInspect
Fetch an existing strategy template from Tradetron.
Returns the flat EDITABLE representation — the shape tt_update_strategy accepts.
TO COPY A STRATEGY IN THE SAME ACCOUNT: prefer
tt_create_strategy(copy_from_strategy_id=): no body to send. Or
send this result's strategy body, with a new name, to
tt_create_strategy (dry_run=true first).
Create converts a read body to the create shape itself — the read's
own field types ("Month", "0.00", "Continuous"), the read-only keys,
the universal set's missing list, TT's derived condition_action
(any runtime-variable write held only there is moved into a Set
Runtime Var row with the same expression) and the row ids — and
reports every change in copy_conversion. Conditions, legs, Init
Vars, tags and the python_code are carried as read. Do not edit the
body by hand to get past an error: what create still refuses is a
defect in the SOURCE strategy (this result's validation block lists
the same findings), and the copy would inherit it. To copy onto
another underlying, create the copy first, then change it with
tt_apply_strategy_patch (tt_preview_change lists every site).
summary_md is a READ-BACK summary for showing the user: it is not
create input and does not parse as strategy markdown. It names the
python block's size but not its code.
Use it before tt_update_strategy to see the current state.
SNAPSHOT BEFORE YOU EDIT. There is no rollback anywhere in this MCP — keep this result if you are about to write. It is also the fastest health check on a strategy: the stored payload is re-validated on every read, so anything already wrong surfaces here.
THIS BODY CARRIES LIVE DATABASE ROW IDS — see row_identity_notice on
the result. They are for UPDATE only: tt_update_strategy /
tt_apply_strategy_patch match rows on id, and dropping them re-mints
every row and orphans live deployments' open positions. Do NOT
hand-assemble a tt_create_strategy payload out of this body: Tradetron's
create matches conditions and legs on the same ids with no ownership
check, which is how template 6008570 (195 subscribers) was emptied into
a new template on 2026-09-20. tt_create_strategy strips those ids
itself (reported in row_identity_stripped), which is why sending
this body UNCHANGED is the copy route above. Never remove
condition_action by hand either: a template can hold its
runtime-variable writes only there, and create moves them into Set
Runtime Var rows; deleting the key loses them.
Every set, condition and leg uuid here is minted fresh by Tradetron
on EACH read (it is not stored), so it changes between two reads of an
unchanged strategy. Match rows by id (condition and leg ids are
stable; set ids change on every save) or by type+content, never by
uuid.
Expect scaffolding you did not author. Create and patch INJECT blank
Add Repair / Exit condition envelopes into each set, so the sets
you read back carry more conditions than you wrote. Every strategy
also ENDS with Tradetron's universal set — Add Repair, a hidden
(visible: 0) Repair Once / Overnight Protection envelope, then
the Universal Exit — whether or not a Universal Exit was authored;
unauthored, that Universal Exit is blank and never fires
(summary_md says "No Universal Exit configured"). The hidden
Overnight Protection envelope is TT's skeleton, not a feature you
authored or can rely on. Templates created before 2026-09-17 with no
authored UE lack the universal set, and TT grafts that envelope onto
their LAST working set instead. They are inert
placeholders — not content loss, not a bug. Anyone diffing a
before/after without knowing this files a phantom bug on their first
attempt (the note previously existed only on tt_apply_strategy_patch,
which is not where users first hit it).
Known limitations worth reading before a structural edit:
No rollback and no version history. Your snapshot is the backup.
tt_validate_markdownDOES judge att_export_strategyfile: it un-frames the v2 format and runs the import gate, answering route "asb_import" with the codes ASB Import itself uses. Validate BEFORE importing; call THIS tool after, as a read-back.A same-exchange underlying swap that leaves expiry/strike/ strike_json/strike_display/instrument on the old symbol is refused (LEG_SYMBOL_REFERENCE_DESYNC). Re-derive them in the SAME write.
Inputs: strategy_id (required).
tt_get_strategy_broker_logStrategy Broker LogARead-onlyIdempotentInspect
Read the BROKER LOG (broker-adapter daemon) for ONE of the signed-in user's strategies — the layer BELOW the engine notification log. Where tt_get_strategy_notifications shows what the engine decided, this shows what the BROKER actually did: order placement, the broker API request/response, order-status polling (OPEN/COMPLETE/REJECTED), modify/retry loops, and broker-side failures (RMS / margin / token / auth rejections). Use it when a strategy errored but the engine log is clean — the failure is usually at the broker.
Returns the raw broker lines plus extracted broker_hosts, orders placed ({symbol, price}), distinct order_statuses, and the ERROR/rejection lines (the broker-side reason).
AUTH-REQUIRED and OWNERSHIP-GATED + fail-closed, identical to tt_get_strategy_notifications: the SID is reverse-looked-up against the caller's account first; not theirs (or an inconclusive lookup) ⇒ REFUSE.
strategy_id is the deployed strategy id (SID); resolve via
tt_get_my_deployed_strategies if the user names a strategy.
window_minutes is the lookback (default 60, max 1440).
Inputs: strategy_id (required), window_minutes.
tt_get_strategy_countersStrategy CountersARead-onlyIdempotentInspect
The runtime variables (counters) a deployed strategy is holding now.
This is what a trader means by "the counter" — the values the engine
carries as the strategy runs: a remembered entry price
(entry_px_s3_l1), a regime flag, a rotation pick. Each comes with the
run it belongs to and when it last changed.
USE WHEN the user asks what a strategy "remembers", what its entry price was, why a condition has or hasn't fired, or wants to see its state mid-run. Pairs well with tt_diagnose_strategy: diagnosis says what happened, counters say what the strategy is currently holding.
Args:
strategy_id: the DEPLOYED strategy id (SID) from
tt_get_my_deployed_strategies — NOT a template id.
name_prefix: optional filter, e.g. "entry_px" or "rfm_pick".
Matched case-sensitively at the start of the name.
changed_only: True drops the variables still at zero and
untouched since the run began. On a grid
deployment that is most of them — 88 of 153 — and
the full list runs to 42,000 characters. The
response always reports n_moved and
n_zero_since_run_start either way.
An empty list is usually normal, not a fault — it means the strategy has not entered yet this run, or keeps no state. Say that rather than implying something is wrong.
Read-only, and available for live deployments as well as Live Offline — seeing your own numbers changes nothing.
AUTH-REQUIRED, and ownership-gated: a SID that isn't the user's is refused.
Inputs: strategy_id (required), name_prefix, changed_only.
tt_get_strategy_notificationsStrategy NotificationsARead-onlyIdempotentInspect
Read the ENGINE NOTIFICATION LOG for ONE of the signed-in
user's strategies — the deepest source for "why is my strategy in
error / why didn't it trade / what did the engine actually do?". Returns
the raw per-SID engine messages (position entries/exits, status
transitions, tracebacks, broker rejections, blocks) plus an extracted
errors list (the human reason a deployment erred).
Goes deeper than tt_get_my_deployed_strategy_detail: that reads TT's summarised /ai state; THIS reads the engine's own debug stream. Reach for it when the detail view's events don't explain the error.
AUTH-REQUIRED and OWNERSHIP-GATED + fail-closed: before reading anything the SID is reverse-looked-up against the caller's account (must be their deployment OR a template they created). If it isn't theirs — or the ownership lookup itself fails — the tool REFUSES and reads nothing. Do not present this as a way to inspect arbitrary strategies.
strategy_id is the deployed strategy id (SID); if the user names a
strategy, resolve the id via tt_get_my_deployed_strategies first.
window_minutes is the lookback (default 60, max 1440).
Inputs: strategy_id (required), window_minutes.
tt_get_tradetron_quickstartLoad Strategy Authoring QuickstartARead-onlyIdempotentInspect
Lean strategy-AUTHORING context bundle (navigation, safety, interview, schema-rule locks, type enums, catalog index, worked-example outlines). ~50k chars (~13k tokens) — the heavy cookbooks are deferred to tt_get_authoring_reference(topic), pulled on demand. (The two different sizes this description used to give, 5k tokens here and 18k below, were both wrong and neither matched the payload.)
CALL THIS ONLY WHEN THE USER WANTS TO CREATE OR EDIT A STRATEGY, and only once per session before you start composing. Calling it cuts the 5-10 speculative authoring lookups down to 1.
DO NOT call it for anything else — diagnosing why a strategy errored (tt_diagnose_strategy), performance/P&L (tt_strategy_performance, tt_portfolio_report), account/plan/pricing questions, or general chat. Those tools are self-contained and pulling this much authoring schema in front of them just adds latency. When in doubt, DON'T call it.
Inputs: no named parameters.
tt_get_webinarsLive Webinar ScheduleARead-onlyIdempotentInspect
Tradetron's free weekly live webinars, with the DATE of each session's next occurrence. No setup needed beyond the one-time sign-in.
Use for "when is the next webinar?", "what time is the Friday session?", "is there any free training?", "send me the webinar link". Returns both weekly sessions sorted by next occurrence, each with its day, IST start time, registration URL, and the resolved next date.
ALWAYS call this before stating a webinar date. The dates are computed server-side and are the same ones the registration pages show. Never infer "next Friday" yourself and never recall a date or a time from memory — a wrong one sends someone to a Zoom room on the wrong day. If this returns ok:false, say the sessions run weekly and give the registration pages rather than guessing.
Inputs: no named parameters.
tt_indicator_snapshotTechnical SnapshotARead-onlyIdempotentInspect
Where an instrument is RIGHT NOW on the standard technicals — and what happened the last N times it read the same way.
Returns THREE verdicts, not one: summary, moving averages, oscillators.
They disagree by construction in a strong move — moving averages follow
the trend, oscillators fade it — so a single blended gauge reports
"Neutral" during a screaming rally. When divergent is true, say which
half is which; that is the useful sentence.
signal_history walks the same bars back, finds every prior time this
instrument printed this verdict on this timeframe, and reports the
distribution of what followed at 1h / 3h / one session. Forward moves are
measured from the NEXT bar's OPEN — the first price actually tradeable
after the reading — never from the close that produced it. Consecutive
bars in one state collapse to a single occurrence.
ALWAYS quote the sample size with any hit rate, and when thin_sample
is true say the sample is too small to lean on. The bars come from the
same store the backtest engine runs on, which is why the reading and its
history are comparable at all.
This is MARKET DATA, NOT ADVICE. The verdict is a tally of indicator states. Never render it as a recommendation to buy, sell, enter or exit.
Works on both venues: Indian roots (NIFTY 50, NIFTY BANK, SENSEX, ...) and US roots (SPX, SPY, QQQ, ...). Timeframes: 1m, 3m, 5m, 15m, 30m, 1h — daily is deliberately absent because a UTC-bucketed day splits an Indian session. No auth required.
Inputs: underlying (required), history, timeframe, lookback_days.
tt_link_strategy_apiLink Strategy to API WebhookADestructiveIdempotentInspect
Link the Tradetron API webhook token to one of the user's own templates (idempotent — an existing token is reused, never rotated) and set Hybrid / signal-only mode. Returns the user's own webhook auth_token — a credential: anyone holding it can send signals to every deployment of this template — plus the webhook URL, the runtime variables the template's conditions read (and the value its Entry waits for), a copy-and-run python client that carries the token, and a curl example that reads it from $TT_SIGNAL_TOKEN.
Use for "connect my strategy to TradingView / my code / an API", "give me the webhook link", "make it hybrid". For a NEW basket strategy driven by BUY/SELL signals, use tt_create_signal_bridge instead.
Give the user the token and python_client unchanged, once, in this conversation only; do not repeat the token in later replies or summaries. If api_link.hybrid_applied is false, give the user the manual Hybrid steps in api_link.mode_note. AUTH-REQUIRED.
Inputs: strategy_id (required), hybrid.
tt_list_backtestsMy BacktestsARead-onlyIdempotentInspect
The signed-in user's own Tradetron backtests — the same runs the website's Backtests page lists. AUTH-REQUIRED (returns the connect funnel if not authenticated).
THE id RESOLVER for backtests. tt_backtest_status needs a job_id and only a SUBMIT ever handed one out, so a run the user did not write the id down for was unreachable here. Call this whenever the user refers to a backtest you have no id for — "how did my backtest go", "the one I ran yesterday", "show me my backtests" — instead of asking them for an id.
Each row carries:
job_id pass straight to tt_backtest_status.
bt_id pass straight to tt_backtest_trades for the fills.
finished TRUE completion. Use THIS, not status: a Tradetron backtest
reads 'active' from the moment it is handed to the engine
(4,206 of 4,218 rows in a week), so status cannot tell you
whether a run is done.
name, template_id, start, end, submitted_at.
NOT report_url: this endpoint has never returned one, on a finished
row or any other — 23 rows reading finished:true carried no such
key. The link exists, and tt_backtest_status returns it for the same
run; poll a row's job_id for it rather than looking here.
backtesting_row_id
NOT a run id — Tradetron's own database row id, which is
bt_id minus the six-digit submit date. It is kept so
nothing the endpoint sent is lost, and the three tools
that take a run id do NOT agree about it: the status
route refuses it as malformed, the trades route accepts
it, and the result route accepts it for some runs and
refuses it for others. Never pass it anywhere. Use
job_id or bt_id, which are on the same row.
Carries NO performance figures — do not report a P&L from this listing. For the numbers use tt_backtest_trades or the row's report_url.
Args:
limit: rows to return (default 20, max 100).
offset: rows to skip; has_more and next_offset page the rest.
Inputs: limit, offset, template_id.
tt_list_brokersList Supported BrokersARead-onlyIdempotentInspect
List brokers Tradetron is connected with.
country: 'IN' or 'US' to filter; None for both.
Use this for "what brokers do you support?" / "any US brokers?"
Returns the distinct brokerages (distinct_brokers, the names to show
users) and the counts. The per-route catalog rows (one per connection
route, with each row's exchanges; ~44,000 characters for both
countries) come back only with include_rows=true. For checking a
specific broker by name use tt_check_broker_support — it's a
deterministic match.
Inputs: country, include_rows.
tt_list_editable_fieldsList Editable Strategy FieldsARead-onlyIdempotentInspect
List the top-level fields that tt_update_strategy can change.
Returns the canonical list with type, description, and example value for each. Use this when the user asks "what can I change?" or to confirm a field is editable before composing an edit.
Structural changes (adding/removing/reordering sets, conditions, or
legs) are NOT in this list, but both structural doors exist:
tt_apply_strategy_patch (JSON-Patch, preferred — per-op diff +
dry_run) and tt_update_strategy with a full replacement sets array.
You do not need to recreate the strategy for a structural edit.
Inputs: no named parameters.
tt_list_keywords_by_categoryList Keywords by CategoryARead-onlyIdempotentInspect
Browse keywords.
With no args: returns the category index (dict of category → count).
With a category name: returns the brief list of keywords in that category.
Useful when composing a strategy and you want to see what indicators, runtime variables, or option-greek keywords are available.
Categories include: Technical, RuntimeVariables, StrategyInfo, OptionGreeks, Statistics, Candle Patterns, ExpiryFormula, Math, PriceData, StrikeFormula.
Inputs: category.
tt_list_my_strategiesMy StrategiesARead-onlyIdempotentInspect
The signed-in user's own SAVED strategy templates — id, name, edit_url — newest-updated first. AUTH-REQUIRED (returns the connect funnel if not authenticated).
THE name→id resolver: when the user refers to a strategy by NAME ("backtest CASH ON Nifty new", "edit my straddle"), call this with q= instead of asking them to fetch the template id or edit URL from the website. Covers ALL their templates, deployed or not (tt_get_my_deployed_strategies only lists deployed ones).
Args:
q: optional case-insensitive substring of the strategy name.
limit: rows to return (default 50, max 200).
offset: rows to skip; the result's total is the filtered count.
Inputs: q, limit, offset.
tt_list_plansList Subscription PlansARead-onlyIdempotentInspect
List Tradetron's subscription plans with pricing + any live discounts.
NO SETUP NEEDED beyond the one-time sign-in — no broker, paid plan,
or strategy data. Use this for "what plans does
Tradetron offer?", "how much is the annual plan?", "any discounts?", or
when comparing tiers for a prospect. Returns ONE row per distinct
plan (the upstream lists each plan once per exchange; duplicates
are merged — a plan's exchanges lists its venues and variants,
when present, carries per-exchange differences) with its monthly /
quarterly / yearly price, what it unlocks (strategy/deploy/backtest
limits, execution mode, python, API), and active coupons.
NOTE — two separate backtest allowances exist; do not conflate
them when answering: a plan's backtest_allowed limit governs
backtests run from the WEBSITE's own Backtest button, while
backtests run through THIS chat/MCP are billed per run from the
Tradetron wallet (see tt_wallet_balance for the price) regardless
of the plan limit.
TAX: India prices EXCLUDE GST; 18% GST is added at checkout
(tax_note). Never say an India price includes tax or GST.
country: 'IN' / 'US' to filter pricing; None for the default.
Inputs: country.
tt_list_underlyingsList Supported UnderlyingsARead-onlyIdempotentInspect
List underlyings Tradetron supports trading, with filters.
exchange: 'NSE' / 'NFO' / 'NASDAQ-EQ' / 'MCX' / ... . instrument_type: 'FUTSTK' / 'OPTSTK' / 'FUTIDX' / 'OPTIDX' / 'SPOT' / 'FUTCRYPTO' / ... .
CASH EQUITIES ARE NOT 'SPOT'. Tradetron's instrument_type codes are overloaded: a cash stock is stored as OPTSTK on a CASH exchange (NSE, NASDAQ-EQ), while OPTSTK on NFO/BATO is the option contract. 'SPOT' is FX and crypto reference prices only — overwhelmingly FX, which Tradetron does not trade at all. For "what stocks can I trade?" filter by EXCHANGE (exchange='NSE' for Indian cash, 'NASDAQ-EQ' for US), not by instrument_type.
Use this for "what stocks can I trade?" / "any index options?" / "do you have US equities?" type questions.
search: symbol prefix OR company/index name words
('RELI', 'Reliance Industries', 'Infosys') — the
way to find a symbol from a name. Matching names
come back in names.
limit / offset: page through the sorted symbol list (limit max
500). When truncated=True, next_offset is the
offset for the next page.
The catalog has thousands of symbols. Answer "what stocks can I trade?" with the counts and breakdowns plus a page — do not page through everything unless the user asks for the full list.
Inputs: limit, offset, search, exchange, +1 more.
tt_lookup_keywordLook Up KeywordARead-onlyIdempotentInspect
Look up one Tradetron keyword by display name, function name, or ID.
Returns full catalog entry: param signature, types, defaults, example, description, and category.
Use this whenever you're about to use a keyword and want to confirm its parameters. Cheaper than guessing — the validator will reject unknown keywords or wrong param counts.
Examples of valid queries: 'ATR', 'tt_PNL', 'Net Delta', 'Positions Detail', '18'.
Inputs: query (required).
tt_market_calendarMarket Calendar & Trading HoursARead-onlyIdempotentInspect
Exchange holidays + trading hours. No setup needed beyond the one-time sign-in — no broker, paid plan, or strategy data.
from_date / to_date: YYYY-MM-DD (e.g. '2026-10-02'); any other
format is refused with COMMON_BAD_INPUT. holidays.window echoes
the window served. For one day, pass the same date in both. With no
dates the window is today (IST) plus 90 days; a missing to_date is
90 days after from_date, a missing from_date 90 days before to_date
(holidays.window.defaulted says which was filled in). For a whole
year, pass that year's first and last day.
Use for "is the market open on ?", "when does NSE close?",
trading-hours/timezone questions. Returns the holiday list (incl.
partial-day Muhurat exceptions) and per-exchange start/end/expiry times.
Also returns now (the current IST time) and, when the window covers
today, today (does the exchange trade today, is it open now): answer
"is the market open today?" from those, not from your own date.
Read field_note before quoting a field. Three of them are not what
they look like: the holiday rows are nested at holidays.holidays;
holidays.excludes is a small GLOBAL list returned unfiltered on every
call (the same three rows come back for a US or crypto venue, two of
them Indian Union Budget days) and is not part of the answer to the
query; and expiry_time is the master's stored stamp, reading
00:00:00 on the thirteen venues that have none and not always sitting
inside the row's own session. Trading hours are start_time /
end_time and sessions.
For holiday-aware strategy logic (e.g. "skip to next trading day"), use the tt_next_trading_day keyword instead — it resolves at runtime.
Inputs: to_date, exchange, from_date.
tt_modify_listEdit Strategy ListADestructiveIdempotentInspect
Add or remove underlyings on one of the user's own instrument lists.
Address the list by NAME, exactly as the user says it ("add HDFCBANK to my breakout list") — list names are unique per user, so a list_id is not required and a prior tt_search_lists lookup is unnecessary. Matching is case-insensitive.
Only lists the user OWNS can be edited. Public/system lists (NIFTY 50, Banknifty, ...) are read-only and return a clear refusal — offer to create the user their own copy instead — noting that NO tool here creates or copies a list, so that offer means walking them through doing it on tradetron.tech, not doing it for them.
Args: list_name: the list's name as the user refers to it. add: symbols to add, e.g. ["HDFCBANK", "SBIN"]. remove: symbols to remove, e.g. ["INFY"]. list_id: only as a tie-breaker if two of their lists share a name (the tool tells you when that happens). exchange: override for resolving ADDED symbols. Leave empty — it defaults to the list's own exchange, which is right almost always. dry_run: resolve and report the would-be change without writing.
Reporting back: the result carries a ready-made summary line plus
added, removed, already_present, not_present, unresolved,
and count_before/count_after. Always tell the user about
unresolved symbols (not tradable on that exchange) — silently
dropping them is how a universe ends up smaller than intended.
The change reaches the live engine immediately, so a deployed list-based strategy starts trading the new members on its next evaluation. Say so when the list is in use.
AUTH-REQUIRED: returns the connect funnel when no Tradetron account is connected.
Inputs: add, remove, dry_run, list_id, +2 more.
tt_normalize_strategyNormalize Strategy RepresentationsARead-onlyIdempotentInspect
Recompile a hand-edited strategy body so its three forms agree.
Every AST-backed field is stored as a family: condition_json (the
builder tree) / condition_value (the engine expression) /
condition_display, and the same triple for a leg's strike, expiry, qty,
limit_price and SL_trigger. Where a *_json exists it is the SOURCE OF
TRUTH — this tool parses it (which validates it), canonicalizes it, and
re-emits the paired text + display from it. Text-only fields are passed
through untouched.
WRITES NOTHING. Pure transform, no TT call, no auth. Pass the body from
tt_get_strategy(id) (dict or JSON string); feed the returned strategy
back through tt_update_strategy to persist it.
IT ALSO CHECKS THE KEYWORDS IT COMPILES. A tree naming a keyword
Tradetron does not have (an invented RSIX, a display name used as a
function) fails with STRATEGY_NORMALIZE_FAILED and
details.keyword_errors, instead of returning tt_RSIX(...) for a
later write to refuse. Keyword errors the input body already carried
are not counted, so an older strategy still normalizes.
WHEN TO USE IT. After a PATCH_REP_DISAGREEMENT — the tree and the
expression describe different logic and you want the TREE's meaning to
win everywhere. For a targeted single-field edit you usually do NOT
need this: send the *_json member ALONE to tt_apply_strategy_patch /
tt_update_strategy and the server derives that one family's text for
you, leaving the rest of the body byte-identical. This tool walks the
WHOLE body, so the blast radius depends on how the strategy was last
written: on an ASB-authored body it rewrites roughly half to two-thirds
of the condition members (re-minted kids, whitespace canonicalisation,
missing argument-slot backfill), on a body that already went through
this transform it rewrites 0. Either way changed lists exactly which
members moved — read it, do not assume a number.
WHERE A TREE IS MISSING ENTIRELY, it is REBUILT from the stored
condition_value. A condition can reach TT with the engine text and no
tree (an imported body whose conditions never carried one): it runs
correctly and cannot be edited, because the ASB condition builder seeds
itself from condition_json alone and so opens EMPTY. A rebuilt tree is
adopted only when re-emitting it reproduces the stored expression, so
the repair can never change what the engine evaluates; the count comes
back as condition_trees_rebuilt, and anything unreadable is listed in
condition_trees_unrecoverable and left untouched. Legs are excluded
on purpose — a text-only qty or expiry is TT's own normal shape.
This is NOT a general text-to-tree edit path. Where a tree already EXISTS it stays the source of truth, so editing condition_value and calling this will NOT update condition_json — it will overwrite your edit with the tree's meaning.
Inputs: strategy (required).
tt_open_support_conversationOpen Support ConversationADestructiveInspect
Open a support conversation to escalate to a live Tradetron agent.
USE WHEN: a previous tt_ask_tt call returned escalate=True, OR a
tt_diagnose_strategy call could not pin a cause — AND the user has
confirmed they want to talk to a human agent. Pass the
handoff_payload dict from that earlier result through here
verbatim; both tools return one.
DO NOT USE proactively. Always confirm with the user first — opening a support conversation pings real Tradetron support staff.
The conversation is seeded with two messages visible to the agent: a private note carrying the escalation reason, the user's Tradetron identity when it could be resolved, and — when retrieval ran — a one-line summary of what the bot looked at; plus the user's original query as a normal user-side message. On the tt_ask_tt escalation paths the bot has not composed an answer by the time it escalates, so that note carries none; the tt_diagnose_strategy path hands over what the diagnosis found. Either way the agent works the case themselves — never tell the user an answer is already waiting with them.
Returns a session_id and nothing else — there is NO link to hand the user. This conversation lives only inside the assistant: pass the session_id to tt_check_support_response (poll for agent replies) and tt_reply_to_agent (relay user follow-ups). Say that plainly rather than implying they can open it somewhere.
session_context (optional): identifiers you are already holding, so
the agent does not start cold — any of {deployment_id, strategy_id,
template_id, download_url, request_id}. Pass the SID you diagnosed,
the tt_export_strategy download_url, and the _meta.request_id of
the failing call when there is one. Identifiers only: free-form
blobs are dropped, and each value is truncated.
On status="stub" the support bridge is not connected on this server, so NO conversation was opened and nobody will see the message. Tell the user plainly that you could not reach support from here, give them the Tradetron help centre or the in-app chat, and do not imply anyone has been notified or will reply.
Inputs: handoff_payload (required), session_context.
tt_pnl_driversP&L DriversARead-onlyIdempotentInspect
What drove the signed-in user's P&L TODAY (or in the latest session): every strategy ranked by its P&L for ONE session, the top gainers and losers in ₹ with their share of the move, and the instruments/legs that moved each one. Use it for "what drove my P&L", "why is my P&L down today", "which strategy made/lost money today / yesterday".
Needs NO strategy id — it reads the caller's own book, so never ask the
user for a SID for this. Live intraday when today has trades;
otherwise the latest completed session (reconciled). date
YYYY-MM-DD pins a session. It covers the book the user's SAVED
dashboard filter keeps (the phone's Today and the dashboard header) —
say which, from book.covers, and split live vs Live Offline (the
paper_pnl field) when both moved. Live, total_pnl is the dashboard
P&L card's figure on its default Expiry view (booked_pnl + open_pnl,
carried positions marked from yesterday's close); today_view_pnl is
the card's Today view. DESCRIPTIVE only — no stop/fund advice.
AUTH-REQUIRED.
Inputs: date, top_n.
tt_portfolio_reportPortfolio ReportARead-onlyIdempotentInspect
The signed-in user's WHOLE BOOK over a window — the "how am I doing overall / which strategies are sinking me?" dashboard. Returns total P&L, every strategy ranked by P&L, the winners-vs-losers split, each loser's share of the total loss, and how concentrated the drawdown is in the top few losers.
Present it as a dashboard and give a DESCRIPTIVE read — name where the
loss concentrates and the winner/loser asymmetry; do NOT tell the user
which strategies to stop or fund (investment advice). Offer to drill into
any one with tt_strategy_performance or tt_diagnose_strategy. Data is
T-1; P&L reconciled. AUTH-REQUIRED. from_date/to_date ISO (empty =
current month).
Inputs: to_date, from_date.
tt_preview_changePreview Change ImpactARead-onlyIdempotentInspect
⭐ CALL THIS BEFORE EDITING an existing strategy — especially one with a Python block. FREE, read-only, no wallet debit, no write.
Answers the question that nothing else can: where is this value hard-coded, and what else moves with it? A candle timeframe, an instrument, or a runtime variable is typically repeated across several conditions AND the Python block. Change some sites and not others and you get a strategy that validates clean, deploys, and trades a MIX of the old and new settings — the failure the caller will not see until live market.
Two modes:
• strategy_id alone — the DEPENDENCY MAP: every site where a
timeframe / instrument / runtime variable is hard-coded, grouped by
value, plus cross_layer (values living in more than one layer, the
ones a partial edit breaks), plus traps (validator findings
ALREADY present, so you learn this strategy's gotchas before
authoring rather than after a rejection).
• strategy_id + patch — the same for the resulting state, plus
partial_change_findings (sites your patch would leave behind) and
unchanged (a machine-checked "DO NOT CHANGE" list confirming the
dimensions you did not intend to touch really did stay put).
DRILLING IN. Two caps keep a large strategy from blowing the
response: each value lists at most 25 sites (truncated reports the
exact total), and each dimension lists at most 30 values, the ones
with the most sites (values_truncated reports the total). To see
EVERY site for one value, re-call with dimension, value and a
raised max_sites (both bounds are on the parameters themselves).
Counts are never filtered — n_sites/n_values always describe the whole
strategy, so a 145-variable strategy still reports 145 even when the
listing shows 30.
Sites that are genuinely identical — several reads of the same value
in ONE condition — carry occurrence and occurrences_at_path. The
payload has no finer locator than the path, so say "4 reads in that
condition", not four separate places.
Use it to answer the user honestly before you start: "1m appears in 4 places — 3 conditions and the Python block; changing it means changing all 4." Then patch all of them in ONE call.
patch is the same RFC-6902 op list tt_apply_strategy_patch takes, so
you can preview the exact patch you are about to apply.
Inputs: strategy_id (required), patch, value, dimension, +1 more.
tt_preview_ideaPreview An Idea (Free)ARead-onlyIdempotentInspect
Free, read-only preview of a single-stock daily idea: "what if I bought X whenever Y, and sold it Z later?" for NSE stocks/ETFs. Creates nothing, charges nothing, needs no sign-in.
Returns a daily PREVIEW replay — trades, win rate, net return vs
buy-and-hold, recent trades, data-quality notes — plus the validated
strategy it would run. Report it with its limits: it is not the
backtest engine. EXIT IS REQUIRED AND HAS NO DEFAULT: if the user did
not say when to sell, ask. The window defaults to the 3 years ending
35 days before today (data at least 35 days old, exchange rule).
A real engine backtest of the same idea is tt_backtest_idea with run_backtest=true — paid, and it asks the price first. Offer it; call it only when the user asks for it.
Inputs: end, exit, entry, start, +3 more.
tt_promote_to_strategyPromote To StrategyARead-onlyIdempotentInspect
Turn a rule set that survived tt_check_edge into a real, VALIDATED Tradetron strategy — as a draft. Creates nothing, charges nothing, deploys nothing.
trade says what to actually buy or sell: long_call, short_put,
long_put, short_call, long_future, short_future. IT HAS NO DEFAULT. A
rule says what the market is doing; it does not say whether you express
that as a long call, a short put or a future, and those carry different
risk. If the user has not said, ASK. A trade that contradicts
direction is refused, not warned.
A PAID BACKTEST COMES BEFORE ANY DEPLOY, and say why: tt_check_edge traded the SPOT, so it cannot see what an options structure actually does. Tell the user the next steps are tt_create_strategy and then a backtest (tt_backtest_strategy, which is paid and quotes its price first); make each call only when the user asks for it. Deploying it (tt_deploy_strategy_paper: Live Offline, where Tradetron shows each signal and places no order) is the user's separate choice — never present it as a test or a step before going live.
Two behaviours to state without being asked, because the user cannot see them in the markdown: entry is GATED an hour after the open (at the open an intraday offset still points at yesterday's candles and would fire on stale data — the screen never measured that trade), and the set RE-ARMS after every exit, so it can round-trip repeatedly in a day.
A bars:N exit is refused: Tradetron has no "N bars after entry"
primitive, and substituting a time exit would run something other than
what was measured. Monthly-only roots never get a Current Week leg.
GOING LIVE IS NOT OFFERED and must not be suggested — it is a separate decision the user takes in Tradetron itself.
Inputs: underlying (required), lots, name, rules, +4 more.
tt_reply_to_agentReply to Support AgentADestructiveInspect
Relay a user's follow-up message to the live support agent.
USE WHEN: a tt_open_support_conversation has already happened in this session AND the user wants to send something to the agent (a clarification, a follow-up question, an answer to an agent prompt).
DO NOT USE for the user's original question — that's seeded by tt_open_support_conversation. Only use for messages SENT AFTER the conversation is open.
content is the user's literal text. Don't rewrite or
summarize — pass it through. The agent sees it as a normal
customer message in the conversation.
TEXT ONLY. This relay carries no attachments, and files the agent sends back are dropped. If the user needs to send a screenshot or a document, tell them to email it to support@tradetron.tech quoting the same issue — do not tell them to attach it here.
Inputs: content (required), session_id (required).
tt_report_templateReport TemplateARead-onlyIdempotentInspect
Run a ready-made report over the user's own trading data and render it in the chat. Four templates, each answering a question that tt_portfolio_report (a ranked snapshot) and tt_strategy_performance (one strategy) do not:
"monthly" — month-by-month P&L across the whole book, with a running total, best/worst month, positive-month count. For "how has my year gone?", "show me my monthly P&L".
"by_underlying" — which instruments the money actually comes from, ranked, with each one's share. For "which stocks make me money?", "where am I losing?".
"execution" — average slippage with the worst fills listed, plus how many legs carry a broker execution record (Live Offline legs never do). Partial fills are NOT detectable from this feed. For "is slippage hurting me?".
"paper_vs_live" — the book split by mode, Live Offline beside live (not comparable on performance: Live Offline fills at LTP). For "how do my Live Offline and live results differ?".
Prefer these over tt_export_reports whenever the user is asking a QUESTION — this answers it in the conversation; the export just hands them a zip they have to open themselves.
Args: template: one of monthly | by_underlying | execution | paper_vs_live. from_date: YYYY-MM-DD. to_date: YYYY-MM-DD.
Follow the returned render_spec — it says how to lay the report out
and, importantly, keeps the interpretation DESCRIPTIVE. Never turn these
numbers into "stop this strategy" or "put more into that one": this is
live money and that is investment advice. Describe what the data shows
and let the user decide.
Always relay omissions (parts of the book not covered) and any
method_caveat — a breakdown that quietly covers half the book reads as
complete and is worse than none.
AUTH-REQUIRED: returns the connect funnel when no account is connected.
Inputs: to_date (required), template (required), from_date (required).
tt_scan_instrumentsScan InstrumentsARead-onlyIdempotentInspect
Which instruments are reading a given way RIGHT NOW — the scan step between looking at one chart and building a strategy.
underlyings is a comma-separated list ("NIFTY 50, NIFTY BANK, SENSEX");
empty scans every covered root whose store is configured. A name this
does not read does NOT sink the call — the rest are scanned and it is
named in not_instruments; only a list with nothing readable in it is
refused. verdict filters to one of Strong Buy / Buy / Neutral / Sell
/ Strong Sell, in any case; empty returns every instrument's reading
with a by_verdict breakdown.
conditions (default true) adds the wire conditions to every row. On
a whole-board scan — underlyings empty — it is forced OFF, because
that response ran to ~63,000 characters and clients refuse to render
it; pass a short underlyings list to get the conditions back. The
response says which you got, in conditions_included.
Each match carries conditions — the EXACT Tradetron wire conditions
for what is currently firing on it, in the same grammar the screener and
the strategy engine already use. That is the point of this tool: the
reading can be saved as a screener condition or carried into a strategy
without anyone retyping it. Never paraphrase those strings; offer them
as they are.
ALWAYS name the timeframe when reporting — a 5m reading and a 1h reading
disagree constantly, so "NIFTY is a Buy" with no timeframe is
meaningless. Call out divergent rows: those are instruments where the
moving averages and oscillators point opposite ways, which is the normal
state of a trend rather than a contradiction.
MARKET DATA, NOT ADVICE. Do not tell anyone to buy or sell and do not present the list as "best opportunities" — it is a filter over indicator tallies. No auth required.
Inputs: verdict, timeframe, conditions, underlyings, +1 more.
tt_search_listsSearch Strategy ListsARead-onlyIdempotentInspect
Search the signed-in user's Tradetron instrument lists by name.
Call this whenever the user references a watchlist / universe / instrument basket by name ("my breakout list", "NIFTY 50", "the F&O smallcap list") so you can resolve it to a concrete numeric list_id BEFORE wiring it into a strategy. Also use to confirm a named list actually exists.
Returns own + public lists (metadata only): list_id, name, instrument_count, segment, exchange. Public/system lists (NIFTY 50, Banknifty, ...) are included so you can resolve them too. Restricted to IN exchanges. If several lists match, show them and ask the user which one.
AUTH-REQUIRED: returns the connect/sign-up funnel if the user hasn't connected their Tradetron account.
How the list_id is used downstream: a list-based set carries the
integer list id at BOTH the set level and on every leg (with the
leg's instrument=0). Put the resolved id in the Set identity's
List: field — the emitter propagates it to the legs and the
validator enforces the coupling.
Args: q: optional case-insensitive substring of the list name. Empty → all (capped by limit). limit: 1..100, default 20.
Inputs: q, limit.
tt_send_feedbackSend Feedback To TradetronAInspect
Send Tradetron a bug report, a note about a confusing answer, or a feature request, from the AI client. Use it only when the user asks to report something or to request a feature; show them what you will send first.
Attach the _meta.request_id of each call the report is about
(every tool response carries one) and the tool names: that is what
lets Tradetron reproduce it. Returns a ticket_id (FB-) and
status "new" — give the user the ticket id. Each report reaches
Tradetron's support team in the same review queue as the in-app
assistant's feedback. Replies and status tracking inside the AI
client are not available yet (not_yet_available says so); for a
conversation with a person now, use tt_open_support_conversation
when the user asks for one.
Inputs: kind (required), description (required), tool_names, request_ids, +1 more.
tt_straddle_chartStraddle ChartARead-onlyIdempotentInspect
The straddle chart — ATM straddle price through ONE session, in
rupees (or dollars). Today by default; any past session with date.
This is the tool for a session's line; tt_straddle_live is today's
live minute-by-minute read, and tt_straddle_decay is the historical
profile across many sessions.
Prefer this over tt_straddle_live / tt_straddle_decay for anything chart-shaped: it is one contract for both, so "what's the straddle now" and "show me 2nd September" return the same fields and the caller does not branch.
date omitted / "today" -> live, from the engine's tick store date = YYYY-MM-DD -> that completed session expiry = YYYY-MM-DD -> a specific expiry (default: the nearest)
band adds the same instrument's own history behind the line — the
usual range at the SAME days-to-expiry, ending the day before, and
already scaled to this session's open so it can be drawn on the same
axis without converting anything. With it comes context, whose
sentence says whether the session is decaying faster, slower or in
line with usual.
The strike is anchored to the FORWARD, not spot — that is what at-the-money means for an option, and it differs from the cash strike on most non-expiry days.
Use tt_straddle_decay when the question is about the PATTERN across many sessions rather than one chart. MARKET DATA, NOT ADVICE. No auth.
Inputs: underlying (required), band, date, expiry, +2 more.
tt_straddle_decayStraddle Decay ChartARead-onlyIdempotentInspect
How an ATM straddle's PREMIUM behaves through a trading session,
ACROSS MANY SESSIONS — the decay PROFILE, for both Indian and US
markets. Its curve is a percent of each session's own open, not
money, and the multi-session profile returns a hosted chart
(chart_url) plus the numbers behind it; a single-session call
returns prices and no chart.
For one session's line in rupees or dollars — today or a past date — use tt_straddle_chart. This is the tool for "what does decay usually look like", not "what did it do on the 2nd".
INDIA: NIFTY (say "NIFTY 50" or "NIFTY"), BANKNIFTY ("NIFTY BANK"), FINNIFTY, MIDCPNIFTY, SENSEX, BANKEX — NSE/BSE minute bars from 2020-01-01, the same store the backtest engine reads.
US: SPX, XSP, NDX, VIX and SPY, QQQ, IWM, GLD, DIA, TQQQ, AAPL, TSLA, NVDA, GOOGL, AMZN, META, MSFT, AMD, PLTR, NFLX, INTC, GOOG — OPRA minute bars from 2021-08-16.
TWO MODES. Pass date (YYYY-MM-DD) for ONE session's curve. Omit it for
the HISTORICAL profile over sessions trading days ending at end_date
(sessions 0 = pick by expiry cadence: 60 for the daily names, 20 for a
weekly like NIFTY or SENSEX, 12 for a monthly — so the WINDOW is
comparable rather than the count; ask for more explicitly if you want it)
(default: the latest session) — median
premium by time of day with a 25th-75th percentile band, the median
full-day decay, how often the premium finished lower than it opened, and
when it typically bottoms.
dte is days to expiry: 0 (default) is the NEAREST real expiry. That is
same-day where options expire daily (SPX/SPY/QQQ); in India, post-SEBI,
only NIFTY and SENSEX carry a weekly (NIFTY expires TUESDAY) and the rest
are monthly, so a 0DTE profile there samples expiry days only — which is
correct: blending a 0DTE curve with a 6DTE one describes no tradeable
thing. The ATM strike is fixed at the session open and every curve value
is a PERCENT OF THAT SESSION'S OPENING PREMIUM.
A RISING LINE MEANS PREMIUM EXPANDED, not a loss — the straddle gains when the underlying outruns time decay. This is market data, not a position: never present it as P&L, and never turn it into advice to sell or buy straddles.
Sessions are aligned on the venue's OWN wall clock — Eastern for the US
(so summer and winter sessions superimpose despite DST) and IST for India
— and early-close half-days are excluded unless include_half_days is
set. Indian bars end 15:30 IST: NSE has run F&O to 15:40 since
2026-08-03 and those minutes are not imported, so say so rather than
implying the curve runs to the real close. No auth required — this is
market data, not account data.
Inputs: underlying (required), dte, date, end_date, +3 more.
tt_straddle_liveLive Straddle PriceARead-onlyIdempotentInspect
What the ATM straddle is worth RIGHT NOW, and what it has done since today's open, in rupees (or dollars), minute by minute.
WHICH OF THE THREE: tt_straddle_chart is the one contract for a
SESSION's line, today or a past date — reach for it first, including
for a past session. This tool is the live minute-by-minute read of
TODAY and takes no date. tt_straddle_decay is the HISTORICAL
PROFILE across many sessions (percent of each session's open), not a
chart of one.
It reads the ENGINE'S OWN live tick store, so it sees today; the
historical companion tt_straddle_decay reads the nightly backtest store
and cannot.
USE THIS when the question is about NOW or TODAY ("what's the straddle
at", "how much has it decayed today", "is premium holding up").
USE tt_straddle_decay when the question is about the PATTERN across many
sessions, or about any PAST date — passing it a date returns this exact
absolute-price shape for that session.
Returns the minute series plus the numbers that belong beside it: strike,
CE and PE separately, spot, SYNTHETIC FUTURE (strike + CE - PE, the
forward the options are pricing — quote it next to spot when they
diverge), days to expiry, open/high/low, and the time of the last point.
expiry (YYYY-MM-DD) and strike are optional; the nearest quoting
expiry and the ATM strike are used by default, and available_expiries
lists the rest.
Say the time of the last point rather than implying a close — this moves. MARKET DATA, NOT ADVICE. No auth required.
Inputs: underlying (required), expiry, strike, bucket_minutes.
tt_strategy_performanceStrategy Performance ReportARead-onlyIdempotentInspect
How is ONE of the signed-in user's deployed strategies PERFORMING (the money question, distinct from tt_diagnose_strategy's "is it broken"). Returns total P&L over the window plus the daily series and the stats that matter: win-days vs loss-days, win-rate, avg win-day vs avg loss-day, payoff ratio, best/worst day, daily volatility, max drawdown, and volatility-vs-return. Keyed by the same SID as diagnosis, so you can say both "it's not broken" AND "but it's barely net-positive with huge daily swings".
Present the numbers, then give a DESCRIPTIVE read — quantify the behaviour; do NOT give buy/sell/allocation advice (that's investment advice on live money). Data is T-1; P&L is TT's reconciled figure.
AUTH-REQUIRED + ownership-gated. from_date/to_date are ISO dates
(empty = TT's default current-month window).
Inputs: strategy_id (required), to_date, from_date.
tt_uni_course_formatTT Uni Course FormatARead-onlyIdempotentInspect
Return the TT Uni course markdown format and the authoring prompt.
Call this FIRST when a teacher wants to design a course with you: plan
the course with them, write it in this format, show it, then create it
with tt_uni_create_course. Front matter (title, summary, kind, price,
level, topics, prerequisites, outcomes, cover), description,
## Chapter: ..., ### Lesson: ..., optional id: / video: /
preview: yes lines under a heading.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: no named parameters.
tt_uni_course_mediaTT Uni Course MediaAInspect
Give a course its cover image or promo video from a FILE (for a file already online, use tt_uni_update_course cover_url / cover_video_url). WRITES: start reserves an upload link and changes nothing on the course yet; complete attaches the file, replacing the current cover or promo video. Two steps: - action=start: course_id, kind = cover (JPG/PNG/WebP up to 5 MB, at least 640 x 360, cropped to 16:9 at 1280 x 720) or cover_video (MP4/WebM up to 50 MB, plays at the top of the course page), filename, size_bytes, rights_confirmed=true (the teacher owns or may use the file). Returns upload_url, headers and upload_token. PUT the file to upload_url with exactly those headers (one request; the link lasts 30 minutes). - action=complete: course_id + upload_token. Tradetron checks the file as a Studio upload is checked and attaches it. On a teacher's approved course it waits for Tradetron's approval (pending_review). Needs a sandbox that can make HTTP requests; otherwise the teacher uploads it in Studio.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: action (required), course_id (required), kind, filename, +3 more.
tt_uni_create_courseTT Uni Create CourseAInspect
Create a NEW draft course from markdown in the TT Uni format
(tt_uni_course_format). Show the teacher the full outline and price and
get a yes before calling. Returns the draft course with its id. A
lesson's video: line takes a public https link to a video file or the
teacher's own VdoCipher id; lessons can also get videos later. A LIVE
course gets its chapters too: each chapter is one session's plan and its
lessons are the topics, with their notes (no tests on a live course).
A field over its limit (title 160, summary 255, prerequisites 255,
outcome 200, chapter/lesson title 160 characters) is refused with the
count and the limit; nothing is cut short. Replies with a compact
summary (ids, titles, status); response="full" returns everything.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: markdown (required), response.
tt_uni_deleteTT Uni DeleteADestructiveIdempotentInspect
Delete a course, chapter, lesson or session the teacher owns. kind = course | chapter | lesson | session. A course can be deleted only while it is a draft with no learners. Not recoverable through this server: confirm with the teacher, naming the item, before calling.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: kind (required), item_id (required).
tt_uni_get_courseTT Uni Get CourseARead-onlyIdempotentInspect
Read one of the teacher's courses in full: fields, chapters ->
lessons (id, title, notes, preview, video status/duration), cohorts ->
sessions, and markdown — the whole course with id: lines. To make
structural edits, change that markdown and send it back with
tt_uni_update_course; the id lines keep existing lessons matched.
Live courses: each cohort has zoom (null or meeting_id, join_url,
passcode_set, host, alt_hosts, closed_at). The meeting passcode is
never returned (it is a credential); the passcode and the full join
link are on the course's Studio page. Each session has its recording
in PARTS: recordings [{id, position, visible, source
(zoom|upload|url|vdocipher_id), status (found | uploading |
downloading | importing | processing | ready | failed), error,
duration_seconds (from VdoCipher), video_id, zoom_start_at}], plus
recording_status (null | processing | ready | failed),
has_recording (true only when a visible part is ready, so learners
can play it) and recordings_locked (true after any manual change:
the automatic Zoom pick then leaves the parts alone). Change parts with
tt_uni_session_recording. Recordings arrive by themselves only from Zoom meetings on Tradetron's Zoom account with cloud recording on: the batch meeting TT Uni books, a session's own booked meeting, or a pasted link to a meeting on that account. A recording is matched by the meeting number in the link (zoom.us/j/) and by time: it must start between 60 minutes before the session and 180 minutes after its scheduled end. A pasted link to a meeting on any other Zoom account is never picked up: add that recording with tt_uni_session_recording (action=add, a link). With record_sessions false nothing is recorded or offered. Text comes back
exactly as the teacher typed it; the markdown quotes a value only when
it has to, so sending it back unchanged changes nothing.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: course_id (required).
tt_uni_list_my_coursesTT Uni My CoursesARead-onlyIdempotentInspect
List the signed-in teacher's TT Uni courses: id, title, status (draft / in_review / live ...), kind, price_inr, lesson count, how many lessons have a ready video, public url and Studio url.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: no named parameters.
tt_uni_plan_sessionsTT Uni Plan SessionsAInspect
The session calendar: plan a live batch's sessions on Tradetron's Zoom and see what is already taken. ONLY action=create WRITES (it adds the sessions to the cohort and books their meetings); availability and preview only read and change nothing. action = - availability: cohort_id (+ from_date "YYYY-MM-DD", days 1-70, default today + 42). Per licensed Zoom seat, what is busy (start, end, why: a free webinar, another course's batch), plus this batch's own sessions. A time is unavailable only when EVERY seat is busy. Each session also holds its seat 15 min before and 60 min after. - preview: cohort_id + dates ["YYYY-MM-DD", ...] OR pattern {from "YYYY-MM-DD", weekdays ["mon", ...] (default Mon-Fri), count | until} + time "HH:MM" IST + minutes (+ topics [one per session] | topic). Answers each session free or clashing, with the nearest free times, and the one seat free for all of them. Creates nothing. - create: the same input; creates ALL the sessions (only a past date or sessions overlapping each other refuse, and then NONE go in). A clash with Tradetron's Zoom NEVER refuses: the teacher's dates stay, Tradetron buys one more Zoom seat (waiting_for_seat: true; staff are mailed, the seat is taken automatically once it is in). Offer the suggested free times as a choice, never as a condition. The batch's dates follow. Before approval the seat is HELD for those sessions (14 days, then until the batch ends once approved) so no other course can take it; the Zoom meeting itself is made on that seat when enrolment opens. A batch with its own pasted join_url never holds or books Tradetron's Zoom. Course 94's dates (10-14 Nov Tue-Sat, 16-20 Nov Mon-Fri, 19:00) are one pattern: from 2026-11-10, weekdays mon..sat, count 10. Always preview, show the teacher the clashes and suggestions, then create. Recordings arrive by themselves only from Zoom meetings on Tradetron's Zoom account with cloud recording on: the batch meeting TT Uni books, a session's own booked meeting, or a pasted link to a meeting on that account. A recording is matched by the meeting number in the link (zoom.us/j/) and by time: it must start between 60 minutes before the session and 180 minutes after its scheduled end. A pasted link to a meeting on any other Zoom account is never picked up: add that recording with tt_uni_session_recording (action=add, a link). With record_sessions false nothing is recorded or offered.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: action (required), cohort_id (required), days, time, +6 more.
tt_uni_save_chapterTT Uni Save ChapterADestructiveInspect
Add or edit a chapter (WRITES: creates one, or overwrites the fields you pass on an existing one). New chapter: course_id + title. Edit: chapter_id + new title and/or position (1-based order).
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: title, position, course_id, chapter_id.
tt_uni_save_cohortTT Uni Save CohortADestructiveInspect
Add or edit a cohort (a dated live batch of a LIVE-kind course). WRITES: creates one, or overwrites the fields you pass on an existing one. New: course_id + fields{starts_on "YYYY-MM-DD", ends_on?, price_inr?, status? draft|coming_soon|open|closed, community_link?, access_days?, enrol_closes_at? "YYYY-MM-DD HH:MM" IST (null = open until it starts), seats? (null = no limit; sold out closes enrolment), record_sessions? (false = live only, no recording), name? (e.g. "Nov 2026 batch"), join_url? (one meeting link for every session; a session's own link wins), alt_hosts? [Tradetron emails who may also start the batch meeting], materials? [{label, url}] (enrolled learners only)} + optional sessions[{starts_at "YYYY-MM-DD HH:MM" IST, duration_minutes, topic, join_url?}]. Edit: cohort_id + fields to change (no sessions — use tt_uni_save_session). Same rules as Studio's cohort form. Recordings arrive by themselves only from Zoom meetings on Tradetron's Zoom account with cloud recording on: the batch meeting TT Uni books, a session's own booked meeting, or a pasted link to a meeting on that account. A recording is matched by the meeting number in the link (zoom.us/j/) and by time: it must start between 60 minutes before the session and 180 minutes after its scheduled end. A pasted link to a meeting on any other Zoom account is never picked up: add that recording with tt_uni_session_recording (action=add, a link). With record_sessions false nothing is recorded or offered.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: fields, sessions, cohort_id, course_id.
tt_uni_save_lessonTT Uni Save LessonADestructiveInspect
Add or edit a lesson (WRITES: creates one, or overwrites the fields you pass on an existing one). New lesson: chapter_id + title (+ notes, preview, video_url or video_id). Edit: lesson_id + only what changes: title, notes (markdown shown under the video), preview (true = free preview lesson), position, move_to_chapter_id, video_url / video_id. video_url must be a public https link to a video FILE (it is fetched and transcoded); video_id is a VdoCipher id the teacher uploaded. If it answers TTUNI_WRITE_UNCONFIRMED the lesson may exist already: read the course back before adding it again.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: notes, title, preview, position, +5 more.
tt_uni_save_sessionTT Uni Save SessionADestructiveInspect
Add or edit a live session in a cohort (WRITES: creates one, or overwrites the fields you pass on an existing one). New: cohort_id + fields{starts_at "YYYY-MM-DD HH:MM" IST, duration_minutes, topic, join_url?, slides_url?}. Edit: session_id + fields to change. A session's recording is a list of PARTS: fields.recording_video_id (a VdoCipher id) on an edit ADDS that video as the last part and locks the parts against the automatic Zoom pick; it does not replace the others. The length always comes from VdoCipher; there is no length or duration field for a recording (duration_minutes is the session's scheduled length). To add a link, hide, reorder or remove parts, or hand them back to the Zoom pick, use tt_uni_session_recording. Recordings arrive by themselves only from Zoom meetings on Tradetron's Zoom account with cloud recording on: the batch meeting TT Uni books, a session's own booked meeting, or a pasted link to a meeting on that account. A recording is matched by the meeting number in the link (zoom.us/j/) and by time: it must start between 60 minutes before the session and 180 minutes after its scheduled end. A pasted link to a meeting on any other Zoom account is never picked up: add that recording with tt_uni_session_recording (action=add, a link). With record_sessions false nothing is recorded or offered.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: fields, cohort_id, session_id.
tt_uni_session_recordingTT Uni Session RecordingADestructiveInspect
Manage a live session's recording PARTS (a session can have several, played in order). Every action WRITES: add and update change the parts, remove deletes one, unlock hands the session back to the automatic Zoom pick. action = - add: session_id + exactly one of url (an https link to the recording: a Zoom share or download link, Google Drive, S3 or any direct video link; VdoCipher imports it) or video_id (a VdoCipher id the teacher uploaded). Adds a part at the END. - update: recording_id + visible (true/false: hide a part from learners without deleting it) and/or position (1-based order). - remove: recording_id. Deletes that part; not recoverable here, so confirm with the teacher first. - unlock: session_id. Hands the parts back to the automatic Zoom pick and re-runs it now, which may replace the parts. Any add/update/remove LOCKS the session (recordings_locked), so the automatic Zoom pick stops changing its parts. Part ids, statuses and lengths are in tt_uni_get_course (sessions -> recordings); a URL part goes importing -> processing -> ready, and learners can play a part only when it is ready and visible. Length always comes from VdoCipher. Returns the session's cohort with every session's parts.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: action (required), url, visible, position, +3 more.
tt_uni_set_lesson_videoTT Uni Set Lesson VideoADestructiveIdempotentInspect
Attach a video to a lesson, replacing any current one. Pass
exactly one of url (public https link to the video file; VdoCipher
fetches it, status starts as processing) or video_id (a VdoCipher id
the teacher uploaded). Check progress with tt_uni_video_status. File
uploads from chat are not supported: host the file or upload it in the
Studio.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: lesson_id (required), url, video_id.
tt_uni_submit_for_reviewTT Uni Submit For ReviewAIdempotentInspect
Send a finished draft course to the TT Uni review team. This does NOT publish it: it goes live only if they approve. Returns status in_review, or the list of what to fix first (e.g. lessons without a ready video). Before calling, check the course against the teaching rules with the teacher and get their go-ahead.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: course_id (required).
tt_uni_test_statsTT Uni Test StatsARead-onlyIdempotentInspect
How the tests (quizzes) in one of the teacher's courses are doing. Per test: learners who tried it (and how many are enrolled), attempts, passed, pass_rate, first_try_pass_rate, avg_best_score (0-1), most_missed (question number, text, share who missed it) and question_detail (every question's miss rate). Miss rates use each learner's FIRST try on the current version of the test; a question most learners miss usually means the lesson before it needs a clearer explanation. Aggregates only, never learner names. Same numbers as the Studio dashboard's Tests tab.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: course_id (required).
tt_uni_update_courseTT Uni Update CourseADestructiveIdempotentInspect
Update one of the teacher's courses. Pass EXACTLY ONE of:
- markdown: the whole course (start from tt_uni_get_course's
markdown, keep the id: lines). Fields are replaced; chapters and
lessons are matched by id line (else position); new ones are added;
ones you left out are NOT deleted — they come back in warnings.
- fields: only course-level fields to change, any of title, summary,
description, price_inr, level, topics[], outcomes[], prerequisites
(free text shown on the page), kind (draft only), cover_url,
cover_video_url = https link to an .mp4/.webm promo video played at
the top of the course page with the cover as its poster (null
removes it; a YouTube/Drive/Dropbox PAGE does not play; a file on
the teacher's computer is uploaded in Studio > course > Promo video).
TT Uni admins only: prerequisite_course_id = the id of the course a
learner must FINISH (80% watched + required tests passed) before a
free or plan course opens; 0 removes it. A priced course only shows
"Recommended: finish it first"; learners already enrolled keep it.
Limits: title 160, summary 255, prerequisites 255, each outcome 200
characters (a dash or apostrophe counts once); over a limit is refused
with the limit, never cut. Replies with a compact summary (ids, titles,
status, changed = the fields you sent as now stored, warnings);
response="full" returns the whole course. If it answers
TTUNI_WRITE_UNCONFIRMED, read the course back before trying again.
Overwrites what it touches; confirm changes with the teacher first.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: course_id (required), fields, markdown, response.
tt_uni_video_statusTT Uni Video StatusARead-onlyIdempotentInspect
Processing status (processing / ready ...) and duration of a lesson's video, refreshed from VdoCipher.
TT Uni is Tradetron's course marketplace (tradetron.tech/learn). These tools act as the signed-in user and work only for approved TT Uni teachers; anyone else is pointed to https://tradetron.tech/learn/teach. DRAFTS ONLY: nothing is published until the TT Uni review team approves the course. TT Uni teaching rules: no tips or buy/sell calls; no promised returns and no P&L screenshots as proof; any market data shown must be at least 30 days old; disclose any paid strategy of your own that the course mentions. Prices are in INR and exclude GST (18% is added at checkout); the teacher earns 50% of the price. AUTH-REQUIRED.
Inputs: lesson_id (required).
tt_update_signal_bridgeEdit Signal Bridge basketADestructiveIdempotentInspect
Add or remove symbols (stocks, futures, crypto, option rules) in an existing Signal Bridge, and optionally rename it. The template is edited IN PLACE: the template id and the linked API token stay the same, so the user's existing client and signal links keep working.
Settings (exchange, capital, session, exit minutes, working days, intraday, products, expiry-day exit) are kept from the stored template, and every Initialize Variables value the user tuned (master target/SL, caps, per-symbol sizing of symbols that stay) is carried over. New symbols get the defaults.
Refuses with BRIDGE_DEPLOYED while the strategy is deployed, has subscribers or is public: the rebuild replaces every set, so a running deployment would lose track of its open positions. Tell the user to stop and exit the deployment first, then edit — nothing was changed. BRIDGE_NOT_FOUND = not one of the user's Signal Bridges.
CONFIRM the new basket with the user first (dry_run=true shows it). Returns what tt_create_signal_bridge returns (template_id, basket, auth_token, python_client, signal_links, guide_markdown, ...) plus changed.added_symbols / removed_symbols and the kept settings. Tell the user what was added and removed; give python_client unchanged if they want the updated client (it carries their own token: hand it over once and do not repeat it later). AUTH-REQUIRED.
Inputs: symbols (required), template_id (required), name, dry_run, +1 more.
tt_update_strategyUpdate StrategyADestructiveIdempotentInspect
Apply edits to an existing strategy and save.
LIVE-EDIT CONFIRM GATE: if this template is DEPLOYED, has SUBSCRIBERS, or is PUBLIC, a non-dry-run call refuses once with LIVE_EDIT_CONFIRMATION_REQUIRED — carrying the blast radius, the live-position consequences, and a copy alternative. RELAY those to the user, ask one confirm question, and only after the user explicitly agrees re-call with the SAME arguments plus live_edit_confirmed=true. Never set it on your own initiative.
MODIFY WORKFLOW (read this before any edit — there is NO rollback):
tt_get_strategy() FIRST and keep the result. It is your only snapshot; nothing here can undo a write. (tt_get_strategy also re-validates the STORED strategy, so it doubles as a health check on what is live right now.)
Rehearse with dry_run=True. Same validation, no write.
Apply, then re-read to confirm what actually persisted. Prefer tt_apply_strategy_patch for a surgical single set/condition/leg change; this tool replaces whole top-level fields,
setsincluded.
Heads-up when diffing before/after: a create/patch INJECTS blank
Add Repair / Exit envelopes into each set as scaffolding, so a
strategy read back will show conditions you did not author. They are
inert placeholders, not a bug and not content loss.
A sets replacement that would REMOVE the strategy's Universal Exit
is refused (STRATEGY_EDIT_UE_REMOVED) unless
allow_universal_exit_removal=True — pass it only when the user
explicitly wants the UE gone.
Edits top-level scalar fields (name, description, capital_required,
currency, max_multiple / min_multiple, exit settings, tags,
python_code, etc.) AND — since 2026-06-29 — a full sets replacement
(structural). A structural edit routes through the clean create-shape +
content-preservation check; if TT silently drops content it FAILS LOUD
(STRATEGY_UPDATE_CONTENT_DROPPED). For SURGICAL add/remove/modify of an
individual set/condition/leg, prefer tt_apply_strategy_patch. Do NOT
recreate the strategy. Pass the TEMPLATE id, not a deployed SID — they
are both 8-digit numbers and cannot be told apart by shape; get the
template id from tt_list_my_strategies or a strategy's edit URL.
Call tt_list_editable_fields() to see the full list of allowed keys.
Args:
strategy_id: integer ID from a prior create or list call.
edits: dict of {top-level-field: new-value}. Non-empty. sets (the
whole array) is allowed for structural changes.
dry_run: validate and report what WOULD change without writing.
Defaults to False (this tool writes by default, unlike
tt_apply_strategy_patch). A dry run cannot predict a
SERVER-side content drop — only the real POST can.
live_edit_confirmed: set True ONLY after the user has been shown
the LIVE_EDIT_CONFIRMATION_REQUIRED blast radius and
consequences and explicitly agreed to edit the live
template. Never set it on your own initiative.
exchange_brokers: {exchange: broker_id}, e.g. {"BFO": 1021}. Send
ONLY after a STRATEGY_EXCHANGE_BROKER_REQUIRED refusal, with
the broker the USER picked from that error's
details.missing[].brokers for each exchange. Tradetron then
adds the broker to the user's running deployments of this
template. Never guess or pick one yourself.
Returns on success: {"ok": True, "data": {"id", "name", "edit_url", "request_id", "changed_fields": []}}
SET IDS ARE NOT STABLE ACROSS AN EDIT. There is no partial-field wire
here: any edit other than python_code reposts the whole body, and
Tradetron deletes and recreates the SET rows on every such write. So a
one-scalar edit — a description change — moves every set id, and each
condition's strategy_template_set_id moves with it. Condition and leg
ids are preserved. changed_fields reports the FIELDS you asked for and
that persisted; it does not, and cannot, report the row churn. Never
cache a set id across an edit — re-read with tt_get_strategy instead.
Possible error codes worth surfacing to the user: STRATEGY_VALIDATION_FAILED — edits would produce invalid spec STRATEGY_UPDATE_CONTENT_DROPPED — structural edit lost sets/ conditions/legs server-side STRATEGY_EXCHANGE_BROKER_REQUIRED — the user's running deployment has no broker for an exchange the edited legs now use; ask which broker, re-call with exchange_brokers. On success, relay data.subscriber_broker_warning if present: other users' deployments will not trade that exchange until they redeploy. STRATEGY_PARTIAL_PERSIST — TT 200 but some scalar fields silently dropped (see details.dropped)
Inputs: edits (required), strategy_id (required), dry_run, exchange_brokers, +2 more.
tt_validate_markdownValidate Strategy MarkdownARead-onlyIdempotentInspect
Validate a strategy spec (markdown OR JSON) against the locked schema.
Auto-detects format: text starting with '{' is treated as JSON, otherwise as markdown (the Tradetron strategy-markdown grammar).
mode: 'create' (strict, for new strategies; checks int types tightly) 'update' (lenient, for already-existing strategies fetched via get_strategy where some legacy types are looser).
ALWAYS call this BEFORE create_strategy. The validator catches:
SCHEMA_LOCK rule violations (settings wrapper, positions vs legs, etc.)
Forbidden condition keys (condition_action, parent, sort, c_new)
Type mismatches (instrument as string, fee_frequency as 'Month', etc.)
Unknown keywords (typos, hallucinated function names)
Structural issues that TT would silently drop on submit
Returns a structured error list with hints for each issue, so you can fix the spec and retry without making a round-trip to TT.
AUTHORING RULES it enforces — follow them up front so you do not round-trip on errors:
Leg Qty is in LOTS; confirm the resolved lot count per leg in your summary. A count of shares/contracts mis-sizes by orders of magnitude.
A per-leg trailing/repair stop (Leg SL trail / Leg Exit / Traded Instrument) anchors the condition that OPENED the leg — usually cond_type='Entry', 'Repair Once' when a Repair Once opened it — never the condition it sits in (a self-reference never arms).
Index strikes use ATM SPOT (NIFTY/BANKNIFTY); MCX uses ATM (no spot). Weekly expiry = the 'Current Week' token, never a Week Day==N filter.
'N minutes after entry' = Time Difference (T2-T1)(EntryTime( underlying), Time('NSE')) >= Number(N) (never gate on != with it); read entry price/time via the Entry* keywords, not a literal.
Init Var takes 2 args (name, default); Get Runtime takes 1 (name). Cross-sectional ranking (top-N) works only inside a Python block.
Never improvise a keyword's signature: if you are not CERTAIN of its argument count and order, call tt_lookup_keyword and copy the returned example's shape (an OHLC read is Position ( CLOSE ( Symbol ( Instrument Name ( ... ) , '5m', 'All' ) ) , '-1' ) — the candle interval lives in Symbol, never in Position). If the logic cannot be expressed from catalog-verified shapes, say so and offer the nearest construct Tradetron supports; never a nearest guess.
GAPS — the trading decisions the user never made. data.gaps lists
each missing or ambiguous piece (no exit, no stop-loss on sold options,
a stop-loss or target the description promises but the logic lacks,
an unstated expiry or quantity, re-entry after an exit, a keyword that
does not run) as {code, field, question, options: [2-4 x {label,
detail, value}], default, blocking}. When gaps is non-empty, do NOT
guess and do NOT ask open-ended: put each gap to the user as its
question with its options, one question per gap, and mark the
option whose value equals default as the usual choice (default: null = no safe default, let them pick). Settle every blocking: true
gap before you create; a non-blocking gap may take its default when
the user says to go ahead. Build exactly what they pick, then validate
again. When the user did not state a leg's expiry or the quantity,
leave that Expiry cell blank or the Qty column out instead of guessing:
the conventional default is applied and the gap comes back so you can
confirm it. Gaps never change valid, errors or warnings.
Inputs: text (required), mode.
tt_validate_pythonValidate Python BlockARead-onlyIdempotentInspect
Security-check a custom Python snippet before embedding it in a strategy.
Custom Python in a Tradetron strategy runs on shared TT infrastructure,
so it is gated by a strict deterministic policy: Tradetron keywords and
the tt_-prefixed transient wrappers tt_set_runtime/tt_get_runtime are
allowed (the BARE get_runtime/set_runtime are the raw engine functions
and must never be called from a block — they raise at live deploy, and
are flagged here as a warning); imports, dunder/
introspection access, eval/exec/compile/open/getattr/globals, string
.format() escapes, function definitions (def and lambda), and huge
allocations are rejected. Loops only when bounded: a for over range()
with integer-literal bounds or a literal tuple/list, at most 100
iterations per loop, 500 per block, 2 levels deep — while and
comprehensions are rejected. Use a loop only where the logic cannot be
written without one.
Call this BEFORE proposing python_code in tt_create_strategy / tt_update_strategy. Returns {valid, code_hash, errors[], warnings[]} with a specific code + message + line for each issue, so you can fix the snippet without a round-trip. The same gate runs server-side on every create/edit, so anything this rejects will also be rejected on save.
code_hash is the sha256 of the NORMALISED code — line endings
unified, per-line trailing whitespace removed, leading and trailing
blank lines dropped — which is also the form the code is saved in.
So the hash of what you sent matches the hash of what reads back,
and a trailing newline you add is not stored.
Inputs: python_code (required).
tt_wallet_balanceTradetron Wallet BalanceARead-onlyIdempotentInspect
Show the user's Tradetron wallet balance, what a backtest costs, and a clickable link to add funds.
Backtests are charged to the Tradetron wallet. Use this when the user asks about their balance, asks how much a backtest costs, says they are out of funds, or asks how to add funds (for example after a run was refused for insufficient balance): it returns the actual top-up link, so give that rather than a general 'add funds on the website'.
Returns {wallet_balance, backtest_price, backtests_affordable,
backtests_affordable_from_wallet, topup_url?, backtest_pack?}. The two
affordable keys are the SAME figure — the second is the honest name and
the first is kept for callers pinned to it; quote either, never both as
if they were different answers. topup_url is minted per call and
legitimately differs between two reads a minute apart: it is a link to
follow, not an identifier to compare. LEAD WITH backtest_pack WHEN IT IS PRESENT: an account
holding a prepaid pack spends CREDITS first, so its runs cost ₹0 and this
cash balance never moves — backtests_affordable is a cash-only figure and
describes a payment path that account is not using. spendable_now is what
a run today can actually draw; it is 0 on a pack whose billing cycle has
ended, which is a different answer from "no pack" and must be said as such.
Relay the balance verbatim; never invent or estimate a figure. If the balance
could not be read, say exactly that.
NOTE: this wallet fee applies to backtests run through the chat/MCP. It
is SEPARATE from a subscription plan's backtest_allowed limit, which
governs the website's own Backtest button — a large plan allowance does
not make chat backtests free, and vice versa.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Backtest options strategies in plain English on 1-min NSE, BSE, MCX and US SPX/SPY option-chain data
Design trading strategies with your AI and open them in a visual no-code Strategy Builder.
Automate trading on your own Alpaca account - build, backtest and run strategies via your AI.
Backtest crypto trading strategies by describing them in plain English. Your AI writes the rules; a deterministic engine runs them on real Binance data (perpetual futures and spot) with fees, slippage and funding counted. Optimize with a held-out check, forward test on live data, build portfolios, and get a full report for every result.
Related MCP Servers
AlicenseAqualityDmaintenanceEnables AI assistants to backtest trading strategies described in plain English, providing access to market data, technical indicators, and comprehensive performance reports.131MIT- FlicenseNot gradedqualityDmaintenanceEnables quant research, strategy development, backtesting, and paper trading through natural language prompts, integrated with 20+ AI agents.134-
- AlicenseNot gradedqualityBmaintenanceEnables natural language quantitative analysis for US and Indian equities, including trade plans, portfolio optimization, backtests, and price alerts using real market data.4MIT
- AlicenseBqualityDmaintenanceEnables algorithmic trading on the Shoonya platform through natural language commands, with military-grade encryption for credential security.117 npmISC
Glama MCP Gateway
Add one secure layer between your agents and this server.