Stocklake API

MCP-native stock intelligence. Prices, fundamentals, technical ratings, and AI-analysed news — served over Streamable HTTP.

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 instantly at /register — no credit card required.

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

TierRequests / dayUnique tickers / day
free50050
pro5,000500

Exceeding the daily request limit returns HTTP 429. The unique-ticker limit applies across all symbol tools (get_stock, get_stock_news, get_stock_rating, get_stock_history) — querying the same ticker multiple times counts once. Exceeding the ticker limit returns a daily_ticker_limit error. Limits reset at midnight UTC.

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 POST /mcp {"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_stock_rating","arguments":{"symbol":"AAPL"}}}

get_stock free

Returns price, fundamentals, and technical indicators for a ticker.

Parameters

NameTypeDescription
symbolstringTicker symbol, e.g. AAPL. Case-insensitive.

Response fields

FieldTypeDescription
symbolstringTicker
namestringCompany full name
short_namestringDisplay name (shorter form)
pricenumberCurrent price
change_pctnumberDay change %
volumenumberDay volume
prev_closenumberPrevious close
week52_high / week52_lownumber52-week range
ma_50number50-day moving average
ma_200number200-day moving average
marketCapnumberMarket capitalisation
betanumberBeta vs market
pe_trailing / pe_forwardnumberP/E ratios (trailing and forward)
dividendYieldnumberAnnual dividend yield
debtToEquitynumberD/E ratio
profitMarginsnumberNet profit margin
revenueGrowth / earningsGrowthnumberYoY growth rates
returnOnEquitynumberROE
analyst_ratingstringAnalyst consensus (buy / hold / sell)
analyst_rating_scorenumberAnalyst consensus score (1=strong buy … 5=strong sell)
analyst_targetnumberAnalyst mean price target
indicatorsobjectTechnical indicators: rsi, macd{macd_line, signal_line, histogram}, bollinger_bands{upper_band, middle_band, lower_band}
last_updatedatetimeData freshness timestamp
Example
{ "symbol": "NVDA", "name": "NVIDIA Corporation", "price": 116.78, "change_pct": 2.31, "marketCap": 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 } } }

get_stock_news pro

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 the next pipeline run. Re-queuing an already-pending ticker does not count against your limit.

Parameters

NameTypeDescription
symbolstringTicker symbol
limitintegerMax articles to return. Default 10, max 50.
daysintegerLook-back window in days. Default 1. Hard cap: 36 hours regardless of value passed.

Response

Outer envelope fields:

FieldTypeDescription
symbolstringTicker
statusstringok empty — see below
countintegerNumber of articles returned
hoursintegerEffective look-back window in hours (max 36)
articlesarrayArticle objects (see below)
messagestringPresent when status is empty

Status values:

Per-article fields:

FieldTypeDescription
titlestringArticle headline
published_atdatetimePublication timestamp (ISO 8601)
ai_sentimentstringpositive / neutral / negative
ai_flag_scorenumber0–10 signal strength (10 = high impact)
ai_summarystringAI-generated 1–2 sentence summary of relevance to the stock
ai_confidencenumber0–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": 24, "articles": [], "message": "No news available for RKLB in the last 24h." }

get_stock_rating pro

Composite technical rating on a 0–10 scale. Synthesises RSI, MACD, Bollinger Bands, and moving average trend signals. Includes the latest AI entry signal if available.

⚠️ Technical vs analyst ratings
score and direction are purely technical (RSI / MACD / Bollinger Bands / moving averages). The latest_signal field is an AI-driven entry signal from our trader engine. Neither is the same as 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 score) while analysts rate it a strong buy, or vice versa.

Parameters

NameTypeDescription
symbolstringTicker symbol

Response fields

