Stocklake API
MCP-native stock intelligence. Prices, fundamentals, technical ratings, and AI-analysed news — served over Streamable HTTP.
Not financial advice. All data, ratings, signals, and AI assessments provided by this API are for informational and research purposes only. Nothing here constitutes investment advice, a recommendation to buy or sell any security, or a solicitation of any kind. Always do your own research and consult a qualified financial advisor before making investment decisions.
Authentication
Pass your API key as a Bearer token in the Authorization header on every request.
Authorization: Bearer sl_your_key_here
Get a free key at /login — enter your email, click the link in your inbox, and your key is created automatically. No password, no captcha. Free keys are valid 30 days; rotate or renew anytime from your dashboard.
No key? You can call get_stock without any authorization header — 500 calls/day, no signup needed. A free key adds get_stock_history, get_stocks, search_stocks, get_company_profile, and get_earnings_calendar. Pro unlocks all 6 AI-powered tools (news, rating, outlook, regime, sector intelligence, sentiment).
Claude.ai? Add https://api.stocklake.dev/mcp as a remote MCP server — the OAuth consent flow handles auth automatically. See Claude.ai setup.
Transport
The API uses the MCP Streamable HTTP transport (protocol version 2025-11-25). All tool calls are POST requests to the endpoint below.
https://api.stocklake.dev/mcp
Every MCP-compatible client works out of the box. Raw HTTP is also supported — see the curl section.
Rate limits
| Tier | Requests / day | Tools | Key expiry |
| guest (no key) | 500 | get_stock only | — |
| free | 500 | get_stock, get_stock_history, get_stocks, search_stocks, get_company_profile, get_earnings_calendar | 30 days |
| pro | 5000 | All 12 tools | None |
Exceeding the daily request limit returns HTTP 429. Limits reset at midnight UTC.
Every authenticated response includes these headers:
| Header | Description |
| X-RateLimit-Limit | Your daily request cap |
| X-RateLimit-Remaining | Requests remaining today |
| X-RateLimit-Reset | Unix timestamp when the counter resets (midnight UTC) |
| X-Key-Expires-At | ISO 8601 timestamp when the key expires (free tier: 30 days from creation, renewable from dashboard). Not present on Pro keys. |
Quickstart
# 1. Initialize
POST /mcp
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"my-agent","version":"1.0"}}}
# 2. Call a tool (free tier example)
POST /mcp
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_stock","arguments":{"symbol":"AAPL"}}}
get_stock free
Returns price, fundamentals, and technical indicators for a ticker.
Parameters
| Name | Type | Description |
| symbol | string | Ticker symbol, e.g. AAPL. Case-insensitive. |
Response fields
| Field | Type | Description |
| symbol | string | Ticker |
| name | string | Company full name |
| short_name | string | Display name (shorter form) |
| sector | string | Sector classification |
| industry | string | Industry classification |
| country | string | Country of listing |
| currency | string | Reporting currency |
| exchange | string | Exchange code |
| price | number | Current price |
| change_pct | number | Day change % |
| volume | number | Day volume |
| prev_close | number | Previous close |
| week52_high / week52_low | number | 52-week range |
| ma_50 | number | 50-day moving average |
| ma_200 | number | 200-day moving average |
| market_cap | number | Market capitalisation |
| beta | number | Beta vs market |
| pe_trailing / pe_forward | number | P/E ratios (trailing and forward) |
| dividend_yield | number | Annual dividend yield |
| debt_to_equity | number | D/E ratio |
| profit_margins | number | Net profit margin |
| revenue_growth / earnings_growth | number | YoY growth rates |
| return_on_equity | number | ROE |
| analyst_rating | string | Analyst consensus (buy / hold / sell) |
| analyst_rating_score | number | Analyst consensus score (1=strong buy … 5=strong sell) |
| analyst_target | number | Analyst mean price target |
| indicators | object | Technical indicators: rsi, macd{macd_line, signal_line, histogram}, bollinger_bands{upper_band, middle_band, lower_band} |
| updated_at | string | Data freshness timestamp (ISO 8601) |
Example
{
"symbol": "NVDA",
"name": "NVIDIA Corporation",
"price": 116.78,
"change_pct": 2.31,
"market_cap": 2847000000000,
"pe_trailing": 38.2,
"analyst_rating": "buy",
"analyst_target": 165.00,
"indicators": {
"rsi": 58.4,
"macd": { "macd_line": 1.23, "signal_line": 0.94, "histogram": 0.29 },
"bollinger_bands": { "upper_band": 124.1, "middle_band": 114.3, "lower_band": 104.5 }
}
}
Example — META (Communication Services, strong buy consensus)
{
"symbol": "META",
"name": "Meta Platforms Inc.",
"short_name": "Meta",
"price": 635.29,
"change_pct": 1.54,
"volume": 18720000,
"market_cap": 1612600000000,
"pe_trailing": 27.8,
"analyst_rating": "strong_buy",
"analyst_target": 725.00,
"indicators": {
"rsi": 65.3,
"macd": { "macd_line": 8.45, "signal_line": 6.12, "histogram": 2.33 },
"bollinger_bands": { "upper_band": 652.80, "middle_band": 598.40, "lower_band": 544.00 }
}
}
get_stocks free+
Batch stock data for up to 10 symbols in a single call. Returns prices, fundamentals, and indicators keyed by symbol. Use this instead of calling get_stock multiple times.
| Parameter | Type | Default | Description |
| symbols | array of strings | required | Stock tickers (max 10). Invalid symbols are silently skipped. |
curl -s https://api.stocklake.dev/mcp \
-H "Authorization: Bearer sl_your_key" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_stocks","arguments":{"symbols":["JPM","GS"]}}}'
Example response
{
"count": 2,
"symbols": {
"JPM": {
"symbol": "JPM",
"name": "JPMorgan Chase & Co.",
"sector": "Financial Services",
"price": 296.73,
"change_pct": -0.42,
"volume": 8930000,
"analyst_rating": "strong_buy",
"indicators": {
"rsi": 42.6,
"macd": { "macd_line": -1.20, "signal_line": -0.80, "histogram": -0.40 },
"bollinger_bands": { "upper_band": 312.50, "middle_band": 298.10, "lower_band": 283.70 }
},
"updated_at": "2026-06-01T14:00:00+00:00"
},
"GS": {
"symbol": "GS",
"name": "The Goldman Sachs Group Inc.",
"sector": "Financial Services",
"price": 1008.37,
"change_pct": 0.87,
"volume": 2100000,
"analyst_rating": "buy",
"indicators": {
"rsi": 68.2,
"macd": { "macd_line": 5.60, "signal_line": 4.10, "histogram": 1.50 },
"bollinger_bands": { "upper_band": 1050.00, "middle_band": 985.00, "lower_band": 920.00 }
},
"updated_at": "2026-06-01T14:00:00+00:00"
}
},
"requested": 2
}
Response includes the count of matched symbols plus a map with per-symbol data in the same format as get_stock. Requested symbols not found in the database are omitted from the result.
get_stock_history free+
Daily OHLCV price history for a ticker. Returns bars sorted oldest-first.
Parameters
| Name | Type | Default | Description |
| symbol | string | — | Ticker symbol |
| days | integer | 90 | Number of trading days to return. Max 365 (1 year). |
Response fields
| Field | Type | Description |
| symbol | string | Ticker |
| days | integer | Days requested |
| count | integer | Bars actually returned (may be less if data is newer) |
| history | array | OHLCV bars: date, open, high, low, close, volume |
Example
{
"symbol": "AAPL",
"days": 5,
"count": 5,
"history": [
{ "date": "2026-04-29", "open": 208.40, "high": 212.10, "low": 207.80, "close": 211.50, "volume": 52183000 },
{ "date": "2026-04-30", "open": 211.20, "high": 214.60, "low": 210.90, "close": 213.45, "volume": 48921000 }
]
}
Example — AMZN 30-day history
{
"symbol": "AMZN",
"days": 30,
"count": 22,
"history": [
{ "date": "2026-04-29", "open": 247.40, "high": 250.60, "low": 246.80, "close": 249.75, "volume": 31045000 },
{ "date": "2026-04-30", "open": 250.00, "high": 256.10, "low": 249.20, "close": 255.30, "volume": 28760000 },
{ "date": "2026-05-01", "open": 257.10, "high": 264.80, "low": 256.40, "close": 263.90, "volume": 35412000 }
]
}
search_stocks free+
Filter and rank stocks from the Stocklake universe. All parameters are optional — omit any to skip that filter.
Parameters
| Name | Type | Default | Description |
| sector | string | — | Case-insensitive substring match. e.g. Technology, Healthcare, Financial Services |
| country | string | — | Case-insensitive substring match. e.g. United States, Germany |
| rsi_signal | string | — | oversold (RSI < 30) · overbought (RSI > 70) · neutral (30–70) |
| analyst_rating / recommendation | string | — | Analyst consensus: strong_buy · buy · hold · sell · strong_sell. Both names accepted, recommendation takes precedence. |
| min_volume | integer | — | Minimum daily volume filter. e.g. 1000000 |
| sort_by | string | change_pct | change_pct · volume · market_cap · rating (our composite score) |
| limit | integer | 20 | Results to return. Max 20. |
Response
| Field | Type | Description |
| count | integer | Number of results |
| filters | object | Echo of applied filters |
| results | array | Stock objects (see below) |
Per-result fields:
| Field | Type | Description |
| symbol | string | Ticker |
| name | string | Company name |
| sector / industry | string | Sector and industry classification |
| country | string | Country of listing |
| price | number | Current price |
| change_pct | number | Day change % |
| volume | number | Day volume |
| market_cap | number | Market capitalisation |
| rsi | number | Current RSI value |
| analyst_rating | string | Analyst consensus |
| rating | number | Composite technical rating (0–10) |
| direction | string | BULLISH / NEUTRAL / BEARISH |
Example — oversold tech stocks sorted by rating
{
"count": 3,
"filters": { "sector": "Technology", "rsi_signal": "oversold", "sort_by": "rating" },
"results": [
{
"symbol": "SMCI", "name": "Super Micro Computer",
"sector": "Technology", "industry": "Computer Hardware", "country": "United States",
"price": 38.20, "change_pct": -1.4,
"volume": 45200000, "market_cap": 22500000000,
"rsi": 27.3, "analyst_rating": "buy",
"rating": 6.5, "direction": "BULLISH"
}
]
}
Example — Healthcare, min volume 500K, sorted by volume
{
"count": 2,
"filters": { "sector": "Healthcare", "min_volume": 500000, "sort_by": "volume" },
"results": [
{
"symbol": "UNH", "name": "UnitedHealth Group Inc.",
"sector": "Healthcare", "industry": "Healthcare Plans", "country": "United States",
"price": 382.53, "change_pct": 0.65,
"volume": 5120000, "market_cap": 541500000000,
"rsi": 59.6, "analyst_rating": "strong_buy",
"rating": 7.1, "direction": "BULLISH"
},
{
"symbol": "PFE", "name": "Pfizer Inc.",
"sector": "Healthcare", "industry": "Drug Manufacturing", "country": "United States",
"price": 26.14, "change_pct": -0.34,
"volume": 18200000, "market_cap": 148700000000,
"rsi": 49.0, "analyst_rating": "hold",
"rating": 5.2, "direction": "NEUTRAL"
}
]
}
get_company_profile free+
Company fundamentals snapshot: description, sector, industry, financials, officers, and more. No AI cost — synced from public market data feeds.
| Parameter | Type | Default | Description |
| symbol | string | required | Stock ticker (1–10 alphanumeric characters). |
curl -s https://api.stocklake.dev/mcp \
-H "Authorization: Bearer sl_your_key" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_company_profile","arguments":{"symbol":"AVGO"}}}'
Example response
{
"symbol": "AVGO",
"name": "Broadcom Inc.",
"sector": "Technology",
"industry": "Semiconductors",
"country": "United States",
"exchange": "NMS",
"currency": "USD",
"description": "Broadcom Inc. designs, develops, and supplies various semiconductor devices and infrastructure software solutions worldwide.",
"website": "https://www.broadcom.com",
"employees": 33000,
"market_cap": 2019700000000,
"enterprise_value": 2071600000000,
"price": 426.58,
"week52_high": 478.00,
"week52_low": 252.34,
"volume": 18740000,
"avg_volume": 23498000,
"dividend_yield": 0.61,
"dividend_rate": 2.60,
"beta": 1.34,
"pe_trailing": 32.5,
"pe_forward": 28.1,
"price_to_book": 25.3,
"debt_to_equity": 2.45,
"profit_margins": 0.18,
"return_on_equity": 0.85,
"revenue_growth": 0.42,
"earnings_growth": 0.18,
"revenue_ttm": null,
"free_cashflow": 25504000000,
"ex_dividend_date": "2026-06-10T00:00:00+00:00",
"gross_profit_ttm": 32340000000,
"analyst_rating": "strong_buy",
"analyst_target": 510.00,
"analyst_count": 44,
"officers": [
{ "name": "Mr. Hock E. Tan", "title": "President, CEO & Director", "totalPay": 161800000 },
{ "name": "Ms. Kirsten M. Spears", "title": "CFO & Principal Accounting Officer", "totalPay": 12500000 }
],
"updated_at": "2026-05-29T07:57:03.841575+00:00"
}
Response includes sector, industry, country, exchange, description, website, employee count, market cap, enterprise value, price, 52-week range, volume, dividend info (yield, rate, ex-dividend date), P/E ratios, debt/equity, margins, growth rates, revenue, gross profit, free cash flow, analyst ratings, and top officers.
get_earnings_calendar free+
Upcoming earnings dates for all stocks in the Stocklake universe, within a configurable look-ahead window. Dates sourced from market data — treat is_estimate: true dates as approximate.
Parameters
| Parameter | Type | Default | Description |
| days | integer | 7 | Look-ahead window in days (max 30) |
Response
| Field | Type | Description |
| window_days | number | Effective look-ahead window applied |
| from_date | string | Window start (UTC ISO) |
| to_date | string | Window end (UTC ISO) |
| count | number | Total results returned |
| results[].symbol | string | Ticker symbol |
| results[].name | string | Company short name |
| results[].sector | string | Sector |
| results[].market_cap | number | Market capitalisation in reporting currency |
| results[].earnings_date | string | Expected earnings timestamp (UTC ISO) |
| results[].earnings_window_start | string | null | Start of reported window (UTC ISO) |
| results[].earnings_window_end | string | null | End of reported window (UTC ISO) |
| results[].is_estimate | boolean | True if the date is an estimate — treat as approximate |
| results[].eps_trailing | number | null | Trailing 12-month EPS |
| results[].eps_forward | number | null | Forward EPS estimate |
Example response
{
"window_days": 7,
"from_date": "2026-05-06T10:00:00+00:00",
"to_date": "2026-05-13T10:00:00+00:00",
"count": 3,
"results": [
{
"symbol": "AAPL",
"name": "Apple Inc.",
"sector": "Technology",
"market_cap": 3200000000000,
"earnings_date": "2026-05-08T20:30:00+00:00",
"earnings_window_start": "2026-05-08T20:00:00+00:00",
"earnings_window_end": "2026-05-09T00:00:00+00:00",
"is_estimate": false,
"eps_trailing": 6.97,
"eps_forward": 7.54
}
]
}
Example — 30-day window
{
"window_days": 30,
"from_date": "2026-05-06T10:00:00+00:00",
"to_date": "2026-06-05T10:00:00+00:00",
"count": 4,
"results": [
{
"symbol": "AMD",
"name": "Advanced Micro Devices Inc.",
"sector": "Technology",
"market_cap": 845000000000,
"earnings_date": "2026-05-20T20:30:00+00:00",
"earnings_window_start": "2026-05-20T20:00:00+00:00",
"earnings_window_end": "2026-05-21T00:00:00+00:00",
"is_estimate": false,
"eps_trailing": 3.95,
"eps_forward": 4.82
},
{
"symbol": "INTC",
"name": "Intel Corporation",
"sector": "Technology",
"market_cap": 608000000000,
"earnings_date": "2026-05-22T21:00:00+00:00",
"earnings_window_start": "2026-05-22T20:00:00+00:00",
"earnings_window_end": "2026-05-23T00:00:00+00:00",
"is_estimate": false,
"eps_trailing": 2.41,
"eps_forward": 3.10
},
{
"symbol": "IBM",
"name": "International Business Machines Corp.",
"sector": "Technology",
"market_cap": 248000000000,
"earnings_date": "2026-05-28T20:30:00+00:00",
"is_estimate": true,
"eps_trailing": 6.58,
"eps_forward": 7.22
}
]
}
get_stock_rating pro AI
Composite technical rating on a 0–10 scale. Synthesises RSI, MACD, Bollinger Bands, and moving average trend signals into a single score with per-indicator breakdown.
⚠️ Technical vs analyst ratings
rating and
direction are
purely technical (RSI / MACD / Bollinger Bands / moving averages).
This is different from
analyst_rating from
get_stock, which reflects
analyst consensus based on fundamentals and price targets — not technical momentum.
Disagreement between these signals is normal: a stock can be technically overbought (low rating) while analysts rate it a strong buy, or vice versa.
Parameters
| Name | Type | Description |
| symbol | string | Ticker symbol |
Response fields
| Field | Type | Description |
| symbol | string | Ticker |
| rating | number | 0–10 composite technical rating |
| direction | string | BULLISH (≥6) / NEUTRAL (4–6) / BEARISH (≤4) |
| signals | object | Per-indicator breakdown: rsi, macd, bb, trend. Each includes text (human readable), strength (strong/moderate/weak), verdict (bullish/mild_bullish/neutral/mild_bearish/bearish). RSI includes value (raw number). Indicator-specific fields: macd_line, signal_line, histogram, upper, middle, lower, width, position, price, sma50, sma200 |
Example
{
"symbol": "AAPL",
"rating": 7.2,
"direction": "BULLISH",
"signals": {
"rsi": {
"text": "neutral (54.2)",
"value": 54.2,
"strength": "weak",
"verdict": "neutral"
},
"macd": {
"text": "above signal (0.87 > 0.54) — bullish crossover",
"macd_line": 0.87,
"signal_line": 0.54,
"histogram": 0.33,
"strength": "moderate",
"verdict": "bullish"
},
"bb": {
"text": "lower half — mild bullish",
"position": "lower_half",
"upper": 288.48,
"middle": 271.57,
"lower": 254.67,
"width": 33.81,
"strength": "moderate",
"verdict": "mild_bullish"
},
"trend": {
"text": "price > SMA50 > SMA200 — strong uptrend",
"price": 213.45,
"sma50": 262.4,
"sma200": 256.62,
"strength": "strong",
"verdict": "bullish"
}
}
}
Example — QCOM (BEARISH)
{
"symbol": "QCOM",
"rating": 3.8,
"direction": "BEARISH",
"signals": {
"rsi": {
"text": "approaching overbought (68.1)",
"value": 68.1,
"strength": "moderate",
"verdict": "mild_bearish"
},
"macd": {
"text": "below signal (3.42 < 3.98) — bearish crossover",
"macd_line": 3.42,
"signal_line": 3.98,
"histogram": -0.56,
"strength": "moderate",
"verdict": "bearish"
},
"bb": {
"text": "above upper band — overbought",
"position": "above_upper",
"price": 243.29,
"upper": 256.40,
"middle": 228.15,
"lower": 199.90,
"width": 56.50,
"strength": "moderate",
"verdict": "mild_bearish"
},
"trend": {
"text": "price > SMA50 > SMA200 — strong uptrend",
"price": 243.29,
"sma50": 226.80,
"sma200": 194.35,
"strength": "strong",
"verdict": "bullish"
}
}
}
get_stock_news pro AI
Returns AI-analysed news articles for a ticker. Each article has been processed by our AI pipeline — raw article content is not exposed.
When no articles are found, the ticker is automatically queued for a background refresh. Re-queuing an already-pending ticker does not count against your limit.
Parameters
| Name | Type | Description |
| symbol | string | Ticker symbol |
| limit | integer | Max articles to return. Default 10, max 10. |
| days | integer | Look-back window in days. Default 7, max 14 (2 weeks). |
Response
Outer envelope fields:
| Field | Type | Description |
| symbol | string | Ticker |
| status | string | ok empty — see below |
| count | integer | Number of articles returned |
| hours | integer | Effective look-back window in hours (days × 24, max 336) |
| articles | array | Article objects (see below) |
| message | string | Present when status is empty |
Status values:
- ok — articles returned
- empty — no news found for this window; pipeline triggered in background if data was stale
Per-article fields:
| Field | Type | Description |
| title | string | Article headline |
| published_at | datetime | Publication timestamp (ISO 8601) |
| ai_sentiment | string | positive / neutral / negative |
| ai_flag_score | number | 0–10 signal strength (10 = high impact) |
| ai_summary | string | AI-generated 1–2 sentence summary of relevance to the stock |
| ai_confidence | number | 0–100 confidence score |
Example — status ok
{
"symbol": "TSLA",
"status": "ok",
"count": 3,
"hours": 24,
"articles": [
{
"title": "Tesla Q1 deliveries beat expectations",
"published_at": "2026-04-03T14:00:00+00:00",
"ai_sentiment": "positive",
"ai_flag_score": 8,
"ai_summary": "Q1 deliveries of 387k beat analyst consensus of 375k, signalling demand stabilisation.",
"ai_confidence": 80
}
]
}
Example — status empty
{
"symbol": "RKLB",
"status": "empty",
"count": 0,
"hours": 72,
"articles": [],
"message": "No news available for RKLB in the last 14 days."
}
get_sentiment_profile pro AI
AI-synthesized insider + institutional sentiment for a stock. Combines SEC Form 4 insider transactions with Nasdaq institutional holder data, nightly enrichment.
Parameters
| Parameter | Type | Required | Default | Description |
| symbol | string | ✓ | — | Ticker symbol (e.g. AAPL, TSLA) |
Response fields
| Field | Type | Description |
| symbol | string | Ticker |
| signal | string | Combined sentiment: STRONG_BULLISH, BULLISH, NEUTRAL, BEARISH, STRONG_BEARISH |
| flag_score | int | Notability 0–10. 8+ = trader alert |
| confidence | int | AI confidence 1–10 |
| insider_signal | string | Insider-only signal: BULLISH, BEARISH, NEUTRAL, NONE |
| inst_signal | string | Institutional-only signal: BULLISH, BEARISH, NEUTRAL, NONE |
| summary | string | Human-readable 2–4 sentence summary with specific names, amounts, and direction |
| insider_buys | int | Number of insider buy transactions (pre-filtered) |
| insider_sells | int | Number of insider sell transactions (pre-filtered) |
| inst_ownership | number | null | Institutional ownership percentage as a float (e.g. 74.55) |
| total_holders | int | null | Total institutional holders |
| updated_at | string | ISO 8601 timestamp when data was last refreshed |
Example response
{
"symbol": "BG",
"signal": "BULLISH",
"flag_score": 6,
"confidence": 7,
"insider_signal": "BEARISH",
"inst_signal": "BULLISH",
"summary": "COO Garros Julio sold $337K — lone bearish insider signal. Institutions strongly bullish: 377 holders increased (+28.6M sh) vs 283 decreased. 128 new holders added 20.9M sh.",
"insider_buys": 0,
"insider_sells": 1,
"inst_ownership": 99.81,
"total_holders": 758,
"updated_at": "2026-05-11T22:16:29.930700+00:00"
}
Example — CRM (STRONG_BULLISH, high insider buying)
{
"symbol": "CRM",
"signal": "STRONG_BULLISH",
"flag_score": 9,
"confidence": 8,
"insider_signal": "BULLISH",
"inst_signal": "BULLISH",
"summary": "CEO Benioff bought $12.4M worth of shares — largest insider buy in 3 years. Three additional C-suite insiders added $4.2M combined. Institutions increased holdings by 3.2% this quarter with 42 new holders opening positions. Strong alignment between insider and institutional conviction.",
"insider_buys": 4,
"insider_sells": 0,
"inst_ownership": 82.15,
"total_holders": 2410,
"updated_at": "2026-05-28T06:15:00+00:00"
}
get_macro_regime pro AI
Returns the latest macro market regime assessment produced by Stocklake AI, together with the raw indicator snapshot (macro data, VIX term structure, market sentiment) and a price/RSI/SMA200 snapshot of key market instruments recorded at the time the AI ran. Updated every ~4 hours, or sooner if VIX moves more than 8%.
Note: All data in this response — including market_context prices — is a point-in-time snapshot from when the assessment was made, not live. Check age_hours and updated_at to judge staleness; call get_stock for live prices.
Parameters
| Name | Type | Default | Description |
| history_count | integer | 0 | Include last N previous regime assessments (max 5). Returns regime_history array with regime, bias, confidence, rationale, updated_at, age_hours, vix_at_assessment for each past assessment. |
Response
| Field | Type | Description |
| regime | string | RISK_OFF | CAUTIOUS | NEUTRAL | AGGRESSIVE |
| signal | string | Alias for regime — present for client compatibility |
| bias | string | LONG_ONLY | SHORT_ONLY | BOTH |
| confidence | number | 1–10. How clear-cut the regime call is. |
| rationale | string | Core thesis in plain language (≤600 chars) |
| key_risks | string[] | 2–3 specific tail risks that could invalidate the call |
| watch_for | string[] | 1–2 triggers that would cause a regime upgrade or downgrade |
| vix_at_assessment | number | VIX level at the time of assessment |
| updated_at | string | UTC ISO timestamp of when assessment was made |
| age_hours | number | How many hours ago the assessment was made |
| indicators.macro_data | object | Macro data: yield_spread_10y2y, fed_funds_rate, cpi_yoy, unemployment, breakeven_10y, usd_index, m2 — each with value, date, delta_3m |
| indicators.volatility_term_structure | object | VIX / VIX3M / VIX6M last 5 closes + contango/backwardation signal |
| indicators.market_sentiment | object | Market sentiment index value (0=extreme fear, 100=extreme greed) and label |
| market_context | object | Price / RSI / SMA200 / perf snapshot of key instruments at assessment time (SPY, QQQ, IWM, TLT, GLD, EEM, HYG, XLK, XLF, XLE, XLV, XLU + VIX spot, TNX, CL oil). Stale — recorded when the AI ran, not live. Check age_hours. |
| market_context.spy | object | price, rsi, sma200, above_200sma, perf_1w, perf_1m, change_pct — same shape for all equity/ETF keys |
| market_context.vix | object | price, change_pct |
| market_context.tnx | object | 10Y Treasury yield: price, change_pct, change_abs |
| market_context.cl | object | WTI crude oil: price, change_pct, perf_1w |
| regime_history | object[] | Only present when history_count > 0. Array of past assessments: regime, bias, confidence, rationale, updated_at, age_hours, vix_at_assessment. |
Example response
{
"regime": "CAUTIOUS",
"bias": "LONG_ONLY",
"confidence": 6,
"rationale": "Equity uptrend intact (SPY records, VIX 17 in contango). HYG diverging from SPY highs — credit not confirming. SPY RSI 70 extended.",
"key_risks": [
"HYG breaking below $79.50 — credit/equity gap widening",
"VIX closing above 20 or moving into backwardation"
],
"watch_for": [
"HYG reclaiming $80.50 on rising volume → upgrade to NEUTRAL"
],
"vix_at_assessment": 16.94,
"updated_at": "2026-05-06T09:14:56.788341+00:00",
"age_hours": 2.1,
"indicators": {
"macro_data": {
"yield_spread_10y2y": { "value": 0.21, "date": "2026-05-02", "delta_3m": 0.15 },
"fed_funds_rate": { "value": 4.33, "date": "2026-04-01", "delta_3m": -0.25 }
},
"volatility_term_structure": {
"signal": "contango (calm — spot < 3M < 6M)",
"VIX": [{ "date": "2026-05-06", "close": 16.94 }],
"VIX3M": [{ "date": "2026-05-06", "close": 18.40 }],
"VIX6M": [{ "date": "2026-05-06", "close": 19.10 }]
},
"market_sentiment": { "value": 54.0, "description": "Neutral" }
},
"market_context": {
/* snapshot recorded at updated_at — NOT live prices */
"spy": { "price": 574.12, "rsi": 70.3, "sma200": 543.80, "above_200sma": true, "perf_1w": 1.8, "perf_1m": 4.2, "change_pct": 0.42 },
"qqq": { "price": 489.54, "rsi": 68.1, "sma200": 461.20, "above_200sma": true, "perf_1w": 2.1, "perf_1m": 5.0, "change_pct": 0.51 },
"iwm": { "price": 208.34, "rsi": 51.4, "sma200": 214.60, "above_200sma": false, "perf_1w": -0.3, "perf_1m": 1.1, "change_pct": -0.18 },
"tlt": { "price": 91.20, "rsi": 44.2, "sma200": 94.10, "above_200sma": false, "perf_1w": -0.8, "perf_1m": -2.3, "change_pct": -0.22 },
"vix": { "price": 16.94, "change_pct": -3.1 },
"tnx": { "price": 4.59, "change_pct": 0.9, "change_abs": 0.04 },
"gld": { "price": 312.80, "rsi": 62.0, "sma200": 271.40, "above_200sma": true, "perf_1w": 1.2, "perf_1m": 8.5, "change_pct": 0.31 },
"cl": { "price": 59.40, "change_pct": -1.2, "perf_1w": -3.8 },
"hyg": { "price": 79.83, "rsi": 53.2, "above_200sma": false, "perf_1w": 0.1, "change_pct": 0.04 },
"eem": { "price": 44.12, "rsi": 55.8, "above_200sma": true, "perf_1w": 0.7, "change_pct": 0.19 },
"xlk": { "price": 228.10, "rsi": 67.4, "above_200sma": true, "perf_1w": 2.4, "change_pct": 0.66 },
"xlf": { "price": 48.32, "rsi": 58.9, "above_200sma": true, "perf_1w": 0.9, "change_pct": 0.21 },
"xle": { "price": 82.44, "rsi": 42.3, "above_200sma": false, "perf_1w": -2.1, "change_pct": -0.84 },
"xlv": { "price": 141.20, "rsi": 49.0, "above_200sma": true, "perf_1w": -0.5, "change_pct": -0.10 },
"xlu": { "price": 78.30, "rsi": 52.1, "above_200sma": true, "perf_1w": 0.4, "change_pct": 0.08 }
}
}
Example — RISK_OFF regime with history_count=2
{
"regime": "RISK_OFF",
"bias": "SHORT_ONLY",
"confidence": 8,
"rationale": "SPY broke below 200-day MA for first time in 8 months. HYG gap down confirmed credit stress. VIX above 25 and inverted term structure suggest near-term panic. Fed rhetoric remains hawkish.",
"key_risks": [
"Sudden Fed pivot to dovish — VIX crush could fuel sharp rally",
"Bear market rallies exceeding 5% on short covering"
],
"watch_for": [
"VIX closing below 22 or returning to contango → downgrade to CAUTIOUS"
],
"vix_at_assessment": 27.32,
"updated_at": "2026-05-27T18:00:00+00:00",
"age_hours": 14.5,
"indicators": {
"macro_data": {
"yield_spread_10y2y": { "value": -0.35, "date": "2026-05-23", "delta_3m": -0.52 },
"fed_funds_rate": { "value": 4.33, "date": "2026-04-01", "delta_3m": -0.25 }
},
"volatility_term_structure": {
"signal": "backwardation (stress — spot > 3M > 6M)",
"VIX": [{ "date": "2026-05-27", "close": 27.32 }],
"VIX3M": [{ "date": "2026-05-27", "close": 24.10 }],
"VIX6M": [{ "date": "2026-05-27", "close": 22.40 }]
},
"market_sentiment": { "value": 22.0, "description": "Extreme Fear" }
},
"market_context": {
"spy": { "price": 481.23, "rsi": 31.2, "sma200": 532.10, "above_200sma": false, "perf_1w": -4.2, "change_pct": -0.85 },
"vix": { "price": 27.32, "change_pct": 12.4 },
"hyg": { "price": 72.40, "rsi": 28.5, "above_200sma": false, "change_pct": -2.10 },
"gld": { "price": 358.20, "change_pct": 1.85 }
},
"regime_history": [
{
"regime": "CAUTIOUS",
"bias": "LONG_ONLY",
"confidence": 6,
"rationale": "Equity uptrend intact but breadth narrowing. HYG starting to diverge.",
"updated_at": "2026-05-25T10:00:00+00:00",
"age_hours": 56.0,
"vix_at_assessment": 19.40
},
{
"regime": "NEUTRAL",
"bias": "BOTH",
"confidence": 5,
"rationale": "Mixed signals: SPY at 200-day MA support but defensive rotation accelerating.",
"updated_at": "2026-05-20T14:00:00+00:00",
"age_hours": 148.0,
"vix_at_assessment": 17.80
}
]
}
get_market_outlook pro AI
AI market outlook assessment: BULLISH / NEUTRAL / BEARISH outlook with conviction score, equity view, preferred and avoided sectors, catalyst, and key risk. Produced by the internal market intelligence pipeline every ~4 hours.
| Parameter | Type | Default | Description |
| history_count | integer | 0 | Number of prior outlooks to include in the response (max 3). |
curl -s https://api.stocklake.dev/mcp \
-H "Authorization: Bearer sl_pro_key" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_market_outlook","arguments":{}}}'
Example response
{
"outlook": "BEARISH",
"signal": "BEARISH",
"conviction": 7,
"equity_view": "Defensive posture warranted. S&P 500 failed to hold above 200-day MA. Technology leading the downturn. Energy the only sector in positive territory on supply concerns.",
"preferred": ["Energy", "Utilities", "Consumer Staples"],
"avoided": ["Technology", "Consumer Discretionary", "Financials"],
"catalyst": "Weaker-than-expected April retail sales and persistent core inflation above 3% have raised stagflation concerns. Fed minutes revealed hawkish lean despite hold decision.",
"key_risk": "Oil supply shock driving Energy too high — if crude reverses, the last bullish sector disappears, leaving no place to hide.",
"rationale": "SPY RSI at 31 approaching oversold but no reversal signal yet. HYG -2.1% on the week confirming credit stress. VIX backwardation indicates near-term hedging pressure. Breadth at 28% above 200-day MA — lowest in 12 months. Downgraded from CAUTIOUS following the 200-day MA breakdown.",
"updated_at": "2026-05-28T16:30:00+00:00",
"age_hours": 3.8
}
Key response fields: outlook/signal (BULLISH/NEUTRAL/BEARISH), conviction (score), equity_view, preferred/avoided (sector lists), catalyst, key_risk, rationale, updated_at, age_hours.
get_sector_intelligence pro AI
AI-assessed sector intelligence with signals (LEADING/STRONG/NEUTRAL/WEAK/LAGGING), drivers, alerts, and computed statistics. Refreshed every ~4 hours by the market intelligence pipeline.
Parameters
| Parameter | Type | Required | Default | Description |
| sector | string | — | None | Sector name (e.g. Technology, Healthcare). Omit to list all sectors. |
Response fields (single sector)
| Field | Type | Description |
| sector | string | Sector name |
| signal | string | LEADING / STRONG / NEUTRAL / WEAK / LAGGING |
| cycle_stage | string | EARLY / MID / LATE / RECESSION — where the sector is in its cycle |
| rotation_signal | string | IMPROVING / STEADY / DETERIORATING — rotation direction vs prior period |
| drivers | string[] | Key drivers behind the signal |
| alert | string | Alert message if applicable |
| confidence | number | AI confidence 1–10 |
| stats | object | RSI distribution, breadth, performance 1W/1M, top/bottom movers |
| updated_at | string | ISO 8601 when the assessment was made |
Response fields (all sectors)
| Field | Type | Description |
| sectors | object[] | Array of sector objects with sector, signal, cycle_stage, rotation_signal, drivers, alert, confidence, stats |
| count | integer | Number of sectors returned |
Example response
{
"sectors": [
{
"sector": "Technology",
"signal": "LEADING",
"cycle_stage": "MID",
"rotation_signal": "IMPROVING",
"drivers": ["AI capex acceleration", "Semiconductor demand recovery"],
"alert": "",
"confidence": 8,
"stats": { "avg_rsi": 62.1, "sma200_breadth_pct": 78.5, "avg_perf_1m_pct": 3.2 },
"updated_at": "2026-05-12T14:00:00+00:00"
}
],
"count": 1
}
Example — all sectors (omit sector parameter)
{
"sectors": [
{
"sector": "Technology",
"signal": "LEADING",
"cycle_stage": "MID",
"rotation_signal": "IMPROVING",
"drivers": ["AI capex acceleration", "Semiconductor demand recovery"],
"confidence": 8,
"stats": { "avg_rsi": 62.1, "sma200_breadth_pct": 78.5, "avg_perf_1m_pct": 3.2 },
"updated_at": "2026-05-12T14:00:00+00:00"
},
{
"sector": "Healthcare",
"signal": "STRONG",
"cycle_stage": "MID",
"rotation_signal": "STEADY",
"drivers": ["Drug pricing stability", "Aging population tailwind"],
"confidence": 7,
"stats": { "avg_rsi": 55.4, "sma200_breadth_pct": 65.2, "avg_perf_1m_pct": 1.5 },
"updated_at": "2026-05-12T14:00:00+00:00"
},
{
"sector": "Energy",
"signal": "WEAK",
"cycle_stage": "LATE",
"rotation_signal": "DETERIORATING",
"drivers": ["Falling crude prices", "OPEC+ supply uncertainty"],
"alert": "WTI below $60 — watch for further downside",
"confidence": 6,
"stats": { "avg_rsi": 42.3, "sma200_breadth_pct": 35.8, "avg_perf_1m_pct": -4.8 },
"updated_at": "2026-05-12T14:00:00+00:00"
}
],
"count": 3
}
Claude
Setup differs by product — choose below. Claude.ai handles auth automatically via OAuth; Desktop and Code need a Bearer key from your dashboard.
Claude.ai
No key required — OAuth handles the login automatically.
- In Claude.ai, go to Settings → Integrations and add a new MCP server.
- Enter the server URL: https://api.stocklake.dev/mcp
- You'll be redirected to the Stocklake login page — enter your email, click the magic link, and authorise.
- Done. Tools are available immediately in your conversations.
Usage is tracked normally and visible on your dashboard. Access tokens expire after 1 hour and refresh automatically (refresh token: 30 days).
Claude Desktop
Add to claude_desktop_config.json (requires a free or pro key):
{
"mcpServers": {
"stocklake": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.stocklake.dev/mcp"],
"env": { "MCP_REMOTE_HEADER_AUTHORIZATION": "Bearer sl_your_key_here" }
}
}
}
Claude Code
Add via CLI (requires a free or pro key):
claude mcp add stocklake \
--transport http \
--url https://api.stocklake.dev/mcp \
--header "Authorization: Bearer sl_your_key_here"
Python (fastmcp)
import asyncio
from fastmcp import Client
from fastmcp.client.transports import StreamableHttpTransport
async def main():
transport = StreamableHttpTransport(
url="https://api.stocklake.dev/mcp",
headers={"Authorization": "Bearer sl_your_key_here"},
)
async with Client(transport) as mcp:
rating = await mcp.call_tool("get_stock_rating", {"symbol": "NVDA"})
news = await mcp.call_tool("get_stock_news", {"symbol": "NVDA", "days": 7})
stock = await mcp.call_tool("get_stock", {"symbol": "NVDA"})
print(rating.data, news.data, stock.data)
asyncio.run(main())
curl / raw HTTP
# Initialize session
curl -X POST https://api.stocklake.dev/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sl_your_key_here" \
-H "Accept: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'
# Call a tool
curl -X POST https://api.stocklake.dev/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sl_your_key_here" \
-H "Accept: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_stock_rating","arguments":{"symbol":"AAPL"}}}'
OAuth 2.1
Stocklake implements OAuth 2.1 with PKCE for agent and browser-based clients. The authorization server metadata is available at the standard discovery endpoint:
GET https://api.stocklake.dev/.well-known/oauth-authorization-server
| Endpoint | Purpose |
| GET /oauth/authorize | Authorization endpoint — shows consent screen (redirects to login if no session) |
| POST /oauth/token | Token endpoint — exchange code for access + refresh tokens (authorization_code and refresh_token grants) |
| POST /oauth/register | Dynamic Client Registration (RFC 7591) — register a new OAuth client |
| POST /oauth/revoke | Revoke an access or refresh token |
Pre-registered client: anthropic-claude is a trusted public client (PKCE-only, no secret required). Claude.ai uses this client ID automatically when you add the MCP server URL.
Token lifetimes: Access tokens expire after 1 hour. Refresh tokens expire after 30 days. All tokens are SHA-256 hashed in storage.
Scopes: mcp — access to all MCP tools permitted by your account tier.
For most users, the OAuth flow is fully automatic via Claude.ai. Direct OAuth integration (e.g. building your own client) should use the discovery document and Dynamic Client Registration.
Errors
| HTTP status | Meaning |
| 401 | Missing or invalid Authorization: Bearer token |
| 429 | Daily rate limit exceeded. Resets midnight UTC. |
| 200 + isError: true | Tool-level error (e.g. ticker not found, tier required). Check the content[0].text field. |
Tiers
| Feature | Guest (no key) | Free | Pro |
| get_stock | ✓ | ✓ | ✓ |
| get_stocks | – | ✓ | ✓ |
| get_stock_history | – | ✓ | ✓ |
| get_company_profile | – | ✓ | ✓ |
| search_stocks | – | ✓ | ✓ |
| get_earnings_calendar | – | ✓ | ✓ |
| get_stock_news (AI) | – | – | ✓ |
| get_stock_rating (AI) | – | – | ✓ |
| get_macro_regime (AI) | – | – | ✓ |
| get_market_outlook (AI) | – | – | ✓ |
| get_sector_intelligence (AI) | – | – | ✓ |
| get_sentiment_profile (AI) | – | – | ✓ |
| Requests / day | 500 | 500 | 5000 |
| Key expiry | — | 30 days (renewable from dashboard) | None |