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
  • An empty result when the portfolio history is not synchronized
  • portfolioId: An owned exchange portfolio ID
  • interval: hourly, daily, weekly, monthly, or yearly
  • Exactly one time mode: range, or both from and to
  • 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.

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
required

Owned exchange portfolio ID.

Example:

"66c19c585400000000000000"

Response

Cash-flow-adjusted historical exchange P&L chart

result
object[]
required
meta
object
required