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
/marketsPrice, previous daily close, data status and time for each market (locked markets return no price).
/markets/{symbol}/indicators?timeframe=H4Symbol must be in your planEMA 20/50/200, RSI 14, MACD, ATR 14 and trend/momentum/volatility summary. Timeframes: M5 M15 M30 H1 H4 D1.
/setups/{symbol}?timeframe=H4Symbol must be in your planCurrent 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.
/riskPosition size from a JSON body with symbol, balance, risk_percent, entry, stop and optional target. Lots are rounded down to 0.01.
/calendar/risk?symbol=XAUUSD&hours=24High and medium impact economic events affecting a market in the next 1–168 hours.
/journal/statsVIPStatistics 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
| 400 | invalid_request | Missing or invalid parameters; message lists each field. |
| 401 | unauthorized / key_revoked | No key, wrong key or revoked key. |
| 403 | forbidden_plan | Your plan does not include this market or endpoint. |
| 404 | not_found | Unknown endpoint or symbol. |
| 429 | rate_limited / quota_exceeded | Over 30 requests per minute or 1000 per 24 hours. Honour Retry-After. |
| 500 | internal_error | Unexpected 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.