---
title: "Retrieve earnings (P&L)"
method: GET
path: "/accounts/{account_id}/earnings"
tags: ["performance"]
---

# Retrieve earnings (P&L)

`GET /accounts/{account_id}/earnings`

Retrieve an account's earnings (P&L) for the requested period. Note the period supports full date-times, with timezone information.

## Path parameters

- `account_id` string, required

## Query parameters

- `period` '1d' | '1w' | '1m' | 'this-month' | '3m' | '6m' | 'ytd' | '1y' | 'all'
- `period_start` string, date-time — The period start (in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format). If omitted, it defaults to the account opening date/time. Note that the period is interpreted as a half-open interval with `period_start` included and `period_end` excluded.
- `period_end` string, date-time — The period end (in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format). If omitted, it defaults to the current date/time. Note the period is interpreted as a half-open interval with `period_start` included and `period_end` excluded.

## Response `200`

OK

- AccountEarnings
  - `account` string, required — ID of the account the earnings were computed for.
  - `currency` 'EUR' | 'USD' | 'GBP', required
  - `fees` string, required — Fees deducted from gross earnings.
  - `gross_capital` string, required — Capital earnings before fees and taxes.
  - `gross_income` string, required — Income earnings before fees and taxes.
  - `gross_realized` string, required — Realized earnings before fees and taxes.
  - `gross_total` string, required — Total realized and unrealized gross earnings.
  - `gross_unrealized` string, required — Unrealized earnings before fees and taxes.
  - `net_realized` string, required — Realized earnings after fees and taxes.
  - `net_total` string, required — Total realized and unrealized net earnings.
  - `net_unrealized` string, required — Unrealized earnings after fees and taxes.
  - `period_end` string, date-time, required — End date and time of the earnings period.
  - `period_start` string, date-time, required — Start date and time of the earnings period.
  - `position_earnings` PositionEarnings[], required — Earnings for the account's individual positions.
    - `cost_basis` string, required — Total acquisition cost of the position.
    - `currency` 'EUR' | 'USD' | 'GBP', required
    - `gross_capital` string, required — Capital earnings before fees and taxes.
    - `gross_income` string, required — Income earnings before fees and taxes.
    - `gross_realized` string, required — Realized earnings before fees and taxes.
    - `gross_total` string, required — Total realized and unrealized gross earnings.
    - `gross_unrealized` string, required — Unrealized earnings before fees and taxes.
    - `gross_unrealized_percentage` string, required — Unrealized gross earnings as a proportion of cost basis.
    - `period_end` string, date-time, required — End date and time of the earnings period.
    - `period_start` string, date-time, required — Start date and time of the earnings period.
    - `position` string, required — ID of the position the earnings were computed for.
    - `realized_capital` string, required — Realized earnings from capital appreciation.
    - `realized_income` string, required — Realized earnings from income.
    - `unrealized_capital` string, required — Unrealized earnings from capital appreciation.
    - `unrealized_income` string, required — Unrealized earnings from income.
  - `realized_capital` string, required — Realized earnings from capital appreciation.
  - `realized_income` string, required — Realized earnings from income.
  - `unrealized_capital` string, required — Unrealized earnings from capital appreciation.
  - `unrealized_income` string, required — Unrealized earnings from income.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/joinsophic/apis/sophic-engine-api.md) · [All operations](https://skmtc.net/joinsophic/apis/sophic-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/joinsophic/sophic-engine-api/revisions/5b4c43e2941b/schema)
