---
title: "List selected cost-basis lot history"
method: POST
path: "/v1/portfolios/{portfolioSlug}/cost-basis-lots/history"
tags: ["Portfolios"]
deprecated: true
---

# List selected cost-basis lot history

`POST /v1/portfolios/{portfolioSlug}/cost-basis-lots/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}/cost-basis-lots/history`
- Auth: API key in header `x-api-key`

> **Deprecated.**

Returns one paginated history page for requested cost-basis lot IDs inside an asset. asOfTimestamp is required.

## Path parameters

- `portfolioSlug` string, required

## Request body

- CostBasisLotHistoryRequestDto
  - `page` integer: Page number
  - `pageSize` integer: Items per page (max 100)
  - `assetId` string, required: Asset ID that owns the requested lot IDs
  - `lotIds` string[], required: Contributing cost-basis lot IDs to include
  - `asOfTimestamp` string, date-time, required: Required inclusive timestamp boundary.
  - `sort` string: Single sort field. Prefix with - for descending. Supported fields: timestamp, diff, value, price.

## Response `200`

- PaginatedCostBasisLotsResponseDto
  - `data` object[], required
    - `id` string, required: Lot identifier (e.g. btc_1)
    - `entryId` string, required: Unique lot ledger entry ID
    - `timestamp` string, required: Entry event time (ISO 8601)
    - `acquisitionTimestamp` string, required: FIFO/LIFO acquisition (lineage) date for holding-period and tax classification (ISO 8601). Equals timestamp for ADD; for a moved lot it is the original acquisition date.
    - `entryKind` 'ADD' | 'DSP' | 'CUT' | 'MVE' | 'RES' | 'REL', required: Lot entry kind (ADD, DSP, CUT, MVE, RES, REL)
    - `lotMethod` string, required: Lot accounting method (FIFO, LIFO, HIFO, ACB)
    - `diff` string, required: Signed quantity change (decimal string)
    - `price` string, nullable, required: Unit price in portfolio currency (decimal string)
    - `value` string, required: Entry value in portfolio currency (decimal string)
    - `positionId` string, nullable, required: Internal DeFi position ID, if applicable
    - `assetId` string, required: Asset ID
    - `assetSymbol` string, nullable, required: Asset symbol
    - `assetName` string, nullable, required: Asset name
    - `assetIsSpam` boolean, required: Effective spam flag after portfolio token preferences override token defaults. Assets without tokens are not spam.
    - `walletName` string, nullable, required: Wallet name when this lot is associated with a wallet.
    - `walletChainId` string, nullable, required: Wallet chain ID
    - `walletAddress` string, nullable, required: Wallet address (canonical (chainId, address) identifier)
    - `portfolioTransactionId` string, required: Originating portfolio transaction ID
    - `operationType` 'DEPOSIT_FIAT' | 'INCOME' | 'REFUND' | 'REBATE' | 'WITHDRAWAL_FIAT' | 'EXPENSE' | 'BUY' | 'SELL' | 'EXCHANGE' | 'SWAP' | 'MOVE' | 'INTERCOMPANY_SEND' | 'INTERCOMPANY_RECEIVE' | 'STAKE' | 'UNSTAKE' | 'PROTOCOL_DEPOSIT' | 'PROTOCOL_WITHDRAW' | 'VAULT_DEPOSIT' | 'VAULT_WITHDRAW' | 'LP_IN' | 'LP_OUT' | 'LOAN_BORROW' | 'LOAN_REPAY' | 'LOAN_LIQUIDATION' | 'LEND_GIVE' | 'LEND_WITHDRAW' | 'ADJUSTMENT' | 'UNCATEGORIZED' | 'SPAM' | 'null', nullable, required: Operation type of the originating transaction
    - `txHash` string, nullable, required: On-chain transaction hash from the transfer linked to this lot journal line, when present.
    - `walletTransactionTransfers` object[], required: Wallet transfers linked to the originating transaction.
      - `chainId` string, required: Transfer chain ID
      - `txHash` string, required: Transfer transaction hash
  - `pagination` object, required
    - `page` integer, required: Current page number
    - `pageSize` integer, required: Items per page
    - `totalCount` integer, required: Total number of items
    - `totalPages` integer, required: Total number of pages

---

[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)
