Skip to main content
GET
cURL
25 credits per request

  • Chronological period P&L and P&L percentage points
  • Deposits and withdrawals removed from investment performance
  • The effective currency, range, interval, from, and to values
  • interval: hourly, daily, weekly, monthly, or yearly
  • Exactly one time mode: range, or both from and to
  • portfolioId: An owned API-connected portfolio; omit it to aggregate all owned API-connected portfolios
  • shareToken and passcode: Access a shared CoinStats portfolio instead
  • currency: Defaults to USD

Authorizations

X-API-KEY
string
header
required

API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the X-API-KEY request header. Never expose your key in client-side code.

Headers

sharetoken
string
passcode
string

Passcode for accessing protected portfolio data

Example:

"123456"

Query Parameters

range
enum<string>

Preset time range. Mutually exclusive with from/to.

Available options:
24h,
1w,
1m,
3m,
6m,
1y,
all
Example:

"1m"

from
string

Inclusive custom-range start. Use YYYY-MM-DD (UTC midnight) or an ISO timestamp with timezone. Must be provided with to and without range.

Example:

"2026-07-25T00:00:00.000Z"

to
string

Exclusive custom-range end. Use YYYY-MM-DD (UTC midnight) or an ISO timestamp with timezone. Must be provided with from and without range.

Example:

"2026-08-24T00:00:00.000Z"

interval
enum<string>
required

Chart bucket interval. Hourly is available only for 24h or a custom window of at most 24 hours entirely within the latest 24 hours.

Available options:
hourly,
daily,
weekly,
monthly,
yearly
Example:

"daily"

currency
string
default:USD

Currency for P&L values. Defaults to USD.

Example:

"USD"

portfolioId
string

API-connected portfolio ID. Omit to aggregate all owned API-connected portfolios. Mutually exclusive with shareToken.

Example:

"abc123def456"

Response

Cash-flow-adjusted historical portfolio P&L chart

result
object[]
required
meta
object
required