> ## 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.

# Tax data

> Access and manage subaccount tax transactions, cost basis, inventory, gains/losses, and tax forms.

export const Check = () => <Icon icon="check" color="#049159" />;
export const Cross = () => <Icon icon="x" color="#dd0000" />;

Topics covered:

* Tax data overview and accounting method
* Critical transaction and cost basis considerations
* Supported tax forms
* Integration steps

<Note>
  Anchorage Digital does not provide financial, tax, or legal advice.
</Note>

***

## Tax data overview

Anchorage Digital reports tax data for two account types:

1. **Taxable accounts** — individual, trust, joint, etc.
2. **Individual Retirement Accounts (IRA)**

### HIFO accounting method

Anchorage Digital uses **HIFO (highest-in, first-out)** by default — the highest-priced units are sold first when calculating cost basis. This can be changed at the wealth manager level or overridden per account.

**Example:** Investor holds 10 BTC at $20k, 20 BTC at $22k, 15 BTC at \$35k. Selling 25 BTC under HIFO:

* 15 BTC from the \$35k purchase sold first
* 10 BTC from the \$22k purchase sold next

### Tax reporting partnership

Anchorage Digital partners with a third-party tax reporting provider to give wealth managers and end clients required tax data, compliance features, and tax forms.

### Transaction types

| Type                    | Description                                                                       |
| :---------------------- | :-------------------------------------------------------------------------------- |
| On-chain transactions   | Asset movement on-chain. **Not relevant to tax APIs.**                            |
| Subaccount transactions | Asset movement on the wealth manager's ledger at Anchorage Digital.               |
| Tax transactions        | Any transaction with a taxable event — these are the transactions in the tax API. |

Taxable subaccount transaction event `types`: `DEPOSIT`, `TRADE`, `WITHDRAW`.

### Cost basis tracking

Cost basis is tracked automatically throughout the asset lifecycle. For **in-kind deposits**, the wealth manager and end client must supply the cost basis via API.

### `subaccountId` and `customerId` mapping

Each `subaccountId` maps 1:1 to an Account Owner ID with our tax reporting provider (which Anchorage Digital maps to `customerId`). This provides:

* **Accurate, segregated tracking** — clear traceability between strategies, trades, and their cost-basis impact.
* **Tax-loss harvesting flexibility** — losses can be realized within individual accounts without affecting others.

### Tax terminology

| Term                 | Description                                                                                                        |
| :------------------- | :----------------------------------------------------------------------------------------------------------------- |
| Tax transaction      | Data used by our tax reporting provider to generate tax outputs. Differs from subaccount or on-chain transactions. |
| Gain/loss            | Difference between sale price and cost basis. Reported as `SHORT_TERM` or `LONG_TERM` by tax year.                 |
| Inventory            | Total quantity and cost basis of a specific asset type held by a subaccount, comprised of multiple tax lots.       |
| Tax lot              | A group of units acquired at the same time and cost basis.                                                         |
| Acquisition date     | Date an individual gains control of an asset. Determines long-term vs. short-term holding period in the US.        |
| Cost basis           | Value of an asset at acquisition time; used to calculate gain/loss on disposal.                                    |
| Cost basis method    | HIFO (default) or LIFO/FIFO (configurable). Individual lot selection is on the roadmap.                            |
| Missing cost basis   | Occurs when transferring assets in-kind into a deposit wallet. Can be supplied via API.                            |
| Holding period       | Duration an asset is held. Long-term (>1 year) receives preferential US tax treatment.                             |
| Realized gain/loss   | Gains/losses from actual sale or disposition of an asset.                                                          |
| Unrealized gain/loss | Gains/losses from price fluctuation without disposal.                                                              |

***

## Critical considerations

* **Missing cost basis is `null`**, not `0`.
* **Default method is HIFO** — configurable per wealth manager or per account.
* **All tax data is at the subaccount level**, regardless of account owners.
* **Trade rounding (dust):** Trades cannot always settle to full decimal precision. Rounded values are stored in the ledger and used for balancing, but full-precision quantities appear in trade confirmations and tax reporting — meaning tax data and ledger values may differ slightly by a small "dust" amount. This is an industry-wide issue with trade confirms vs. custody precision.

