> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorage.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cost basis via API

> Provide cost basis and acquisition dates for in-kind deposits via API.

When assets are deposited from an external source, Anchorage may not have the original acquisition details. If cost basis isn't provided, the system defaults to \$0, which may affect your reported gains/losses. This information ensures that tax lots and gains/loss calculations reflect accurate historical cost basis.

Cost basis information you provide may impact data reported on 1099-DA, for eligible US tax-paying entities. Anchorage Digital partners with a third-party tax reporting provider to support tax reporting, including 1099-DA, 1099-MISC, and 1099-INT.

<Info>
  Anchorage Digital does not provide financial, tax, or legal advice. Consult a qualified professional for guidance specific to your situation.
</Info>

## Cost basis method (HIFO)

Anchorage Digital uses **HIFO (Highest-In, First-Out)** by default for cost basis accounting unless otherwise configured.

**Example (HIFO):**

| Purchase   | Quantity | Price        |
| ---------- | -------- | ------------ |
| Purchase 1 | 10 BTC   | \$20,000/BTC |
| Purchase 2 | 20 BTC   | \$22,000/BTC |
| Purchase 3 | 15 BTC   | \$35,000/BTC |

If 25 BTC are sold, HIFO assumes:

* 15 BTC from Purchase 3 sold first (highest cost)
* Remaining 10 BTC from Purchase 2

Our tax reporting provider offers HIFO, LIFO, and FIFO. Contact Anchorage customer service to request a change in default cost basis methodology. Individual lot selection is not currently available.

## Default logic and validations

* If a deposit is missing user-provided cost basis, the system assigns a default of `0`. Provide cost basis promptly after deposits complete to avoid inaccurate reporting.
* Cost basis updates support up to **100 lots per transaction**.
* The acquisition date must be **on or before** the transfer/deposit date.
* Trades may have small rounding differences due to settlement precision. Your internal reconciliation should account for this.

## API workflow

<Steps>
  <Step title="List tax accounts">
    Identify tax accounts your API credentials can access.

    **GET** `/tax/accounts`

    ```json theme={null}
    {
      "accounts": [
        {
          "taxAccountId": "acc_123",
          "name": "Example 123"
        }
      ]
    }
    ```
  </Step>

  <Step title="List deposit transactions for a tax account">
    Retrieve deposit transactions for a given tax account. Filter by `hasCostBasis=false` to return only deposits missing user-provided cost basis.

    **GET** `/tax/accounts/{taxAccountId}/transactions`

    ```json theme={null}
    {
      "data": [
        {
          "assetType": "BTC",
          "externalId": "9be748be-d760-4d36-90f8-86b699c4e8bd",
          "id": "9cd9f4d4-078b-4e44-a308-7662fec0f546",
          "receivedAssets": [
            {
              "acquisitionDatetime": "2026-04-06T17:55:48.083Z",
              "costBasis": "2500",
              "quantity": "1.0"
            }
          ],
          "transactionTime": "2022-07-30T22:15:31.99999Z"
        }
      ],
      "page": {
        "next": "<next page url>"
      }
    }
    ```
  </Step>

  <Step title="Provide cost basis for a deposit transaction">
    Submit one or more lots whose total quantity matches the deposit quantity.

    **PATCH** `/tax/accounts/{taxAccountId}/transactions/{transactionId}`

    ```json theme={null}
    {
      "lots": [
        {
          "quantity": "0.7500",
          "costBasis": "15000.00",
          "acquisitionDate": "2024-05-10T14:19:52.539Z"
        },
        {
          "quantity": "0.5000",
          "costBasis": "12000.00",
          "acquisitionDate": "2023-11-02T14:19:52.539Z"
        }
      ]
    }
    ```

    **Validation rules:**

    * Total lot quantities must equal the transaction quantity
    * Acquisition date must be on or before transfer date
    * Maximum 100 lots per transaction
  </Step>

  <Step title="Confirm the update">
    Re-fetch the transaction and verify `costBasis` is no longer `0` and lots were accepted as submitted.
  </Step>
</Steps>

## Operational guidance

* **Timing:** Update cost basis as soon as possible after an in-kind deposit so downstream reporting reflects accurate lots and gains/loss.
* **Source of truth:** Use your internal records (exchange statements, wallet history, or prior custodians' reports) to determine acquisition dates and basis.
* **Auditability:** Retain supporting documentation for the lot inputs used.

## Troubleshooting

Common causes of failures:

| Issue            | Cause                                        |
| ---------------- | -------------------------------------------- |
| Request rejected | Lot quantities don't sum to deposit quantity |
| Date error       | Acquisition date is after the transfer date  |
| Too many lots    | More than 100 lots submitted                 |
| Asset mismatch   | Lots don't match deposit asset type          |
| Unknown asset    | Asset type not recognized                    |

## Tax terminology

| Term                 | Overview                                                                                |
| -------------------- | --------------------------------------------------------------------------------------- |
| Tax account          | Top-level unit used in the API for tax reporting                                        |
| Tax transaction      | A tax-relevant event such as a deposit                                                  |
| Gains/loss           | Difference between sale price and cost basis                                            |
| Inventory            | Total quantity and cost basis of a specific asset type, consisting of multiple tax lots |
| Tax lot              | A specific group of units acquired at the same time and cost basis                      |
| Acquisition date     | Date when an individual gains control of an asset                                       |
| Cost basis           | Value of an asset in USD at time of acquisition, used to calculate gains or losses      |
| Cost basis method    | Methodology used to compute gains/losses (e.g., HIFO, FIFO, LIFO)                       |
| Missing cost basis   | Occurs when assets are transferred into Anchorage without original acquisition details  |
| Holding period       | Duration an asset is held before being sold                                             |
| Realized gain/loss   | Gains or losses from the sale or disposition of an asset                                |
| Unrealized gain/loss | Gains or losses from price fluctuation not yet realized through a sale                  |
