performance

Retrieve position earnings (P&L)

Changed on

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

get/positions/{position_id}/earnings

Request

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

Path parameters

position_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 position 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 holding the position.

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.

positionstring required

ID of the position the earnings were computed for.

Example response

{
  "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"
  }
}

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 object for 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