***

## Supported tax forms

<Note>
  Anchorage Digital does not perform tax reporting on behalf of wealth managers or end clients, and does not issue tax forms directly. Our tax reporting provider generates and provides forms based on the data Anchorage Digital provides.
</Note>

| Account type | Form            | Description                                                           | Deadline            | Status      |
| :----------- | :-------------- | :-------------------------------------------------------------------- | :------------------ | :---------- |
| Taxable      | Cost-basis data | Proceeds and cost basis per transaction for Form 8949 and Schedule D. | Preferred by Feb 15 | <Check />   |
| Taxable      | 1099-B          | Proceeds from brokerage/trading transactions.                         | Jan 31              | <Check />   |
| Taxable      | 1099-MISC       | Miscellaneous income (staking rewards, services, mining).             | Jan 31              | Coming soon |
| Non-taxable  | 1099-R          | Distributions from retirement accounts.                               | Jan 31              | Coming soon |
| Non-taxable  | Form 5498       | IRA contribution reporting.                                           | June 2              | Coming soon |

***

## Integration steps

<Note>
  Sandbox tax testing may be limited due to the absence of a full trade → settlement lifecycle for mainnet assets.
</Note>

### Step 1: Review tax transactions

**`GET /v2/tax/transactions/{subaccountId}`**

Returns tax transaction data for a subaccount. Check for missing cost basis on deposits.

<CodeGroup>
  ```bash Request theme={null}
  curl --request GET \
       --url https://api.anchorage-staging.com/v2/tax/transactions/{subaccountId} \
       --header 'Api-Access-Key: {API Key}' \
       --header 'accept: application/json'
  ```

  ```json Response theme={null}
  {
    "data": [
      {
        "externalId": "dad566f7-d5e6-4bbf-a2ef-c092435163f9",
        "fee": { "assetType": "ETH", "costBasis": "3335.22", "quantity": "0.029983029605243432217" },
        "feeAsset": [{ "assetType": "ETH", "costBasis": "3335.22", "quantity": "0.029983029605243432217" }],
        "id": "6159224d-db88-47a4-99ae-1e3b8aeed671",
        "received": { "assetType": "ETH", "costBasis": "3335.22", "quantity": "29.983029605243432217" },
        "receivedAsset": [{ "assetType": "ETH", "costBasis": "3335.22", "quantity": "29.983029605243432217" }],
        "sent": { "assetType": "USD", "costBasis": "1", "quantity": "100000" },
        "sentAsset": [{ "assetType": "USD", "costBasis": "1", "quantity": "100000" }],
        "transactionTime": "2024-03-22T17:48:57.237Z",
        "type": "TRADE"
      }
    ]
  }
  ```
</CodeGroup>

### Step 2: Update missing cost basis

**`PATCH /v2/tax/transaction/{transactionId}`**

Only cost basis data can be updated. Transaction asset and quantity cannot be changed.

<CodeGroup>
  ```bash Request theme={null}
  curl --request PATCH \
       --url https://api.anchorage-staging.com/v2/tax/transaction/{transactionId} \
       --header 'accept: application/json' \
       --header 'content-type: application/json' \
       --data '{
    "type": "DEPOSIT",
    "assetType": "BTC",
    "lots": [
      {
        "acquisitionDatetime": "2025-03-03T14:48:06.111Z",
        "quantity": "1.0",
        "cost": "2500"
      }
    ],
    "acquisitionDatetime": "2025-03-03T14:48:06.111Z",
    "data": {
      "assetType": "BTC",
      "costBasis": "2500",
      "quantity": "1.0"
    }
  }'
  ```

  ```json Response theme={null}
  {
    "data": {
      "transactionId": "9cd9f4d4-078b-4e44-a308-7662fec0f546"
    }
  }
  ```
</CodeGroup>

### Step 3: View asset inventory

**`GET /v2/tax/inventory/{subaccountId}/{assetType}`**

Returns total quantity and all tax lots for a specific asset in a subaccount.

