Export Strategy
tt_export_strategyExport 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"strategy_id": "<strategy_id>"
},
"name": "tt_export_strategy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| strategy_id | Yes |