Skip to main content Skip to main content
Looking for the interactive API reference? Visit /docs for Swagger UI, /redoc for ReDoc, or /openapi.json for the machine-readable spec.

Issue your first request

Request
curl https://www.oxfordledge.com/api/data?ticker=AAPL \
  -H "X-API-Key: ol_your_api_key_here"
Response
{
  "ticker": "AAPL",
  "price": { "current": 187.44, "changePct": 1.23 },
  "metrics": { "pe": 28.5, "marketCap": "2.89T" }
}

Also available as 53 MCP tools for Claude, Cursor, and other AI assistants. Learn more →

API Documentation

Access Oxford Ledge's financial data programmatically. Stock quotes, fundamentals, SEC filings, screener, portfolio management, and more — all via a simple REST API.

Authentication

All API requests require authentication via an API key. Generate your key from Settings → API Keys in the platform.

Send your key as a Bearer token with every request (canonical; the X-API-Key header is also accepted — both work, use one):

# Using curl
curl -H "Authorization: Bearer ol_your_api_key_here" \
  https://www.oxfordledge.com/api/data?ticker=AAPL
# Using Python requests
import requests

headers = {"Authorization": "Bearer ol_your_api_key_here"}
r = requests.get("https://www.oxfordledge.com/api/data",
               params={"ticker": "AAPL"},
               headers=headers)
data = r.json()
Authenticated users on paid tiers (Researcher, Investor, Power User) unlock additional endpoints such as 13F filings, screener, and bond search. See tier badges on each endpoint below.

Base URL

https://www.oxfordledge.com/api/

