Time Machine — bulk revert accounts to a trading day
Time Machine, org-wide: the same operation as the single-account revert, applied to many accounts in one call — built for exchange/platform outages.
Pass accountIds (max 1000) for a targeted revert, or allAccounts: true to revert every account in your organization that has traded. Each account is processed independently: the response lists per-account results and per-account failures (one bad account never aborts the batch — per-account error codes match the single-account endpoint). All changes share one batchId in the audit trail.
Undoable. The returned batchId is a Time Machine ledger entry (GET /revert-batches). If the batch was a mistake, POST /revert-batches/{batchId}/undo restores every account in it to its pre-revert state in one call — accounts with new trader activity since the revert are skipped and reported individually.
Batch-level error codes:
| Code | Status | Meaning |
|---|---|---|
NO_ACCOUNTS | 400 | Nothing to revert (empty accountIds, or allAccounts found no affected accounts) |
TOO_MANY_ACCOUNTS | 400 | More than 1000 accounts in one call — split into batches |
Recommended flow: run with "preview": true first — you get the full per-account impact report (balances restored, accounts revived, orders voided) with zero changes — then execute.
Example — preview an org-wide revert, then execute:
# 1. Dry run
curl -X POST ".../v1/organization/accounts/revert-trading-day" \
-H "X-API-Key: hp_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{ "tradingDay": "2026-07-07", "allAccounts": true, "reason": "CME data feed outage on 2026-07-08", "preview": true }'
# 2. Execute
curl -X POST ".../v1/organization/accounts/revert-trading-day" \
-H "X-API-Key: hp_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{ "tradingDay": "2026-07-07", "allAccounts": true, "reason": "CME data feed outage on 2026-07-08" }'
Authorizations
JWT Bearer token for user session auth. Format: "Bearer {token}". Used by User and Organization endpoints.
Body
Chicago trading day (YYYY-MM-DD) to revert TO
^\d{4}-\d{2}-\d{2}$"2026-07-07"
Why — audit trail, account metadata, webhooks
3"CME data feed outage on 2026-07-08"
Specific accounts to revert (max 1000 per call)
1 - 1000 elementsRevert every account in the organization with activity after the target day (post-day trades or snapshots) — including accounts created during the outage day itself. Untouched accounts are skipped.
true Dry run: per-account report of what WOULD happen, nothing changed. Use it to build the confirmation screen before an org-wide revert.
true
Related topics
Time Machine — revert an account to a trading dayTime Machine — list revert batchesTime Machine — inspect a revert batchTime Machine — undo a revert batchList roles (system presets + your custom roles)