---
title: "Api Get Paper Portfolio"
method: GET
path: "/api/paper/portfolio"
---

# Api Get Paper Portfolio

`GET /api/paper/portfolio`

## 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/paper/portfolio`
- Auth: none declared

Return the user's paper-portfolio snapshot — positions marked
to current delayed quotes, cash balance, P&L since open, recent
fills.

404 when the user has no portfolio (caller should POST to
/api/paper/portfolio with starting_cash to bootstrap).

## Response `200`

Successful Response

- PaperPortfolioResponse: `GET /api/paper/portfolio` — full portfolio snapshot for the authed user. Returns 404 when the user has no portfolio yet (frontend prompts to bootstrap one). Required fields: portfolio, positions, totals, recent_trades. Frontend iterates positions[] + recent_trades[] without a null-check; declared REQUIRED so the error envelope can't drift to a shape that NPEs the UI.
  - `portfolio` object, required: The paper_portfolios row.
  - `positions` PaperPortfolioPosition[], required: Open positions (net > 0) with current market marks.
    - `ticker` string, required: Position ticker (uppercased).
    - `shares` number, required: Net shares held (always > 0; sold-out positions are filtered).
    - `cost_basis` number, required: Average cost basis per share.
    - `market_price` number, nullable: Current delayed quote; null on quote fail.
    - `market_value` number, nullable: shares * market_price; null on quote fail.
    - `unrealized_pnl` number, nullable: (market_price - cost_basis) * shares.
    - `unrealized_pnl_pct` number, nullable: Percent return on cost basis.
  - `totals` PaperPortfolioTotals, required
    - `cash` number, required: Current cash balance.
    - `positions_market_value` number, required: Sum of market values across positions.
    - `total_value` number, required: cash + positions_market_value.
    - `pnl_since_open` number, required: total_value - starting_cash.
    - `pnl_since_open_pct` number, required: Percent change vs starting_cash.
    - `pnl_dod` number, nullable: total_value - last_eod_total_value (null on no prior EOD).
    - `pnl_dod_pct` number, nullable: Day-over-day percent change.
    - `last_eod_date` string, nullable: ISO date of the most recent EOD snapshot.
  - `recent_trades` object[], required: Last 20 fills ordered desc by filled_at.

---

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