performance

Retrieve earnings (P&L)

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

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

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.

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

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.

Response

OK

cost_basisstring required

Total acquisition cost of the position.

currency'EUR' | 'USD' | 'GBP' required
gross_capitalstring required

Capital earnings before fees and taxes.

gross_incomestring required

Income earnings before fees and taxes.

gross_realizedstring required

Realized earnings before fees and taxes.

gross_totalstring required

Total realized and unrealized gross earnings.

gross_unrealizedstring required

Unrealized earnings before fees and taxes.

gross_unrealized_percentagestring required

Unrealized gross earnings as a proportion of cost basis.

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.

realized_capitalstring required

Realized earnings from capital appreciation.

realized_incomestring required

Realized earnings from income.

unrealized_capitalstring required

Unrealized earnings from capital appreciation.

unrealized_incomestring required

Unrealized earnings from income.

Example response

{
  "cost_basis": "2000.00",
  "gross_capital": "175.00",
  "gross_income": "34.75",
  "gross_realized": "125.50",
  "gross_total": "209.75",
  "gross_unrealized": "84.25",
  "gross_unrealized_percentage": "0.0421",
  "period_end": "2026-03-31T23:59:59Z",
  "period_start": "2026-01-01T00:00:00Z",
  "realized_capital": "100.00",
  "realized_income": "25.50",
  "unrealized_capital": "75.00",
  "unrealized_income": "9.25"
}

Changes

Changed in 3 of the 12 revisions of this API.18

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

  • 8e8a8242f1f214See the full diff
    • the response's property type changed from string to no type for status

      response-property-type-changed

    • added to the response property allOf list for the response status

      response-property-all-of-added

    • removed the EUR enum value from the response property for the response status

      response-property-enum-value-removed

    • removed the GBP enum value from the response property for the response status

      response-property-enum-value-removed

    • removed the USD enum value from the response property for the response status

      response-property-enum-value-removed

    • api tag performance added

      api-tag-added

    • api tag Performance removed

      api-tag-removed

    This revision also has 53 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog