TRADER MODE AI

Developer API (v1)

A read-only REST API over the same deterministic services the app uses: market-data status, indicator snapshots, rule-engine setups, risk sizing, economic-event risk and your own journal analytics. Every answer carries its data source, freshness label and rules version. There is no trade execution.

Create an API key (free account) →

Authentication

curl https://www.tradermodeai.com/api/public/v1/setups/XAUUSD?timeframe=H4 \
  -H "Authorization: Bearer tm_live_YOUR_KEY"

Endpoints

Base URL: https://www.tradermodeai.com/api/public/v1

GET/markets

Price, previous daily close, data status and time for each market (locked markets return no price).

GET/markets/{symbol}/indicators?timeframe=H4Symbol must be in your plan

EMA 20/50/200, RSI 14, MACD, ATR 14 and trend/momentum/volatility summary. Timeframes: M5 M15 M30 H1 H4 D1.

GET/setups/{symbol}?timeframe=H4Symbol must be in your plan

Current rule-engine classification (BUY_SETUP, SELL_SETUP, WAIT, INVALIDATED, DATA_UNAVAILABLE) with evidence, entry zone, stop, targets and rules version. Timeframes: M15 H1 H4 D1.

POST/risk

Position size from a JSON body with symbol, balance, risk_percent, entry, stop and optional target. Lots are rounded down to 0.01.

GET/calendar/risk?symbol=XAUUSD&hours=24

High and medium impact economic events affecting a market in the next 1–168 hours.

GET/journal/statsVIP

Statistics from trades you logged in your own journal (never other members').

Response format

{
  "api_version": "v1",
  "request_id": "6f1c…",
  "data": { … },
  "provenance": {
    "source": "Deterministic rule engine (no AI)",
    "data_status": "LIVE",          // DEMO | LIVE | DELAYED | STALE | UNAVAILABLE
    "as_of": "2026-10-27T15:00:00.000Z",
    "rules_version": "tm-rules-1.0"
  }
}

// errors
{ "api_version": "v1", "request_id": "…", "error": { "code": "rate_limited", "message": "…" } }

The v1 response shape is stable: fields are only added, never renamed or removed. Breaking changes will ship as /v2 with notice on the changelog.

Error codes

400invalid_requestMissing or invalid parameters; message lists each field.
401unauthorized / key_revokedNo key, wrong key or revoked key.
403forbidden_planYour plan does not include this market or endpoint.
404not_foundUnknown endpoint or symbol.
429rate_limited / quota_exceededOver 30 requests per minute or 1000 per 24 hours. Honour Retry-After.
500internal_errorUnexpected error; quote the request_id when contacting support.

Security

  • Keys are random 256-bit secrets shown once; only a SHA-256 fingerprint is stored. Revoke a key at any time and it stops working immediately.
  • Keys act as your account: plan limits apply, and journal statistics only ever include your own trades.
  • Every request is logged (time, endpoint, status, request ID) and visible to you on the API keys page.
  • All endpoints are read-only. No endpoint can place, modify or close trades, or change your account.
  • Keep keys on a server or in a private script; never put them in public web pages or shared files.

Educational data and rule-based observations, not financial advice. Prices may be delayed; always check data_status.