---
title: "POST /v1/portfolios/{portfolioSlug}/value-history"
method: POST
path: "/v1/portfolios/{portfolioSlug}/value-history"
tags: ["Portfolios"]
---

# POST /v1/portfolios/{portfolioSlug}/value-history

`POST /v1/portfolios/{portfolioSlug}/value-history`

## Request

- Base URL: `https://api.tokenbooks.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tokenbooks.io/v1/portfolios/{portfolioSlug}/value-history`
- Auth: API key in header `x-api-key`

## Path parameters

- `portfolioSlug` string, required

## Request body

- PortfolioValueHistoryRequestDto
  - `startDate` union, required: Inclusive UTC start timestamp
    - string, date-time
    - string
  - `endDate` union, required: Inclusive UTC end timestamp
    - string, date-time
    - string
  - `includeSpam` boolean: Whether spam tokens should be included

## Response `201`

- PortfolioValueHistoryResponseDto
  - `cachedThrough` string, date, nullable, required: UTC day in YYYY-MM-DD format
  - `refreshedAt` string, date-time, nullable, required: Refresh timestamp in ISO 8601 format
  - `isStale` boolean, required: Whether a background refresh was started
  - `refreshJobId` string, nullable, required: Refresh job ID
  - `refreshQueueName` string, nullable, required: Refresh job consumer name for status polling
  - `data` object[], required
    - `day` string, date, required: UTC day in YYYY-MM-DD format
    - `value` string, required: Portfolio value in base currency
    - `assetCount` integer, required: Number of assets on this day
    - `walletCount` integer, required: Number of wallets on this day

---

[API](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api.md) · [All operations](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api/revisions/180622e6255e?raw)
