performance

Retrieve account earnings (P&L)

Changed on

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

get/accounts/{account_id}/earnings

Request

  • Base URL
    https://api.engine.usesophic.com
  • Auth
    HTTP bearer

Path parameters

account_idstring required

Query parameters

period'1d' | '1w' | '1m' | 'this-month' | '3m' | '6m' | 'ytd' | '1y' | 'all'

Predefined period over which earnings are computed. Takes precedence over period_start/period_end when provided.

period_startstring date-time

The period start (in ISO 8601 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.

Example:period_start=2025-11-12T00:00:00Z
period_endstring date-time

The period end (in ISO 8601 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.

Example:period_end=2025-11-12T00:00:00Z

Response

Successful Response

accountstring required

ID of the account the earnings were computed for.

currency'EUR' | 'USD' | 'GBP' required
feesstring required

Fees deducted from gross earnings.

grossstring 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_instring 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.

netstring required

Everything the account earned after fees: gross minus fees.

period_endstring date-time required

End date and time of the earnings period.

period_startstring date-time required

Start date and time of the earnings period.

simple_returnstring nullable required

The simple return as a decimal: net divided by money_in. null when nothing was put in.

simple_return_annualisedstring 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.

Example response

{
  "period_end": "2026-03-31T23:59:59Z",
  "period_start": "2026-01-01T00:00:00Z",
  "position_earnings": [
    {
      "period_end": "2026-03-31T23:59:59Z",
      "period_start": "2026-01-01T00:00:00Z",
      "reporting": {
        "simple_return": "0.0307",
        "simple_return_annualised": "0.0127"
      },
      "trading": {
        "simple_return": "0.0307",
        "simple_return_annualised": "0.0127"
      }
    }
  ],
  "simple_return": "0.0307",
  "simple_return_annualised": "0.0127"
}

Changes

    • breaking

      the response's property type changed from no type to object for status

    • breaking

      the response's property type changed from no type to string for status

    • breaking

      the // response's property type changed from no type to object for status

    • breaking

      the // response's property type changed from no type to object for status

    • breaking

      the response's property type changed from no type to object for status

    • warning

      added the new EUR enum value to the response property for the response status

    • warning

      added the new GBP enum value to the response property for the response status

    • warning

      added the new USD enum value to the response property for the response status

    • info

      removed from the response property allOf list for the response status

    • info

      removed from the response property allOf list for the response status

    • info

      removed from the response property allOf list for the response status

    • info

      removed from the // response property allOf list for the response status

    • info

      removed from the // response property allOf list for the response status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property //// to the response with the status

    • info

      added the required property //// to the response with the status

    • info

      added the required property //// to the response with the status

    • info

      added the required property //// to the response with the status

    • info

      added the required property //// to the response with the status

    • info

      added the required property //// to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status