Skip to content
MyStocks Developers
API v1

API v1

Current stable contract

Versioning policyRelease changelog
Sandbox console

Sub-account equity history

Sub-Accounts & White-Label Retail KYC

GET

/users/{userId}/portfolio/history

Sub-account equity history

Sandbox availablegetUserPortfolioHistory

Daily raw-equity history for one sub-account owned by the authenticated partner. Values include wallet cash and holdings but are not cash-flow adjusted, so they must not be presented as investment P&L.

Parameters

userIdstringpathRequired
period1M | 3M | 6M | 1Y | ALLquery

Example: 1Y

fromstringquery
tostringquery

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

accountTypeMASTER | SUBACCOUNTRequired
scopeMASTER_ACCOUNT | SUBACCOUNTRequired
subAccountIdstring
externalIdstring | null
baseCurrencyUSDRequired
timeframe1DRequired
period1M | 3M | 6M | 1Y | ALLRequired
calculationRAW_EQUITYRequired
cashFlowAdjustedbooleanRequired
methodologystringRequired
pointsobject[]Required
points[].timestampstringRequired
points[].equitynumberRequired

Total account value including cash and holdings.

points[].marketValuenumberRequired

Holdings value only.

countintegerRequired
asOfstring | null

Response codes

200Sub-account daily equity points.
400Invalid period or date range.
404Sub-account not found or not owned by this partner.