FieldTypeDescription
symbolstringTicker
scorenumber0–10 composite rating
directionstringBULLISH (≥6) / NEUTRAL (5) / BEARISH (≤4)
pricenumberCurrent price
change_pctnumberDay change %
signalsobjectPer-indicator structured breakdown: rsi, macd, bb, trend. Each includes text (human readable), value (raw number), strength (strong/moderate/weak), verdict (bullish/mild_bullish/neutral/mild_bearish/bearish), plus indicator-specific fields (macd_line, signal_line, histogram, upper, middle, lower, width, sma50, sma200)
volume_confirmationobjectverdict (confirming/weak/absent/unknown), today_volume, vs_10d_avg (ratio), vs_3m_avg (ratio)
latest_signalobject | nullMost recent AI entry decision: action, confidence (1–10 integer), rationale, created_at
signal_age_hoursnumber | nullAge of latest AI signal in hours
signal_freshbooleanTrue if signal is within tier freshness threshold
rated_atdatetimeWhen this rating was computed
Example
{ "symbol": "AAPL", "score": 7.2, "direction": "BULLISH", "price": 213.45, "change_pct": 1.14, "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", "sma50": 262.4, "sma200": 256.62, "strength": "strong", "verdict": "bullish" } }, "volume_confirmation": { "verdict": "confirming", "today_volume": 52091600, "vs_10d_avg": 1.18, "vs_3m_avg": 1.12 }, "latest_signal": { "action": "BUY", "confidence": 8, "rationale": "Breakout above 200-day MA with volume confirmation.", "created_at": "2026-05-04T09:15:00+00:00" }, "signal_age_hours": 18.3, "signal_fresh": true, "rated_at": "2026-05-05T11:42:00+00:00" }

get_stock_history pro

Daily OHLCV price history for a ticker. Returns bars sorted oldest-first.

Parameters

NameTypeDefaultDescription
symbolstringTicker symbol
daysinteger30Number of trading days to return. Max 90.

Response fields

FieldTypeDescription
symbolstringTicker
daysintegerDays requested
countintegerBars actually returned (may be less if data is newer)
historyarrayOHLCV 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 } ] }

search_stocks pro

Filter and rank stocks from the Stocklake universe. All parameters are optional — omit any to skip that filter.

Parameters

NameTypeDefaultDescription
sectorstringCase-insensitive substring match. e.g. Technology, Healthcare, Financial Services
countrystringCase-insensitive substring match. e.g. United States, Germany
rsi_signalstringoversold (RSI < 30) · overbought (RSI > 70) · neutral (30–70)
analyst_ratingstringAnalyst consensus: strong_buy · buy · hold · sell · strong_sell
min_volumeintegerMinimum daily volume filter. e.g. 1000000
sort_bystringchange_pctchange_pct · volume · market_cap · rating (our composite score)
limitinteger20Results to return. Max 20.

Response

FieldTypeDescription
countintegerNumber of results
filtersobjectEcho of applied filters
resultsarrayStock objects (see below)

Per-result fields:

FieldTypeDescription
symbolstringTicker
namestringCompany name
sector / industrystringSector and industry classification
countrystringCountry of listing
pricenumberCurrent price
change_pctnumberDay change %
volumenumberDay volume
market_capnumberMarket capitalisation
rsinumberCurrent RSI value
analyst_ratingstringAnalyst consensus
ratingnumberComposite technical rating (0–10)
directionstringBULLISH / 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", "country": "United States", "price": 38.20, "change_pct": -1.4, "rsi": 27.3, "analyst_rating": "buy", "rating": 6.5, "direction": "BULLISH" } ] }

get_earnings_calendar pro

Upcoming earnings dates for all stocks in the Stocklake universe, within a configurable look-ahead window. Dates sourced from Yahoo Finance — treat is_estimate: true dates as approximate.

Parameters

ParameterTypeDefaultDescription
daysinteger7Look-ahead window in days (max 30)

Response

