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

# Retrieve account earnings (P&L)

`GET /accounts/{account_id}/earnings`

## Request

- Base URL: `https://api.engine.usesophic.com`
- URL: `https://api.engine.usesophic.com/accounts/{account_id}/earnings`
- Auth: HTTP bearer

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`

Successful Response

- AccountEarningsV2
  - `account` string, required: ID of the account the earnings were computed for.
  - `cash` AccountCashEarnings, required
    - `attribution` CashEarningsAttribution, required
      - `currency` CashCurrencyEffect, required
        - `total` string, required: How much exchange-rate movements changed the value of foreign-currency cash while it sat uninvested. Not split into realized and unrealized.
    - `gross` string, required: How much uninvested foreign-currency cash gained or lost from exchange-rate movements.
  - `currency` 'EUR' | 'USD' | 'GBP', required
  - `fees` string, required: Fees deducted from gross earnings.
  - `gross` string, required: Everything the account earned before fees: today's value minus the net money paid in, with fees added back. Also equals the positions' gross plus the cash gross.
  - `money_in` string, required: The money put into the account over the period: its value at the start of the period plus every deposit during it, each converted at the exchange rate of its own day. Withdrawals are not subtracted. Over the account's whole life, this is the total deposited.
  - `net` string, required: Everything the account earned after fees: gross minus fees.
  - `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` PositionEarningsV2[]: Each of the account's positions' earnings over the same period, as `GET /positions/{id}/earnings` returns them. Only present when requested with `include_positions`.
    - `account` string, required: ID of the account holding the position.
    - `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.
    - `reporting` PositionReportingEarnings, required
      - `attribution` EarningsAttribution, required
        - `currency` EarningsEffect, required
          - `realized` RealizedEarningsSplit, required
            - `capital` string, required: The part that came from price changes on units sold.
            - `income` string, required: The part that came from income paid out.
          - `total` string, required: Realized plus unrealized.
          - `unrealized` UnrealizedEarningsSplit, required
            - `capital` string, required: The part that came from price changes on units still held.
            - `income` string, required: The part that came from interest accrued but not yet paid.
        - `investment` EarningsEffect, required
          - `realized` RealizedEarningsSplit, required
            - `capital` string, required: The part that came from price changes on units sold.
            - `income` string, required: The part that came from income paid out.
          - `total` string, required: Realized plus unrealized.
          - `unrealized` UnrealizedEarningsSplit, required
            - `capital` string, required: The part that came from price changes on units still held.
            - `income` string, required: The part that came from interest accrued but not yet paid.
      - `cost_basis` string, required: Acquisition cost of the units still held, converted at the exchange rates in force when they were bought.
      - `currency` 'EUR' | 'USD' | 'GBP', required
      - `gross` string, required: Total earnings before fees in the account's currency, each part converted at the exchange rate of the day it happened. Equals the investment effect plus the currency effect.
      - `money_in` string, required: The money put into the position over the period, in the account's currency: the value of the units held at the start of the period plus the cost of every purchase during it, each converted at the exchange rate of its own day. Sales are not subtracted.
      - `simple_return` string, nullable, required: The simple return as a decimal: `gross` divided by `money_in`, so it includes the currency effect. Before fees, which are charged to the account rather than to a position. `null` when nothing was put in.
      - `simple_return_annualised` string, nullable, required: `simple_return` annualised over the period: (1 + `simple_return`) ^ (365 / days) - 1. `null` when the period is shorter than a year, which is never annualised, or when `simple_return` is.
    - `trading` PositionTradingEarnings, required
      - `attribution` TradingEarningsAttribution, required
        - `investment` EarningsEffect, required
          - `realized` RealizedEarningsSplit, required
            - `capital` string, required: The part that came from price changes on units sold.
            - `income` string, required: The part that came from income paid out.
          - `total` string, required: Realized plus unrealized.
          - `unrealized` UnrealizedEarningsSplit, required
            - `capital` string, required: The part that came from price changes on units still held.
            - `income` string, required: The part that came from interest accrued but not yet paid.
      - `cost_basis` string, required: Total acquisition cost of the units still held.
      - `currency` 'EUR' | 'USD' | 'GBP', required
      - `gross` string, required: Total realized and unrealized earnings before fees and taxes.
      - `money_in` string, required: The money put into the position over the period: the value of the units held at the start of the period plus the cost of every purchase during it. Sales are not subtracted.
      - `simple_return` string, nullable, required: The simple return as a decimal: `gross` divided by `money_in`. Before fees, which are charged to the account rather than to a position. `null` when nothing was put in.
      - `simple_return_annualised` string, nullable, required: `simple_return` annualised over the period: (1 + `simple_return`) ^ (365 / days) - 1. `null` when the period is shorter than a year, which is never annualised, or when `simple_return` is.
      - `unrealized_percentage` string, required: Unrealized earnings as a proportion of the cost basis.
  - `positions` AccountPositionsEarnings, required
    - `attribution` EarningsAttribution, required
      - `currency` EarningsEffect, required
        - `realized` RealizedEarningsSplit, required
          - `capital` string, required: The part that came from price changes on units sold.
          - `income` string, required: The part that came from income paid out.
        - `total` string, required: Realized plus unrealized.
        - `unrealized` UnrealizedEarningsSplit, required
          - `capital` string, required: The part that came from price changes on units still held.
          - `income` string, required: The part that came from interest accrued but not yet paid.
      - `investment` EarningsEffect, required
        - `realized` RealizedEarningsSplit, required
          - `capital` string, required: The part that came from price changes on units sold.
          - `income` string, required: The part that came from income paid out.
        - `total` string, required: Realized plus unrealized.
        - `unrealized` UnrealizedEarningsSplit, required
          - `capital` string, required: The part that came from price changes on units still held.
          - `income` string, required: The part that came from interest accrued but not yet paid.
    - `gross` string, required: Total the positions earned before fees, in the account's currency. Equals the investment effect plus the currency effect.
  - `simple_return` string, nullable, required: The simple return as a decimal: `net` divided by `money_in`. `null` when nothing was put in.
  - `simple_return_annualised` string, nullable, required: `simple_return` annualised over the period: (1 + `simple_return`) ^ (365 / days) - 1. `null` when the period is shorter than a year, which is never annualised, or when `simple_return` is.

