# API reference Every route, grouped the way you use them. Each one with its parameters, every field of the request and response, every error, and copy-ready calls in curl, Python and JavaScript. ## All routes | Method | Path | Scope | What | |---|---|---|---| | GET | `/api/v1/accounts` | read | List accounts | | POST | `/api/v1/accounts` | admin | Add an account | | GET | `/api/v1/accounts/{id}` | read | Get an account | | PATCH | `/api/v1/accounts/{id}` | admin | Update an account | | DELETE | `/api/v1/accounts/{id}` | admin | Remove an account | | GET | `/api/v1/accounts/{id}/summary` | read | Get balance and margin | | GET | `/api/v1/overview` | read | Get every account's summary | | GET | `/api/v1/accounts/{id}/ready` | read | Check the account is ready | | GET | `/api/v1/accounts/{id}/stats` | read | Get account statistics | | GET | `/api/v1/accounts/{id}/symbols` | read | Search symbols | | GET | `/api/v1/accounts/{id}/symbols/{symbol}` | read | Get a symbol's spec | | GET | `/api/v1/accounts/{id}/specs` | read | Get many symbol specs | | GET | `/api/v1/accounts/{id}/quotes` | read | Get quotes | | DELETE | `/api/v1/accounts/{id}/quotes` | read | Let quotes go | | GET | `/api/v1/accounts/{id}/candles` | read | Get candles | | POST | `/api/v1/accounts/{id}/candles/batch` | read | Get candles for many ranges | | GET | `/api/v1/accounts/{id}/book` | read | Get an order book | | DELETE | `/api/v1/accounts/{id}/book` | read | Release an order book | | GET | `/api/v1/accounts/{id}/ticks` | read | Get recent ticks | | GET | `/api/v1/accounts/{id}/stream` | read | Stream prices and events (SSE) | | GET | `/api/v1/accounts/{id}/ws` | read | Stream prices and events (WebSocket) | | GET | `/api/v1/accounts/{id}/trades` | read | Read trade events since an id | | GET | `/api/v1/accounts/{id}/positions` | read | List open positions | | GET | `/api/v1/accounts/{id}/orders` | read | List pending orders | | POST | `/api/v1/accounts/{id}/orders` | trade | Place an order | | GET | `/api/v1/accounts/{id}/orders/history` | read | List past orders | | GET | `/api/v1/accounts/{id}/orders/{ticket}` | read | Get one pending order | | PATCH | `/api/v1/accounts/{id}/orders/{ticket}` | trade | Modify a pending order | | DELETE | `/api/v1/accounts/{id}/orders/{ticket}` | trade | Cancel a pending order | | GET | `/api/v1/accounts/{id}/positions/{ticket}` | read | Get one open position | | PATCH | `/api/v1/accounts/{id}/positions/{ticket}` | trade | Set SL and TP | | DELETE | `/api/v1/accounts/{id}/positions/{ticket}` | trade | Close a position | | GET | `/api/v1/accounts/{id}/deals` | read | List deals | | GET | `/api/v1/accounts/{id}/calc` | read | Work out margin and profit | | POST | `/api/v1/accounts/{id}/order_check` | read | Check an order without sending it | | POST | `/api/v1/accounts/{id}/order_send` | trade | Send a raw MetaTrader request | | GET | `/api/v1/audit` | admin | Read the audit trail | | GET | `/api/v1/accounts/{id}/events` | read | Get connection history | | GET | `/api/v1/accounts/{id}/equity` | read | Get the equity curve | | GET | `/api/v1/keys/{id}/traffic` | admin | See a key's traffic | | GET | `/api/v1/connections` | admin | See who is connected | | GET | `/api/v1/keys` | admin | List keys | | POST | `/api/v1/keys` | admin | Create a key | | PATCH | `/api/v1/keys/{id}` | admin | Edit a key | | DELETE | `/api/v1/keys/{id}` | admin | Revoke a key | | GET | `/api/v1/health` | No key needed | Check health | | GET | `/api/v1/setup` | No key needed | Check whether setup is needed | | POST | `/api/v1/setup` | No key needed | Finish first-run setup | | POST | `/api/v1/session` | No key needed | Sign in to the dashboard | | DELETE | `/api/v1/session` | No key needed | Sign out | | GET | `/api/v1/me` | Any key | Who am I | | PUT | `/api/v1/admin/password` | admin | Change the admin password | | GET | `/api/v1/status` | read | Get the status report | | GET | `/api/v1/metrics` | read | Get Prometheus metrics | | GET | `/api/v1/servers` | admin | Search broker servers | | POST | `/api/v1/servers/check` | admin | Check an address | | POST | `/api/v1/servers/{server}/trust` | admin | Pin a certificate key | | DELETE | `/api/v1/servers/{server}/trust` | admin | Remove a pinned key | | GET | `/api/v1/diagnostics` | admin | Get diagnostics | | GET | `/api/v1/diagnostics/undecoded` | admin | List undecoded frames | | GET | `/api/v1/diagnostics/doctor` | admin | Run the doctor | | GET | `/api/v1/diagnostics/crashes/{name}` | admin | Get a crash report | | GET | `/api/v1/diagnostics/logs` | admin | Get the log | ## Objects Every JSON shape, field by field, is in /docs/reference/objects.md. The same shapes as JSON Schema are in /api/openapi.json.