<CodeGroup>
  ```bash Request theme={null}
  curl --request GET \
       --url https://api.anchorage-staging.com/v2/tax/inventory/{subaccountId}/LDO \
       --header 'Api-Access-Key: {API Key}' \
       --header 'accept: application/json'
  ```

  ```json Response theme={null}
  {
    "data": {
      "summary": {
        "AverageUnitCost": "1.633895117039317318810783072486812",
        "assetType": "LDO",
        "costBasis": "46.8803541265509",
        "lots": [
          { "acquisitionDatetime": "2025-01-21T15:28:17.611Z", "cost": "5.0", "id": "164963b5-0bbd-505b-91c0-dbe8e309c900", "quantity": "2.646830567706262384", "unitCost": "1.889051781781781798" },
          { "acquisitionDatetime": "2025-01-21T15:20:31.747Z", "cost": "1.87858968297", "id": "ee406c6f-a955-50bc-92bb-aee73bcd7ae5", "quantity": "1", "unitCost": "1.87858968297" }
        ],
        "quantity": "28.692388904068676642",
        "totalQuantityMissingCostBasis": "0",
        "totalQuantityWithCostBasis": "28.692388904068676642"
      }
    }
  }
  ```
</CodeGroup>

**`GET /v2/tax/inventory/summary/{subaccountId}`**

Returns inventory summary across all assets.

<CodeGroup>
  ```bash Request theme={null}
  curl --request GET \
       --url https://api.anchorage-staging.com/v2/tax/inventory/summary/{subaccountId} \
       --header 'Api-Access-Key: {API Key}' \
       --header 'accept: application/json'
  ```

  ```json Response theme={null}
  {
    "data": [
      { "assetType": "SOL", "costBasis": "10.002517283800791293", "quantity": "0.048968461518597327", "quantityWithCostBasis": "0.048968461518597327", "quantityWithoutCostBasis": "0" },
      { "assetType": "ETH", "costBasis": "29.999999999999999002", "quantity": "0.012590000901477938", "quantityWithCostBasis": "0.010911660562946608", "quantityWithoutCostBasis": "0.00167834033853133" }
    ]
  }
  ```
</CodeGroup>

### Step 4: Review cost basis and gains

**`GET /v2/tax/gains/summary/{subaccountId}`**

Returns combined cost basis, proceeds, and gains/losses for a subaccount and time range.

<CodeGroup>
  ```bash Request theme={null}
  curl --request GET \
       --url 'https://api.anchorage.com/v2/tax/gains/summary/{subaccountId}?startDateTime=2023-01-01T00:00:00Z&endDateTime=2025-03-01T23:59:59Z' \
       --header 'Api-Access-Key: {API Key}' \
       --header 'accept: application/json'
  ```

  ```json Response theme={null}
  {
    "data": {
      "longTerm": { "assetType": "USD", "quantity": "0" },
      "shortTerm": { "assetType": "USD", "quantity": "-87.133251361246620162189357418267650072" },
      "total": { "assetType": "USD", "quantity": "-87.133251361246620162189357418267650072" }
    }
  }
  ```
</CodeGroup>

**`GET /v2/tax/gains/costbasis/{subaccountId}`**

Returns per-disposal gain/loss records broken down into short-term and long-term, with cost basis and proceeds.

<CodeGroup>
  ```bash Request theme={null}
  curl --request GET \
       --url 'https://api.anchorage.com/v2/tax/gains/costbasis/{subaccountId}?startDateTime=2023-01-01T00:00:00Z&endDateTime=2025-03-01T23:59:59Z' \
       --header 'Api-Access-Key: {API Key}' \
       --header 'accept: application/json'
  ```

  ```json Response theme={null}
  {
    "data": [
      {
        "acquisitionTxId": "995024a3-bcc1-5430-a2fd-7fc448cd2dd1",
        "cost": { "assetType": "USD", "quantity": "40.012" },
        "costBasisDate": "2024-12-04T20:25:59.509Z",
        "dispositionTxId": "61ab9b9f-f2e3-5342-aa8f-1d56386379d6",
        "gain": { "assetType": "USD", "quantity": "-0.0419952" },
        "gainType": "short-term",
        "proceeds": { "assetType": "USD", "quantity": "39.9700048" },
        "saleDate": "2024-12-04T20:38:37.544Z",
        "sold": { "assetType": "USDC", "quantity": "40" },
        "taxYear": "2024"
      }
    ]
  }
  ```
