Get Exchange PnL History
Get a cash-flow-adjusted historical exchange P&L chart
You will get
You will get
- 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
Required
Required
- portfolioId: An owned exchange portfolio ID
- interval: hourly, daily, weekly, monthly, or yearly
- Exactly one time mode: range, or both from and to
Optional
Optional
- currency: Defaults to USD
Authorizations
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
Preset time range. Mutually exclusive with from/to.
24h, 1w, 1m, 3m, 6m, 1y, all "1m"
Inclusive custom-range start. Use YYYY-MM-DD (UTC midnight) or an ISO timestamp with timezone. Must be provided with to and without range.
"2026-07-25T00:00:00.000Z"
Exclusive custom-range end. Use YYYY-MM-DD (UTC midnight) or an ISO timestamp with timezone. Must be provided with from and without range.
"2026-08-24T00:00:00.000Z"
Chart bucket interval. Hourly is available only for 24h or a custom window of at most 24 hours entirely within the latest 24 hours.
hourly, daily, weekly, monthly, yearly "daily"
Currency for P&L values. Defaults to USD.
"USD"
Owned exchange portfolio ID.
"66c19c585400000000000000"