Home · Pricing

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

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/* routes
  • read:lab — run metadata, config, coverage, splits, jobs
  • read:trades — trade ledger CSV download
  • read:backtest — accepted as a Lab-read alias

Base URL

Base URL
https://mytraderbot.online/api/v1

Subscriber endpoints (/ext)

  • GET /ext/me — Account and plan summary
  • GET /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 detail
  • GET /ext/journal — journal rows
  • GET /ext/journal/stats — journal stats
  • GET /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/pairs
  • GET /engine/snapshot — active strategies + recent lab artifacts zip
  • GET /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 meaning
  • GET /lab/runs — read:lab — list runs (limit, cursor, strategy_id)
  • GET /lab/runs/{run_id} — read:lab — meta: engine, ranges, hashes, coverage
  • GET /lab/runs/{run_id}/config — read:lab — immutable config and config hash
  • GET /lab/runs/{run_id}/coverage — read:lab — bars, missing, and duplicates per symbol
  • GET /lab/runs/{run_id}/trades.csv — read:trades — full trade ledger
  • GET /lab/splits — read:lab — training, check, final reserved, and embargo
  • POST /lab/group-simulate — shared-capital group simulation (not a sum of PnL)
  • GET|POST /lab/jobs — Lab job queue
  • POST /lab/research/start — registered research: frozen grid, training rank, check gate (final sealed)
  • GET /lab/research/{id} — coverage, hashes, check gate, basket
  • GET /lab/research/{id}/ledger.csv — read:trades
  • POST /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

  1. POST /lab/research/start — snapshot and data, frozen grid, training rank, check gate
  2. GET /lab/research/{id} / …/ledger.csv
  3. POST /lab/group-simulate — shared-capital basket
  4. Private paper, then a one-shot unseal of the final window. A failed final taints overlapping retunes.
  5. Offline sample: python scripts/run_research_acceptance.py

Lab / research example

curl
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
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.

Developer API · MyTraderBot