</CodeGroup>

### Step 5: Fetch tax forms

**`GET /v2/tax/subaccounts/{subaccountId}/forms`**

Returns pre-signed download links for a subaccount's tax forms. Links are time-limited.

<CodeGroup>
  ```bash Request theme={null}
  curl --request GET \
       --url https://api.anchorage-staging.com/v2/tax/subaccounts/{subaccountId}/forms \
       --header 'Api-Access-Key: {API Key}' \
       --header 'accept: application/json'
  ```

  ```json Response theme={null}
  {
    "data": [
      {
        "forms": [
          {
            "downloadLink": "<pre-signed S3 URL — use immediately, expires in 1 hour>",
            "formType": "1099_B"
          }
        ],
        "subaccountId": "32ee4b77-7f2a-4486-86f8-01c6bc8e4fda"
      }
    ]
  }
  ```
</CodeGroup>

**`GET /v2/tax/clients/{customerId}/forms`**

Returns forms for all subaccounts belonging to a `customerId`. Use `customerId` as `affiliateId`.

<CodeGroup>
  ```bash Request theme={null}
  curl --request GET \
       --url https://api.anchorage-staging.com/v2/tax/clients/{customerId}/forms \
       --header 'Api-Access-Key: {API Key}' \
       --header 'accept: application/json'
  ```

  ```json Response theme={null}
  {
    "data": [
      {
        "forms": [],
        "subaccountId": "bb41b0c4-b3d7-4132-94d0-9ae2293bca5e"
      },
      {
        "forms": [
          {
            "downloadLink": "<pre-signed S3 URL — use immediately, expires in 1 hour>",
            "formType": "1099_B"
          }
        ],
        "subaccountId": "32ee4b77-7f2a-4486-86f8-01c6bc8e4fda"
      }
    ]
  }
  ```
</CodeGroup>

### Step 6: Tag or untag a transaction

IRA transactions need a tag identifying the retirement-specific event type before they can be reflected correctly on 1099-R and Form 5498 reporting.

**`POST /v2/tax/transaction/{transactionId}/tag`**

`tag` values:

| Value                | Description                                                 |
| :------------------- | :---------------------------------------------------------- |
| `contribution`       | Contribution to a retirement account.                       |
| `transfer-in`        | Assets transferred into the account.                        |
| `conversion`         | Conversion (e.g., Traditional IRA to Roth IRA).             |
| `distribution`       | Distribution from the account. Requires `distributionCode`. |
| `transfer-out`       | Assets transferred out of the account.                      |
| `recharacterization` | Recharacterized contribution.                               |
| `late-rollover`      | Late rollover. Requires `postponedLateReason`.              |
| `postponed`          | Postponed contribution. Requires `postponedLateReason`.     |
| `rollover`           | Rollover contribution.                                      |

<Note>
  `distributionCode` is required when `tag` is `distribution`, and must be a valid IRS Form 1099-R distribution code (for example, `7` for a normal distribution or `4` for death). `postponedLateReason` is required when `tag` is `postponed` or `late-rollover`.
</Note>

<CodeGroup>
  ```bash Request theme={null}
  curl --request POST \
       --url https://api.anchorage-staging.com/v2/tax/transaction/{transactionId}/tag \
       --header 'Api-Access-Key: {API Key}' \
       --header 'accept: application/json' \
       --header 'content-type: application/json' \
       --data '{
    "accountId": "cb80459c-a930-444e-8f17-69ba9d0e122f",
    "tag": "distribution",
    "distributionCode": "7",
    "taxYear": "2025"
  }'
  ```

  ```json Response theme={null}
  {
    "data": {
      "status": "accepted"
    }
  }
  ```
</CodeGroup>

To remove a tag, use **`DELETE /v2/tax/transaction/{transactionId}/tag`**:

<CodeGroup>
  ```bash Request theme={null}
  curl --request DELETE \
       --url https://api.anchorage-staging.com/v2/tax/transaction/{transactionId}/tag \
       --header 'Api-Access-Key: {API Key}' \
       --header 'accept: application/json'
  ```

  ```json Response theme={null}
  {
    "data": {
      "status": "accepted"
    }
  }
  ```
</CodeGroup>
