---
title: "Api Estimate History"
method: GET
path: "/api/estimate-history"
---

# Api Estimate History

`GET /api/estimate-history`

## Request

- Base URL: `https://www.oxfordledge.com` (the document declares no server; this is the origin it was published from)
- URL: `https://www.oxfordledge.com/api/estimate-history`
- Auth: none declared

Return analyst estimate revision history for a ticker from the v105 PG
mirror.

Snapshots are stored daily via record_estimate(). The table uniquely
constrains (ticker, record_date) so each calendar date = one snapshot.
Actuals (eps_actual, revenue_actual, surprise_pct) are not stored in this
table and are returned as null — enrich downstream from earnings data.

DF-11 (PG_PARITY 2B.5 PR3): reads estimate_history from PG (OWNER-verified
at parity 2026-06-24, 4093 == 4093); the SQLite table stays for rollback
during the bake. The PG helper aliases columns back to the camelCase keys
this mapper reads (recordDate/epsEstimate/...).

OWNER ruling 4 follow-up (2026-10-04)(b), CHAOS 2026-10-04: no
`target_price` / `num_analysts`. The writer stamps every row
source='yfinance' (a parity wart -- the figures came from Finnhub/FMP, and
tools/backfill.py phase 5 still writes targets under that label), so a
stored target has neither a true source nor a fetch date we can vouch
for. The false 'yfinance' attribution is served as null.

## Query parameters

- `ticker` string, nullable: Ticker symbol
- `quarters` integer: Number of most-recent snapshots to return

## Response `200`

Successful Response

- StockAnalysisResponse: Loose response_model for /api/fundamentals, /api/segments, /api/exec-comp, /api/sensitivity, /api/proxy, /api/chart-data, and similar analysis routes in routes_analysis_fastapi/stock.py. Multi-shape responses with deeply nested company/financial/chart data; loose contract since the FE consumers are typed via the typed-client wrappers, not directly off these schemas.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api.md) · [All operations](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api/llms.txt) · [OpenAPI document](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api/revisions/e832a1260f0b?raw)
