Developer API docs
Read-only HTTP API for Pro and VIP (/ext/*) plus Lab export for admin and strategist. Create a key under Panel → API.
Auth
# Machine key (Pro/VIP / lab scopes)
X-API-Key: mtb_live_…
# Or browser session cookie after login (mtb_session)Keys are shown once. Max 3 active keys. About 60 requests per minute. Session users reach Lab by role without a key.
Scopes
read:signals— default on new keys; /ext/* routesread:lab— run metadata, config, coverage, splits, jobsread:trades— trade ledger CSV downloadread:backtest— accepted as a Lab-read alias
Base URL
https://mytraderbot.online/api/v1Subscriber endpoints (/ext)
GET /ext/me— Account and plan summaryGET /ext/signals— Signal list (only_open,symbol,limit,updated_since)- Contract fields: id, strategy_id, created_at, updated_at; English side/status (open|partial|closed|cancelled); close_reason/close_price; tp_hits/remaining_size/realized_r (size-weighted partials). Channel-active at emit (paper label OK).
GET /ext/signals/{id}— signal detailGET /ext/journal— journal rowsGET /ext/journal/stats— journal statsGET /ext/performance— Paper and Live performance
Data bundles & snapshots
Versioned OHLCV cache, system snapshot, and lab download bundles for offline mtb-engine re-runs.
GET /engine/data/bundle— OHLCV cache zip (manifest + sha256); query from/to/tfs/pairsGET /engine/snapshot— active strategies + recent lab artifacts zipGET /lab/runs/{id}/download-bundle.zip— per-run parity bundle (OHLCV + params + trades)GET /engine/meta/GET /engine/download— engine wheel meta / download
These routes require a logged-in strategist/admin session or an API key with lab scopes. Auth is not optional on the site endpoints.
Lab export (read-only)
Each backtest creates a new immutable run id. An admin or strategist session is enough; machine keys need scopes.
GET /lab/contract—read:lab— economics, risk, RSI meaningGET /lab/runs—read:lab— list runs (limit, cursor, strategy_id)GET /lab/runs/{run_id}—read:lab— meta: engine, ranges, hashes, coverageGET /lab/runs/{run_id}/config—read:lab— immutable config and config hashGET /lab/runs/{run_id}/coverage—read:lab— bars, missing, and duplicates per symbolGET /lab/runs/{run_id}/trades.csv—read:trades— full trade ledgerGET /lab/splits—read:lab— training, check, final reserved, and embargoPOST /lab/group-simulate— shared-capital group simulation (not a sum of PnL)GET|POST /lab/jobs— Lab job queuePOST /lab/research/start— registered research: frozen grid, training rank, check gate (final sealed)GET /lab/research/{id}— coverage, hashes, check gate, basketGET /lab/research/{id}/ledger.csv—read:tradesPOST /lab/research/{id}/unseal-final— one-shot final open with confirm_unseal
Engine economics (reproducible)
- Default initial capital is 10,000 per symbol (independent; not a shared basket in a single backtest).
- Taker and maker fees plus slippage. Funding is charged once per elapsed 8 hours on open positions, not every bar.
- Entry: a signal on bar i close fills on bar i+1 open. If stop and target touch together, the stop wins. max_hold_bars and cooldown_bars are supported.
- Check gate: net profit factor at least 1.2 and at least 200 trades. A 60–80% win rate is only a preference. An empty candidate set is a valid result.
Research acceptance path
POST /lab/research/start— snapshot and data, frozen grid, training rank, check gateGET /lab/research/{id}/…/ledger.csvPOST /lab/group-simulate— shared-capital basket- Private paper, then a one-shot unseal of the final window. A failed final taints overlapping retunes.
- Offline sample: python scripts/run_research_acceptance.py
Lab / research example
curl -sS -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"use_snapshot":true}' \
"https://mytraderbot.online/api/v1/lab/research/start"
curl -sS -H "X-API-Key: YOUR_KEY" \
"https://mytraderbot.online/api/v1/lab/research/RESEARCH_ID/ledger.csv" -o ledger.csv/ext example
curl -sS -H "X-API-Key: YOUR_KEY" \
"https://mytraderbot.online/api/v1/ext/signals?only_open=true&limit=50"Signal delay and plan limits match the web app. This API does not place orders or change active channels.