API Documentation
Complete reference for integrating Stratum into your trading infrastructure. Access real-time regime classifications, risk metrics, and market data through RESTful endpoints and WebSocket streaming.
Introduction
The Stratum API provides programmatic access to real-time market regime classifications, risk metrics, and trading signals across 112+ symbols including stocks, crypto, ETFs, and forex pairs.
All API endpoints return JSON responses and use standard HTTP response codes. The base URL for all requests is:
Authentication
All API requests require authentication using an API key. Include your API key in the request header:
Rate Limits
API rate limits vary by subscription tier to ensure fair usage and system stability:
| Plan | Requests/Minute | Requests/Day | WebSocket Connections |
|---|---|---|---|
| Starter | 10 | 1,000 | N/A |
| Pro | 60 | 50,000 | 5 concurrent |
| Enterprise | 300 | 500,000 | 50 concurrent |
Rate limit information is included in response headers:
Error Handling
The API uses standard HTTP status codes. Error responses include a JSON body with details:
| Status Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Not Found - Symbol or resource not found |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Server-side error |
API Endpoints
Get the current regime classification for a specific symbol. Returns the regime type (trending, ranging, or transition), confidence level, and recommended strategy.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| symbol required | string | Symbol to query (e.g., BTC-USD, AAPL, SPY, EURUSD) |
Example Request
Response
Response Fields
| Field | Type | Description |
|---|---|---|
| symbol | string | The requested symbol |
| regime | string | Current regime: "trending", "ranging", or "transition" |
| signal | string | Trade signal: "favorable", "unfavorable", or "caution" |
| confidence | number | Classification confidence (0.0 to 1.0) |
| volatility | string | Volatility level: "low", "medium", or "high" |
| strategy | string | Recommended strategy: "trend_following", "mean_reversion", or "reduce_risk" |
| timestamp | string | ISO 8601 timestamp of the classification |
Get historical regime classifications for a symbol. Useful for backtesting and analyzing regime changes over time.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| symbol required | string | Symbol to query |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| start_date | string | Start date in ISO 8601 format (default: 30 days ago) |
| end_date | string | End date in ISO 8601 format (default: now) |
| interval | string | Data interval: "1h", "4h", "1d" (default: "1d") |
Example Request
Response
Get risk metrics and position sizing recommendations based on current market conditions and regime classification.
Example Request
Response
Get active alerts and notifications for a symbol, including regime changes and risk warnings.
Response
Get current price and basic market data for a symbol.
Response
Get a list of all available symbols with their current regime classifications.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| category | string | Filter by category: "crypto", "stocks", "etf", "forex" |
| regime | string | Filter by regime: "trending", "ranging", "transition" |
Response
WebSocket API
Subscribe to real-time regime updates via WebSocket for instant notifications when market conditions change.
Connection
Example: Python WebSocket Client
Message Format
The server sends JSON messages whenever the regime classification changes or at regular intervals (configurable):
Subscription Control
Send commands to the WebSocket to control your subscription: