Skip to content
MyStocks Developers
API v1

API v1

Current stable contract

Versioning policyRelease changelog
Sandbox console

Open tax lots (sub-account)

Sub-Accounts & White-Label Retail KYC

GET

/users/{userId}/tax-lots

Open tax lots (sub-account)

Sandbox availablegetSubAccountTaxLots

Open tax lots for a sub-account — each remaining acquired quantity with per-unit cost basis and acquisition date, derived FIFO from settled orders. Pair with /gains for realized disposals.

Parameters

userIdstringpathRequired

Example: usr_abc123

symbolstringquery

Filter to one symbol.

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Response fields

subAccountIdstring | null
accountTypestring
currencystring

Example: "USD"

countinteger
totalCostUsdnumber
lotsobject[]
lots[].lotIdstring

The acquiring order id.

lots[].symbolstring
lots[].exchangestring | null
lots[].quantitynumber

Remaining open quantity.

lots[].originalQuantitynumber
lots[].costBasisPerUnitUsdnumber
lots[].remainingCostUsdnumber
lots[].acquiredAtstring | null
lots[].acquisitionFeeUsdnumber

Response codes

200Open lots.
404Sub-account not found.