Statements and Confirms
Build customer and partner statements from MyStocks ledgers, executions, fees, dividends, tax lots, and activity records.
Explore endpoints
24 of 24/users/{userId}/gains
Realized capital gains (sub-account)
Full endpoint documentationgetSubAccountGainsRealized gains/losses for a sub-account — each disposal FIFO-matched to its acquiring lot, with acquisition + disposal dates, cost basis, proceeds, holding period, and gain. Feed a capital-gains tax statement.
Parameters
userIdstringpathRequiredExample: usr_abc123
symbolstringqueryfromstringquerytostringqueryHeaders
AuthorizationstringRequiredBearer sk_sandbox_<your_key> for sandbox requests.
Response fields
subAccountIdstring | nullaccountTypestringcurrencystringExample: "USD"
methodFIFOcountintegertotalProceedsUsdnumbertotalCostUsdnumberrealizedGainUsdnumberperiodobjectperiod.fromstring | nullperiod.tostring | nulldisposalsobject[]disposals[].symbolstringdisposals[].exchangestring | nulldisposals[].quantitynumberdisposals[].acquiredAtstring | nulldisposals[].disposedAtstring | nulldisposals[].holdingPeriodDaysinteger | nulldisposals[].costBasisUsdnumberdisposals[].proceedsUsdnumberdisposals[].gainUsdnumberdisposals[].methodFIFOdisposals[].buyOrderIdstringdisposals[].sellOrderIdstringResponse codes
200Realized disposals.404Sub-account not found.MyStocks exposes source records for statements rather than prescribing your customer-facing statement layout. Combine the period-specific report endpoints with order executions and the client-activity feed.
Statement inputs
| Purpose | Endpoint |
|---|---|
| Customer activity | GET /client-activity |
| Account transactions | GET /users/{userId}/transactions |
| Order and fill confirms | GET /users/{userId}/orders/{orderId}/executions |
| Positions | GET /report/positions or the sub-account portfolio endpoint |
| Fees and markup | GET /report/fees and GET /report/revenue |
| Dividends | GET /report/dividends and GET /dividends/{symbol}/history |
| Tax records | GET /users/{userId}/tax-lots and GET /users/{userId}/gains |
| Partner invoice | GET /report/invoice?month=YYYY-MM |
Recommended statement model
Store the source period, account identifier, symbol, currency, quantity, unit price, gross value, fees, FX metadata, order ID, execution sequence, event IDs, and request ID. Keep pending, settled, rejected, and cancelled states distinct.
For customer statements, clearly distinguish:
- order acceptance from execution;
- execution from settlement;
- settled cash from unsettled proceeds;
- local-market price from USD wallet impact;
- MyStocks records from your own fees or disclosures.
Use the Daily Reconciliation process to verify statement totals before publication.
Was this page useful?
Your signal helps us tighten partner onboarding docs.
Last updated on