---
title: "Api Etf Benchmark"
method: GET
path: "/api/etf-benchmark"
---

# Api Etf Benchmark

`GET /api/etf-benchmark`

## 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/etf-benchmark`
- Auth: none declared

ETF performance vs benchmark.

Auth: required (FMP historical-prices call for both ETF + benchmark,
1100 days each).

## Response `200`

Successful Response

- ETFBenchmarkResponse: `GET /api/etf-benchmark?ticker=…` — ETF vs benchmark performance. Success branch returns {ticker, benchmark, periods, asOf}; error branch returns {ticker, error}. FE renders the table from data.periods. The error branches now echo `ticker` (services/ etf_data.py:_handle_etf_benchmark_sync, 2026-05-11) so the FE column header still renders on the failure path.
  - `ticker` string, required: Echoed ETF ticker — always present (success + error branches).
  - `benchmark` string, nullable: Resolved benchmark ticker (SPY / AGG / etc).
  - `periods` ETFBenchmarkPeriod[], nullable: One entry per _PERF_PERIODS row. FE iterates with forEach; missing on error branch is the FE's branch signal.
    - `label` string, required: Period label (1M / 3M / YTD / 1Y / 3Y).
    - `etfReturn` number, nullable
    - `bmReturn` number, nullable
    - `excess` number, nullable
  - `asOf` string, nullable: Newest available price date (YYYY-MM-DD) for the ETF.
  - `error` string, nullable

---

[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)
