API Reference
TRADEOS.tech exposes a REST API and WebSocket interface for integration, monitoring, and control.
Base URL
http://localhost:18000
Authentication
If TRADEOS_TOOL_TOKEN is set in .env, all API requests require a Bearer token:
Authorization: Bearer <your-token>
Without the token set, all endpoints are open (development mode only).
Health endpoints
GET /healthz
Returns system health and dependency status.
Response:
{
"status": "healthy",
"services": {
"redis": "healthy",
"postgres": "healthy",
"signal_engine": "healthy",
"execution": "healthy"
},
"timestamp": "2026-03-10T16:00:00Z"
}
Portfolio endpoints
GET /portfolio
Returns current portfolio state.
Response:
{
"total_value": 102450.00,
"cash": 87230.00,
"unrealized_pnl": 1250.00,
"realized_pnl_today": 980.00,
"drawdown": 0.02,
"positions": [...]
}
GET /positions
Returns all open positions.
GET /trades
Returns recent trade history.
Query params:
limit— number of trades to return (default: 50)symbol— filter by symbolsince— ISO timestamp filter
Signal endpoints
GET /signals
Returns recent signals from the pipeline.
Query params:
limit— number of signals (default: 100)signal_type— filter by typesymbol— filter by symbol
Control endpoints
POST /trading/halt
Immediately halts all trading activity. Equivalent to setting the Redis kill switch.
POST /trading/resume
Resumes trading after a halt.
POST /profile
Sets the active strategy profile.
Body:
{
"profile": "balanced"
}
Valid values: conservative, balanced, aggressive
WebSocket
Connect to ws://localhost:18000/ws for real-time updates.
Message types received:
portfolio_update— portfolio value and position changessignal— new signal eventsfill— order fill notificationsrisk_event— circuit breaker and limit breach eventsregime_change— market regime classification updates
Authentication: Pass token as query param: ws://localhost:18000/ws?token=<your-token>
Metrics API
The Metrics API at port 18003 provides aggregated performance metrics:
GET /metrics/performance
Returns performance statistics (Sharpe ratio, win rate, average trade duration, etc.).
GET /metrics/signals
Returns signal-level performance metrics (IC, win rate, contribution to P&L by signal type).
GET /metrics/system
Returns system-level metrics (latency, rejection rates, circuit breaker activations).