API Reference
Complete API reference for the SynthTrader platform. 22 controllers covering every aspect of strategy creation, execution, and monitoring.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/patches | List all saved patches |
| GET | /api/patches/{id} | Get a single patch by ID |
| POST | /api/patches | Create a new empty patch |
| PUT | /api/patches/{id} | Update patch metadata (name, description, mode) |
| DEL | /api/patches/{id} | Delete a patch |
| POST | /api/patches/bulk-delete | Bulk delete patches by ID list |
| POST | /api/patches/{id}/load | Load a saved patch into the live engine |
| GET | /api/patches/{id}/export | Export patch as downloadable .synth JSON |
| POST | /api/patches/{id}/save | Save current engine state to database |
| POST | /api/patches/{id}/clone-with-params | Clone a patch with parameter overrides |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/strategies | Get all strategy statuses |
| GET | /api/strategies/{id} | Get a single strategy status |
| POST | /api/strategies/deploy | Deploy a new strategy from a patch |
| POST | /api/strategies/{id}/start | Start a strategy |
| POST | /api/strategies/{id}/pause | Pause a strategy |
| POST | /api/strategies/{id}/stop | Stop a strategy |
| DEL | /api/strategies/{id} | Remove a strategy |
| GET | /api/strategies/{id}/logs | Get strategy logs |
| GET | /api/strategies/{id}/parameters | Get strategy module parameters |
| POST | /api/strategies/{id}/orders | Submit an order for a strategy |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/modules | Get all registered module definitions |
| GET | /api/modules/{typeName} | Get a specific module definition by type name |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/backtests | Start a new backtest |
| GET | /api/backtests | List all backtests |
| GET | /api/backtests/{id} | Get a single backtest by ID |
| GET | /api/backtests/{id}/equity | Get equity curve for a completed backtest |
| GET | /api/backtests/{id}/trades | Get trades for a completed backtest |
| POST | /api/backtests/{id}/monte-carlo | Run Monte Carlo robustness analysis |
| POST | /api/backtests/compare | Compare multiple backtests |
| POST | /api/backtests/walk-forward | Start walk-forward analysis |
| GET | /api/backtests/walk-forward | List all walk-forward runs |
| GET | /api/backtests/walk-forward/{id} | Get a single walk-forward run |
| POST | /api/backtests/{id}/validate | Validate backtest against quality criteria |
| POST | /api/backtests/{id}/sensitivity | Start sensitivity analysis |
| GET | /api/backtests/{id}/sensitivity/{sid} | Get sensitivity analysis results |
| POST | /api/backtests/{id}/cancel | Cancel a running backtest |
| DEL | /api/backtests/{id} | Delete a backtest |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/optimizer/jobs | Start a new optimizer job |
| GET | /api/optimizer/jobs | List all optimizer jobs |
| GET | /api/optimizer/jobs/{id} | Get a single optimizer job |
| GET | /api/optimizer/jobs/{id}/leaderboard | Get optimizer trial leaderboard |
| GET | /api/optimizer/jobs/{id}/best | Get the best optimizer result |
| GET | /api/optimizer/jobs/{id}/summary | Get optimizer job summary |
| POST | /api/optimizer/jobs/{id}/stop | Stop a running optimizer job |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/trades/orders | Get orders with optional status and strategy filters |
| GET | /api/trades/positions | Get positions derived from fill history |
| GET | /api/trades/fills | Get fills with optional strategy filter |
| GET | /api/trades/blotter | Get trade blotter (orders with nested fills) |
| GET | /api/trades/blotter/summary | Get blotter summary statistics |
| GET | /api/trades/stylized-facts | Get stylized facts validation report |
| POST | /api/trades/orders | Submit a new order |
| DEL | /api/trades/orders/{id} | Cancel an order |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/risk/status | Get current risk status |
| POST | /api/risk/kill-switch | Activate emergency kill switch |
| POST | /api/risk/heartbeat | Send risk heartbeat (dead-man switch) |
| GET | /api/risk/alerts | Get risk alerts |
| GET | /api/risk/limits/strategy | Get strategy risk limits |
| PUT | /api/risk/limits/strategy | Update strategy risk limits |
| GET | /api/risk/limits/portfolio | Get portfolio risk limits |
| PUT | /api/risk/limits/portfolio | Update portfolio risk limits |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/market/bars | Get OHLCV bars (symbol, venue, timeframe, count) |
| POST | /api/market/loadtest/run | Run market data load test |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/instruments | Get all instruments with filters (market, assetClass, venue, search) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/ledger/{strategyId}/balances | Get ledger balances (Cash, Position, Fees, PnL, Margin) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/library | List all .synth strategy files with metadata |
| POST | /api/library/load/{**path} | Load a .synth file into the engine |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/overwatch/status | Get current Overwatch status (multi-pair) |
| POST | /api/overwatch/start | Start the Overwatch system |
| POST | /api/overwatch/stop | Stop the Overwatch system |
| PUT | /api/overwatch/config | Update Overwatch configuration |
| GET | /api/overwatch/history | Get recent Overwatch events |
| GET | /api/overwatch/performance | Get strategy performance by regime |
| GET | /api/overwatch/snapshots | Get continuous regime snapshots |
| PUT | /api/overwatch/trading | Toggle ObserveOnly mode |
| GET | /api/overwatch/watchlist | Get current watched pairs |
| PUT | /api/overwatch/watchlist | Update watched pairs |
| PATCH | /api/overwatch/watchlist/{key} | Patch a single watched pair |
| GET | /api/overwatch/portfolios | Get regime-to-strategy portfolio mapping |
| PUT | /api/overwatch/portfolios | Update regime portfolio assignments |
| GET | /api/overwatch/capital | Get venue capital and allocation breakdown |
| PUT | /api/overwatch/capital/allocations | Update capital allocation percentages |
| GET | /api/overwatch/verification/accuracy | Get regime detection accuracy metrics |
| GET | /api/overwatch/verification/matrix | Get regime confusion matrix |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/screener | Get current screener results sorted by score |
| GET | /api/screener/presets | Get available screener presets |
| PUT | /api/screener/config | Update screener configuration |
| GET | /api/screener/config | Get current screener configuration |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/supervisor/status | Get supervisor status, last decision, next run time |
| POST | /api/supervisor/start | Start the supervisor loop |
| POST | /api/supervisor/stop | Stop the supervisor loop |
| GET | /api/supervisor/decisions | Get recent supervisor decisions (audit trail) |
| PUT | /api/supervisor/config | Update supervisor configuration |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/strategy-builder/generate | Generate a .synth strategy from natural language (AI) |
| POST | /api/strategy-builder/generate-and-load | Generate and load strategy as active patch (AI) |
| POST | /api/strategy-builder/explain | Get natural language explanation of a patch (AI) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/strategy-discovery/search | Semantic search over the strategy index |
| GET | /api/strategy-discovery/top | Get top strategies by metric (sharpe, etc.) |
| POST | /api/strategy-discovery/index | Index a strategy result |
| GET | /api/strategy-discovery/stats | Get strategy index statistics |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/alerts | List alerts with filters (type, severity, strategy_id) |
| GET | /api/alerts/recent | Get 50 most recent alerts |
| GET | /api/webhooks | List all webhook destinations |
| POST | /api/webhooks | Add a new webhook destination |
| PUT | /api/webhooks/{id} | Update a webhook destination |
| DEL | /api/webhooks/{id} | Delete a webhook destination |
| POST | /api/webhooks/{id}/test | Send a test alert to a webhook |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/secrets | Get all secrets (metadata only, values never returned) |
| POST | /api/secrets | Create a new secret (AES-256-GCM encrypted) |
| PUT | /api/secrets/{id} | Update a secret's value |
| DEL | /api/secrets/{id} | Delete a secret |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/leaderboard | Get strategy leaderboard rankings |
| GET | /api/leaderboard/overview | Get leaderboard overview |
| GET | /api/leaderboard/{id}/stats | Get detailed stats for a strategy |
| GET | /api/leaderboard/{id}/equity-curve | Get equity curve for a strategy |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/venues | List all venues with enabled state and connectivity |
| PUT | /api/admin/venues/{venueId} | Toggle a venue's enabled state |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health | API health status (patch info, module/cable counts) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /docs | Documentation landing page |
| GET | /docs/api | Interactive API reference |
| GET | /docs/modules | Module catalog |
| GET | /docs/signalr | SignalR reference |
| GET | /docs/signals | Signal types reference |
Bidirectional real-time communication via SignalR with MessagePack binary protocol.
| Hub | Endpoint | Purpose |
|---|---|---|
| PatchHub | /hubs/patch | Module/cable CRUD, parameter updates |
| ProbeHub | /hubs/probe | Real-time signal data streaming |
| StateHub | /hubs/state | Patch lifecycle and activation |
| LogHub | /hubs/logs | Structured log broadcasting |
| TradeHub | /hubs/trades | Trade fill notifications |
| StrategyHub | /hubs/strategy | Strategy lifecycle and status |
| MarketHub | /hubs/market | Live market ticker data (4Hz) |
| RiskHub | /hubs/risk | Risk events, dead-man switch |
| BacktestHub | /hubs/backtest | Backtest progress streaming |
| OverwatchHub | /hubs/overwatch | Regime + strategy status (1Hz) |
| ScreenerHub | /hubs/screener | Multi-symbol scan results |
| SupervisorHub | /hubs/supervisor | AI supervisor audit trail |