{"message":"XAU Admin API","version":"1.0.0","endpoints":{"health":"/health","auth":"/api/auth","users":"/api/users","accounts":"/api/accounts","stats":"/api/stats","calendar":"/api/calendar","notifications":"/api/notifications","priceAction":"/api/price-action","strategies":"/api/accounts/:accountId/strategies"},"documentation":{"auth":{"POST /api/auth/login":"User login (requires: identifier, password)","POST /api/auth/verify":"Verify JWT token","POST /api/auth/refresh":"Refresh JWT token"},"users":{"GET /api/users":"Get all users","GET /api/users/:id":"Get user by ID","POST /api/users":"Create new user (requires: username, email, password)","PUT /api/users/:id":"Update user","PATCH /api/users/:id/password":"Update user password","DELETE /api/users/:id":"Delete user permanently","PATCH /api/users/:id/deactivate":"Deactivate user","PATCH /api/users/:id/activate":"Activate user"},"accounts":{"GET /api/accounts":"List all MT5 accounts (admin)","PUT /api/accounts/order":"Persist custom account list order (admin)","GET /api/accounts/:id":"Get account (no password) + account-level risk_mngt and hard_stop_mngt (admin)","GET /api/accounts/:id/logs":"Current xau_bot.log.jsonl entries, newest first (admin; ?lvl=&event=&key=&page=&limit=)","POST /api/accounts":"Create account + spin up container (admin)","PUT /api/accounts/:id":"Update account credentials, risk_mngt and hard_stop_mngt (admin)","DELETE /api/accounts/:id":"Delete account + stop container (admin)","GET /api/accounts/hard-stop/state":"Report whether any strategy is enabled (admin)","POST /api/accounts/hard-stop":"Hard-stop every strategy on every account (admin)","GET /api/accounts/:id/hard-stop/state":"Report enabled strategies for one account (admin)","POST /api/accounts/:id/hard-stop":"Hard-stop every strategy on one account (admin)","POST /api/accounts/close-positions":"Close all open positions on every account (admin; all strategies must be disabled)","POST /api/accounts/:id/close-positions":"Close all open positions on one account (admin; all strategies must be disabled)"},"stats":{"GET /api/stats":"Latest account stats snapshot (price + equity + exposure, admin)","GET /api/stats?accountId=1":"Stats snapshot for a specific account (admin)","GET /api/stats/accounts":"Net exposure snapshot for every account (admin)"},"calendar":{"GET /api/calendar/events":"Economic calendar events for the next 8 days","GET /api/calendar/events?minImpact=high&currencies=USD,EUR":"Filter by impact and currency","GET /api/calendar/status":"Ingest freshness and event coverage","POST /api/calendar/refresh":"Force a calendar ingest (admin)"},"notifications":{"GET /api/notifications/config":"VAPID public key and whether push is configured","GET /api/notifications/preferences":"Own alert preferences","PUT /api/notifications/preferences":"Update own alert preferences","GET /api/notifications/subscriptions":"Own registered devices","POST /api/notifications/subscriptions":"Register this browser for push","DELETE /api/notifications/subscriptions":"Remove a device (requires: endpoint)","POST /api/notifications/test":"Send a test push to own devices","GET /api/notifications/status":"Dispatcher health (admin)"},"priceAction":{"GET /api/price-action":"H1 folded to daily OHLC","GET /api/price-action?intraday=1":"Same plus M15/M5/M1 mean range and |open-close|","GET /api/price-action?from=2024-01-01&to=2026-08-13&accountId=1":"Filter by date and account","GET /api/price-action/status":"CSV path, bar count, last EA write"},"strategies":{"GET /api/accounts/:accountId/strategies":"List strategies for account (admin)","POST /api/accounts/:accountId/strategies":"Create strategy for account (admin)","PUT /api/accounts/:accountId/strategies/:id":"Replace strategy by id (admin)","DELETE /api/accounts/:accountId/strategies/:id":"Delete strategy by id (admin)"}}}