Get realized return per trading day
Returns the realized return and trade count for each day of a range, grouped into whole Sunday-to-Saturday weeks. Days are market days in America/New_York, and every day in the range is present whether or not it traded. Returns are realized only: a position is counted on the day it is closed, against the average cost of what opened it, so opening a position reports a trade with no return against it. Broker fees and commissions are not included. Omitting account_id reports every account the organization has in environment, summed across per-account books rather than pooled, so one account’s sale never closes another’s position. At most 12 weeks are returned per request; use next_cursor for anything longer.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Trading account ID. Omit to report every account the organization has in environment
Required. Which environment the read covers. Resolved to the organization's accounts in that environment, including disabled and deleted ones, since the ledger stores no environment of its own. Rejected with 400 when it disagrees with the account named alongside it.
paper, live Range start, raised to the window the caller's plan grants and then widened back to the Sunday of the week containing it, so the oldest week reported can begin inside that window. Defaults to the start of the week end falls in
Range end, widened forward to the Saturday of the week containing it. Defaults to now, so sending neither bound returns the current week
Start of the next page as YYYY-MM-DD, taken from a previous response. Overrides start
Response
Daily returns retrieved
Whole weeks, oldest first.
The Sunday the next page starts at, as YYYY-MM-DD, or null once the
requested range is exhausted. Pass it back as next_cursor.
Unlike the keyset cursors on the list endpoints this is a plain date: it is a week boundary the caller can already work out, so there is nothing to be gained by making it opaque.