---
title: "Api Benchmark"
method: GET
path: "/api/portfolio/benchmark"
tags: ["Portfolio"]
---

# Api Benchmark

`GET /api/portfolio/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/portfolio/benchmark`
- Auth: none declared

Benchmark index comparison — requires auth.

## Query parameters

- `period` string
- `portfolio_id` string

## Response `200`

Successful Response

- PortfolioBenchmarkResponse: Wire shape for GET /api/portfolio/benchmark — performance vs benchmark over the requested window.
  - `benchmark` string, required: Benchmark symbol (e.g. 'SPY', 'QQQ'); echoed from request.
  - `portfolio_return_pct` number, nullable: Portfolio total return % over window; null on insufficient data.
  - `benchmark_return_pct` number, nullable: Benchmark total return % over window; null on insufficient data.
  - `alpha_pct` number, nullable: Portfolio - benchmark return %; null when either input is null.
  - `window_days` integer, required: Number of days in the comparison window; defaults to 365.

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