## Other responses

- `400`: Bad Request

## Changes

- **2026-10-29** `6a63920239d8`: 5 breaking, 3 warning, 24 info
  - the `cash` response's property type changed from no type to `object` for status `200`
  - the `currency` response's property type changed from no type to `string` for status `200`
  - the `position_earnings/items/reporting` response's property type changed from no type to `object` for status `200`
  - the `position_earnings/items/trading` response's property type changed from no type to `object` for status `200`
  - …28 more
- **2026-10-27** `b4b87fc2006c`: 9 info
  - added the required property `money_in` to the response with the `200` status
  - added the required property `position_earnings/items/reporting/allOf[subschema #1: PositionReportingEarnings]/money_in` to the response with the `200` status
  - added the required property `position_earnings/items/reporting/allOf[subschema #1: PositionReportingEarnings]/simple_return` to the response with the `200` status
  - added the required property `position_earnings/items/reporting/allOf[subschema #1: PositionReportingEarnings]/simple_return_annualised` to the response with the `200` status
  - …5 more
- **2026-10-06** `aa43bab6253c`: 1 breaking
  - response property `context/additionalProperties/` list-of-types was widened by adding types `array` to media type `application/json` of response `400`
- **2026-09-29** `ec2ca1037fde`: 1 info
  - added the optional property `position_earnings` to the response with the `200` status
- …earlier changes not shown

[Operation history](https://skmtc.dev/joinsophic/apis/sophic-engine-api/changes/accounts/:account_id/earnings/get.md)

---

[API](https://skmtc.dev/joinsophic/apis/sophic-engine-api.md) - [All operations](https://skmtc.dev/joinsophic/apis/sophic-engine-api/llms.txt) - [OpenAPI document](https://skmtc.dev/joinsophic/apis/sophic-engine-api/revisions/1afda7d8d185?raw)
