Public Docs
API Access
The partner Market API exposes REST snapshots plus a multiplexed websocket for current prices, states, and alert streams.
What's Inside
- REST base URLs and endpoint coverage for instruments, prices, candles, states, setups, alerts, and market status.
- Websocket path, channel names, authentication format, and subscribe payload examples.
- Concrete sample responses and event envelopes so developers can wire clients quickly.
REST Base URL
https://app.stratalerts.com/api/market/v1
WebSocket URL
wss://app.stratalerts.com/ws/market/v1
REST
Use REST for symbol discovery, current snapshots, and historical candles. Candle intervals are fixed to `1m`, `15m`, `30m`, `60m`, `4h`, `1d`, `1w`, `1mo`, `1q`, and `1y`.
/api/market/v1/instruments
/api/market/v1/instruments/{symbol}
/api/market/v1/prices/latest
/api/market/v1/candles/{symbol}
/api/market/v1/states/{symbol}
/api/market/v1/setups/current
/api/market/v1/alerts/in-force
/api/market/v1/alerts/simultaneous-breaks
/api/market/v1/market-status
Example
GET /api/market/v1/candles/AAPL?interval=15m&limit=100 Authorization: Bearer YOUR_API_KEY
WebSocket
/ws/market/v1
Use one socket and subscribe by channel plus optional symbol lists. REST remains the recovery path after reconnects.
Channels
Subscribe Example
{
"op": "subscribe",
"topics": [
{"channel": "quotes", "symbols": ["AAPL", "MSFT"]},
{"channel": "states", "symbols": ["AAPL"]},
{"channel": "alerts.simultaneous_breaks"}
]
}
REST Response Examples
These examples use the actual top-level shapes returned by the current v1 handlers. Some nested rows are shortened to the most useful fields so the page stays readable.
GET /api/market/v1/instruments?symbols=AAPL,MSFT
{
"items": [
{
"symbol": "AAPL",
"name": "Apple Inc.",
"market": "stocks",
"exchange": "NASDAQ",
"type": "CS",
"sector": "Consumer Electronics",
"active": true
}
]
}
GET /api/market/v1/instruments/AAPL
{
"symbol": "AAPL",
"name": "Apple Inc.",
"market": "stocks",
"exchange": "NASDAQ",
"type": "CS",
"sector": "Consumer Electronics",
"active": true
}
GET /api/market/v1/prices/latest?symbols=AAPL
{
"items": [
{
"symbol": "AAPL",
"price": 203.51,
"ts": "2026-04-05T14:35:00+00:00",
"updated_at": "2026-04-05T14:35:01+00:00",
"prev_close_price": 200.1,
"change_pct": 1.7,
"source": "massive"
}
]
}
GET /api/market/v1/candles/AAPL?interval=15m&limit=2
{
"symbol": "AAPL",
"interval": "15m",
"bars": [
{"time": 1712323800, "open": 200.0, "high": 202.0, "low": 199.5, "close": 201.5, "volume": 5000},
{"time": 1712324700, "open": 201.5, "high": 203.0, "low": 201.0, "close": 202.6, "volume": 4200}
],
"partial_bar_included": true
}
GET /api/market/v1/states/AAPL
{
"symbol": "AAPL",
"instrument": {"symbol": "AAPL", "name": "Apple Inc.", "market": "stocks", "exchange": "NASDAQ"},
"price": {"price": 203.51, "ts": "2026-04-05T14:35:00+00:00", "change_pct": 1.7},
"tfc": {"D": "green", "W": "green", "M": "green"},
"setups": [
{"row_key": "AAPL|D", "timeframe": "D", "in_force": true, "direction": "up", "cc": "2U", "pmg": 3}
],
"default_timeframe": "D",
"chart_timeframes": ["15", "30", "60", "4H", "D", "W", "M", "Q", "Y"]
}
GET /api/market/v1/setups/current?symbols=AAPL
{
"items": [
{
"id": 14822,
"row_key": "AAPL|D",
"symbol": "AAPL",
"sector": "Technology",
"tfc": {"D": "green", "W": "green"},
"c2": "3",
"c1": "2U",
"cc": "2U",
"in_force": true,
"pmg": 3,
"shape": "hammer",
"last": 203.51
}
]
}
GET /api/market/v1/alerts/in-force
{
"items": [
{
"id": 9021,
"setup_id": 14822,
"symbol": "AAPL",
"display_symbol": "AAPL",
"market": "stocks",
"timeframe": "D",
"direction": "up",
"price": 203.0,
"cc": "2U",
"triggered_at": "2026-04-05T14:35:00+00:00",
"target_price": 208.0,
"stop_price": 198.0,
"outcome_status": "pending"
}
]
}
GET /api/market/v1/alerts/simultaneous-breaks
{
"items": [
{
"id": 331,
"trigger_alert_id": 9021,
"timeframe": "15",
"direction": "up",
"threshold": 2,
"matched_count": 2,
"symbol_count": 4,
"symbols": ["ES=F", "NQ=F"],
"display_symbols": ["ES", "NQ"],
"window_minutes": 5,
"window_start": "2026-04-05T14:31:00+00:00",
"window_end": "2026-04-05T14:35:00+00:00",
"triggered_at": "2026-04-05T14:35:00+00:00"
}
]
}
GET /api/market/v1/market-status
{
"market": "stocks",
"timezone": "America/New_York",
"is_open": true,
"session": {
"label": "RTH",
"session_date": "2026-04-05",
"open_ts": "2026-04-05T09:30:00-04:00",
"close_ts": "2026-04-05T16:00:00-04:00"
},
"now": "2026-04-05T14:35:01-04:00"
}
WebSocket Event Examples
Every pushed message uses the same outer envelope: `type`, `ts`, `seq`, and `data`. Sequence values are connection-local and increment for each sent event.
Subscription Ack
{
"type": "subscribed",
"ts": "2026-04-05T14:35:02.000000+00:00",
"seq": "1",
"data": {"channels": ["quotes", "states", "alerts.in_force"]}
}
Quote Stream
{
"type": "quote",
"ts": "2026-04-05T14:35:03.000000+00:00",
"seq": "2",
"data": {
"symbol": "AAPL",
"price": 203.5,
"volume": 12400,
"event_ts": "2026-04-05T14:35:03+00:00"
}
}
State Stream
{
"type": "state",
"ts": "2026-04-05T14:35:04.000000+00:00",
"seq": "3",
"data": {
"symbol": "AAPL",
"timeframe": "D",
"row": {"row_key": "AAPL|D", "cc": "2U", "in_force": true}
}
}
In-Force Alert Stream
{
"type": "alert.in_force",
"ts": "2026-04-05T14:35:05.000000+00:00",
"seq": "4",
"data": {
"id": 9021,
"symbol": "AAPL",
"timeframe": "D",
"direction": "up",
"price": 203.0,
"triggered_at": "2026-04-05T14:35:00+00:00",
"outcome_status": "pending"
}
}
Simultaneous Break Stream
{
"type": "alert.simultaneous_break",
"ts": "2026-04-05T14:35:06.000000+00:00",
"seq": "5",
"data": {
"id": 331,
"timeframe": "15",
"direction": "up",
"threshold": 2,
"matched_count": 2,
"symbols": ["ES=F", "NQ=F"],
"display_symbols": ["ES", "NQ"],
"window_minutes": 5,
"window_start": "2026-04-05T14:31:00+00:00",
"window_end": "2026-04-05T14:35:00+00:00",
"triggered_at": "2026-04-05T14:35:00+00:00"
}
}
Error Example
{
"type": "error",
"ts": "2026-04-05T14:35:07.000000+00:00",
"seq": "6",
"data": {
"code": "missing_scope",
"message": "API key is missing the required scope"
}
}