v46

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-211591,0051.4 MB
Kraken Embed

Get Portfolio History

Get historical balances and valuations over time for a user's portfolio with optional filtering by assets and date range.

get/v1/kraken_embed/users/{user_id}/history

Path parameters

user_idstring required

The ID of the Privy user.

Query parameters

string[]
OR
string
include[total_balance]'true' | 'false'
include[total_pnl]'true' | 'false'
start_datestring date nullable
end_datestring date nullable
interval'hourly' | 'daily'
resolutioninteger nullable
quotestring nullable
cursorstring nullable

Headers

privy-app-idstring required

ID of your Privy app.

Response

Portfolio history retrieved successfully.

Example response

{
  "data": {
    "result": {
      "currency": "USD",
      "end_date": "2024-12-31",
      "history": [
        {
          "assets": {
            "BTC": {
              "balance": "0.15000000"
            },
            "ETH": {
              "balance": "5.00000000"
            }
          },
          "date": "2024-01-01",
          "total_balance": "10000.00",
          "total_pnl": "0.00",
          "total_pnl_pct": "0.00"
        },
        {
          "assets": {
            "BTC": {
              "balance": "0.16000000"
            },
            "ETH": {
              "balance": "5.20000000"
            }
          },
          "date": "2024-12-31",
          "total_balance": "11500.00",
          "total_pnl": "1500.00",
          "total_pnl_pct": "15.00"
        }
      ],
      "next_cursor": null,
      "start_date": "2024-01-01",
      "total_pnl": "1500.00",
      "total_pnl_pct": "15.00"
    }
  }
}