API versioning is supported: /api/v1/* routes to the same handlers as /api/*. Both are interchangeable.

Rate Limits

Rate limits are applied per IP address. When exceeded, the API returns 429 Too Many Requests with a Retry-After header.

API rate limits by user tier
TierLimit
Authenticated users300 req/min
Unauthenticated150 req/min
Burst window80 req / 5 sec
Bot / suspicious UA30 req/min
Heavy endpoints (13F filings, screener) consume more of your rate limit budget than lightweight ones (health, tickers list). Plan accordingly.

Response Format

All responses are JSON. Successful responses return the data directly:

{
  "ticker": "AAPL",
  "price": {
    "current": 189.84,
    "change": 2.15,
    "changePercent": 1.14
  },
  "fundamentals": { ... },
  "fetchedAt": "2026-04-03T10:30:00"
}

Errors

Error responses include an error field with a human-readable message:

{
  "error": "No ticker provided"
}
// HTTP 400, 401, 403, 404, or 429

Common error codes:

Endpoints

GET /api/data Learner

Full ticker snapshot: price, fundamentals, profile, SEC filings, analyst ratings, and more. This is the primary data endpoint.

Parameters for ticker data endpoint
ParamTypeDescription
tickerstring requiredStock ticker symbol (e.g. AAPL, MSFT)
nocachestring optionalSet to 1 to force a fresh fetch
fieldsstring optionalComma-separated field names for GraphQL-style field selection
curl -H "X-API-Key: $KEY" \
  "https://www.oxfordledge.com/api/data?ticker=AAPL"
Example response (abbreviated)
{
  "ticker": "AAPL",
  "price": {"current": 189.84, "change": 2.15, "changePercent": 1.14},
  "fundamentals": {"marketCap": 2950000000000, "pe": 31.2, "eps": 6.08, ...},
  "profile": {"name": "Apple Inc", "sector": "Technology", ...},
  "filings": [{"form": "10-K", "filed": "2025-11-01", ...}],
  "fetchedAt": "2026-04-03T10:30:00"
}
GET /api/random-ticker Learner

Returns a random ticker from the universe. Useful for discovery and exploration.

curl -H "X-API-Key: $KEY" \
  "https://www.oxfordledge.com/api/random-ticker"
GET /api/fundamentals-pit Learner

Point-in-time fundamental data snapshot. Returns financials as they were known on a given date, avoiding look-ahead bias for backtesting.

Parameters for point-in-time fundamentals endpoint
ParamTypeDescription
tickerstring requiredStock ticker symbol
datestring optionalDate in YYYY-MM-DD format (defaults to latest)
curl -H "X-API-Key: $KEY" \
  "https://www.oxfordledge.com/api/fundamentals-pit?ticker=AAPL&date=2025-06-30"
  • GET /api/fundamentals-history?ticker=AAPL&start=2024-01-01&end=2025-12-31 — PIT time series
  • GET /api/fundamentals-pit/universe?date=2025-06-30 — All tickers with PIT data for a date
  • GET /api/fundamentals-pit/stats — Database statistics
GET /api/screener Investor

Screen stocks by fundamental criteria. Filter by market cap, P/E, dividend yield, sector, and more. Returns matching tickers with key metrics.

Parameters for stock screener endpoint
ParamTypeDescription
min_mcapnumber optionalMinimum market cap (e.g. 1000000000)
max_penumber optionalMaximum P/E ratio
min_divnumber optionalMinimum dividend yield (%)
sectorstring optionalFilter by sector (e.g. "Technology")
sortstring optionalSort field (e.g. "marketCap", "pe")
limitinteger optionalMax results (default 50)
curl -H "X-API-Key: $KEY" \
  "https://www.oxfordledge.com/api/screener?min_mcap=10000000000&max_pe=20&sector=Technology"
GET POST DELETE /api/portfolio-positions Learner

Manage portfolio positions. Requires authentication. Supports multiple named portfolios.

Parameters for portfolio positions endpoint
ParamTypeDescription
portfolio_idstring optionalPortfolio name (default: "default")

Get positions:

curl -H "X-API-Key: $KEY" \
  "https://www.oxfordledge.com/api/portfolio-positions"

Add a position:

curl -X POST -H "X-API-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"ticker": "AAPL", "shares": 100, "cost_basis": 150.00}' \
  "https://www.oxfordledge.com/api/portfolio-positions"

Delete a position:

curl -X DELETE -H "X-API-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"ticker": "AAPL"}' \
  "https://www.oxfordledge.com/api/portfolio-positions"
  • GET /api/portfolio-history?days=30 — Portfolio value history
  • GET /api/portfolio/benchmark?period=1y — Benchmark comparison (S&P 500)
GET /api/etf-data Learner

ETF profile, holdings, sector breakdown, and performance data.

Parameters for ETF data endpoint
ParamTypeDescription
symbolstring requiredETF ticker symbol (e.g. SPY, QQQ, VTI)
curl -H "X-API-Key: $KEY" \
  "https://www.oxfordledge.com/api/etf-data?symbol=SPY"
  • GET /api/etf-compare?symbols=SPY,QQQ,VTI — Compare multiple ETFs
  • GET /api/etf-list — All tracked ETF tickers
GET /api/news/search Learner

Search the historical news archive. Full-text search with sentiment scores, auto-tagged industries, and ticker associations.

Parameters for news search endpoint
ParamTypeDescription
qstring optionalFull-text search query
tickerstring optionalFilter by ticker symbol
tagstring optionalFilter by industry tag
sentimentstring optionalFilter by sentiment: positive, negative, neutral
daysinteger optionalLook back N days (default: 7)
limitinteger optionalMax results (default: 50)
offsetinteger optionalPagination offset
curl -H "X-API-Key: $KEY" \
  "https://www.oxfordledge.com/api/news/search?ticker=AAPL&days=30&limit=10"
  • GET /api/news/ticker?ticker=AAPL — Recent headlines for a specific ticker
  • GET /api/news/stats — News database statistics
GET /api/13f Researcher

SEC 13F institutional holdings filings. See what hedge funds and asset managers hold. Data sourced directly from SEC EDGAR.

Parameters for 13F holdings endpoint
ParamTypeDescription
managerstring optionalManager name search (e.g. "Berkshire", "Bridgewater")
tickerstring optionalFind managers holding this ticker
curl -H "X-API-Key: $KEY" \
  "https://www.oxfordledge.com/api/13f?manager=Berkshire"

Python SDK

The Python SDK is not yet published to PyPI — until it ships, call the REST API directly (see Authentication; any HTTP client works). The snippet below shows the planned SDK interface:

Planned usage:

from oxfordledge import OxfordLedge

client = OxfordLedge(api_key="ol_your_api_key_here")

# Get full ticker data
data = client.get_ticker("AAPL")
print(data["price"]["current"])

# Search for tickers
results = client.search("semiconductor")

# Get portfolio positions
portfolio = client.get_portfolio()

# Screen stocks
matches = client.screen(min_mcap=1e10, max_pe=20, sector="Technology")

# Search news
news = client.search_news(ticker="AAPL", days=30)

# Point-in-time fundamentals
pit = client.fundamentals_pit("MSFT", date="2025-06-30")
The SDK will wrap all REST endpoints with typed Python methods, handling authentication, rate limiting, retries, and JSON parsing automatically.

MCP Tools

Oxford Ledge exposes 53 tools via the Model Context Protocol (MCP), allowing Claude Desktop and other MCP clients to query financial data directly. Public-data tools work without a key; tier-gated tools need an API key (mint one under YOUR API KEYS on the dashboard — keys look like ol_live_…).

Claude Desktop Configuration

Install the package (pip install oxford-ledge-mcp), then add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "oxford-ledge": {
      "command": "oxford-ledge-mcp",
      "env": {
        "OXFORD_LEDGE_URL": "https://www.oxfordledge.com",
        "OXFORD_LEDGE_API_KEY": "ol_live_YOUR_KEY_HERE"
      }
    }
  }
}
Setup gotchas: OXFORD_LEDGE_URL is required for the authenticated tools — without it the server runs keyless-standalone and your key is silently ignored. On Windows, use the full path to oxford-ledge-mcp.exe as command (Claude Desktop does not inherit your shell PATH), and note the Microsoft-Store build of Claude Desktop reads its config from %LOCALAPPDATA%\Packages\Claude_*\LocalCache\Roaming\Claude\. Do not use python -m oxford_ledge_mcp. After editing the config, fully quit Claude Desktop from the system tray and relaunch.
MCP tools pull from local databases and caches. Heavy tools (marked below) are limited to 2 concurrent calls per session. Total concurrency across all tools is capped at 5.

Tool Catalog

The hosted catalog carries 53 tools; the pip package (oxford-ledge-mcp) dispatches a 13-tool subset (2 keyless SEC-EDGAR tools + 2 FRED-keyed macro tools + 9 API-key tools). The full, always-current list is machine-readable at /api/mcp/tools.json and browsable at /mcp — plan tool calls from that live list, not from a static table. Highlights (verified against the live registry 2026-08-10):

MCP tool highlights
ToolDescriptionWhere
get_fundamentals10-year XBRL annual statements from SEC EDGAR (deduped, newest-first)pip + hosted
get_sec_filingsRecent 10-K / 10-Q / 8-K / DEF 14A filings with direct linkspip + hosted
get_yield_curveTreasury yield curve 1M–30Y (needs your free FRED_API_KEY in the pip package)pip + hosted
get_insider_tradesForm 4 insider buys/sells for a tickerpip + hosted
get_bdc_listAll tracked BDCs with AUM, holding counts, filing datespip + hosted
search_bdc_borrowerWhich BDCs hold a borrower, at what fair valuehosted (pip fix queued)
ol_bdc_credit_qualityBDC non-accrual / credit-deterioration signalhosted
ol_insider_recent_buysRecent open-market insider purchases across the whole markethosted
ol_13f_filer_analyticsInstitutional-filer behavior from 13F holdingshosted
ol_intrinsic_valueDCF / EPV / Graham per-share value from SEC XBRLhosted
ol_peer_fundamentalsSide-by-side latest-fiscal-year fundamentals for a peer sethosted
ol_fdic_bankFDIC-insured institution lookup and financialshosted
ol_federal_contractsFederal-contract obligation history (forward-revenue signal)hosted

Example: Peer Comparison

Ask Claude Desktop to compare multiple tickers in a single request:

// Claude Desktop prompt:
"Compare latest-fiscal-year fundamentals for AAPL, MSFT, GOOG, and AMZN"

// Claude will call ol_peer_fundamentals with:
{
  "tickers": ["AAPL", "MSFT", "GOOG", "AMZN"]
}

Bulk Data Export

Export fundamentals, profiles, and historical prices for multiple tickers at once. Available to Investor tier and above.

Bulk Fundamentals

Bulk data export endpoints and latency
EndpointDescriptionLatency
GET /api/data/bulkFundamentals + profile for up to 100 tickers3-15s
GET /api/data/bulk-historyOHLCV price history for up to 50 tickers5-30s

Examples

// Bulk fundamentals for multiple tickers (JSON)
GET /api/data/bulk?tickers=AAPL,MSFT,GOOG&fields=fundamentals

// Bulk fundamentals as CSV
GET /api/data/bulk?tickers=AAPL,MSFT&fields=fundamentals&format=csv

// Historical price data with date range
GET /api/data/bulk-history?tickers=AAPL&start=2020-01-01

// Multiple tickers with date range
GET /api/data/bulk-history?tickers=AAPL,MSFT,GOOG&start=2024-01-01&end=2024-12-31

Parameters

Bulk export endpoint parameters
ParameterEndpointDescription
tickersBothComma-separated ticker symbols (required)
fields/api/data/bulkData fields: fundamentals, profile, all
formatBothjson (default) or csv
start/api/data/bulk-historyStart date (YYYY-MM-DD)
end/api/data/bulk-historyEnd date (YYYY-MM-DD, default: today)

Additional Resources