FieldTypeDescription
window_daysnumberEffective look-ahead window applied
from_datestringWindow start (UTC ISO)
to_datestringWindow end (UTC ISO)
countnumberTotal results returned
results[].symbolstringTicker symbol
results[].namestringCompany short name
results[].sectorstringSector
results[].market_capnumberMarket capitalisation in reporting currency
results[].earnings_datestringExpected earnings timestamp (UTC ISO)
results[].earnings_window_startstring | nullStart of reported window (UTC ISO)
results[].earnings_window_endstring | nullEnd of reported window (UTC ISO)
results[].is_estimatebooleanTrue if the date is an estimate — treat as approximate
results[].eps_trailingnumber | nullTrailing 12-month EPS
results[].eps_forwardnumber | nullForward 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 } ] }

get_macro_regime pro

Returns the latest macro market regime assessment produced by the internal Stocklake trader AI, together with the raw indicator snapshot (FRED, VIX term structure, CNN Fear & Greed) 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. Use age_hours to judge staleness; call get_stock for live prices.

Parameters

NameTypeDefaultDescription
history_countinteger0Include last N previous regime assessments (max 5). Returns regime_history array with regime, bias, confidence, rationale, assessed_at, age_hours, vix_at_assessment for each past assessment.

Response

FieldTypeDescription
regimestringRISK_OFF | CAUTIOUS | NEUTRAL | AGGRESSIVE
biasstringLONG_ONLY | SHORT_ONLY | BOTH
confidencenumber1–10. How clear-cut the regime call is.
rationalestringCore thesis in plain language (≤300 chars)
key_risksstring[]2–3 specific tail risks that could invalidate the call
watch_forstring[]1–2 triggers that would cause a regime upgrade or downgrade
vix_at_assessmentnumberVIX level at the time of assessment
assessed_atstringUTC ISO timestamp of when assessment was made
age_hoursnumberHow many hours ago the assessment was made
indicators.fredobjectFRED hard data: yield_spread_10y2y, fed_funds_rate, cpi_yoy, unemployment, breakeven_10y, usd_index, m2 — each with value, date, delta_3m
indicators.vix_termobjectVIX / VIX3M / VIX6M last 5 closes + contango/backwardation signal
indicators.fear_greedobjectCNN Fear & Greed value (0=extreme fear, 100=extreme greed) and label
market_contextobjectPrice / 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.spyobjectprice, rsi, sma200, above_200sma, perf_1w, perf_1m, change_pct — same shape for all equity/ETF keys
market_context.vixobjectprice, change_pct
market_context.tnxobject10Y Treasury yield: price, change_pct, change_abs
market_context.clobjectWTI crude oil: price, change_pct, perf_1w
regime_historyobject[]Only present when history_count > 0. Array of past assessments: regime, bias, confidence, rationale, assessed_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, "assessed_at": "2026-05-06T09:14:56.788341+00:00", "age_hours": 2.1, "indicators": { "fred": { "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 } }, "vix_term": { "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 }] }, "fear_greed": { "value": 54.0, "description": "Neutral" } }, "market_context": { /* snapshot recorded at assessed_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 } } }

Claude Desktop

Add to claude_desktop_config.json:

{ "mcpServers": { "stocklake": { "command": "npx", "args": ["-y", "mcp-remote", "https://api.stocklake.dev/mcp"], "env": { "MCP_REMOTE_HEADER_X_API_KEY": "sl_your_key_here" } } } }

Claude Code

Add via CLI or .claude/mcp.json:

# CLI 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, text/event-stream" \ -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, text/event-stream" \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_stock_rating","arguments":{"symbol":"AAPL"}}}'

Errors

HTTP statusMeaning
401Missing or invalid Authorization: Bearer token
429Daily rate limit exceeded. Resets midnight UTC.
200 + isError: trueTool-level error (e.g. ticker not found, tier required). Check the content[0].text field.

Tiers

FeatureFreePro
get_stock
get_stock_news
get_stock_rating
get_stock_history
search_stocks
get_earnings_calendar
get_macro_regime
Requests / day5005,000
Unique tickers / day50500
Pipeline prioritystandardpriority
Supportemail