Base URL
https://api.robotcopier.com
Authentication
Every request must carry an Authorization: Bearer <jwt> header. Tokens are issued by POST /auth/login with your email + password and last 8 hours; refresh-token rotation arrives with Provider plan API keys in the next release.
Endpoints (stable)
GET /accounts
List MT5 accounts owned by the caller.
POST /accounts
Register a new MT5 account. Body: {label, brokerName, login, password, serverName, region}
PATCH /accounts/:id
Partial update. Supply password to rotate the encrypted broker credential, active to pause / resume.
GET /copies
List copy relationships with rule + symbol-mapping counts.
POST /copies
Create a relationship.
PATCH /copies/:id
Toggle enabled or update any rule field: lotScale, lotSizingMode (multiplier | balance), fixedLot, maxLotsPerTrade, maxOpenLots, copyStopLoss, copyTakeProfit, invertDirection, copyPendingOrders, riskFailOpen, maxOpenSlippagePips, drawdownBreakerPct. Any field you omit is left alone.
fixedLot overrides lotSizingMode entirely — the follower opens that size whatever the source traded. Send 0 to switch it off; sending a lotSizingMode without a fixedLot also clears it. The same 0-clears convention applies to maxOpenSlippagePips and drawdownBreakerPct.
Responds 200 with the relationship as stored, including effectiveSizing (multiplier | balance | fixed) — use that rather than deriving it, since a fixed lot overrides the mode.
GET /trades?page=&limit=&verdict=°raded=
Paged trade-event history (newest first) with the engine's risk verdict, latency, destination label. Server-side filter by verdict (allow/scale/block/failed/deferred) and degraded=1; page (1-based) + limit (default 50, max 200).
GET /trades/summary
Full-history verdict breakdown + degraded + total counts (page/filter-independent) — drives the verdict tiles and page count.
GET /system/metrics
Caller-scoped KPIs: floating P&L, engine latency p50, blocked verdicts today.
GET /system/quotes
Anonymous. Latest mid-quotes for the ticker symbols on the marketing landing.
Webhooks (preview)
Server-sent webhook deliveries on copy.attempt, copy.success, copy.failure events are in private preview for Provider customers — write to [email protected] if you want early access.
OpenAPI 3.1 spec at https://api.robotcopier.com/swagger/v1/swagger.json when accessed from an authenticated session. We'll ship a versioned spec + client SDKs (TS, Python, Go) in v2.5.