Retrieve inventory

Read an account's open lots for one asset, or a summary of every asset it holds.

Part of Send transactions and read gains. Inventory is the set of lots an account still holds. Each lot records when it was acquired, how much is left, and what it cost. This page shows how to retrieve it for one asset or for all of them.

Before you begin

Get one asset's lots

GET /v1/inventory returns one asset per call. To get one account's inventory, pass its account_id and either asset_code or asset_id. Without an asset, the request returns 400.

curl -G $BASE_URL/v1/inventory \
  -H "Authorization: Bearer $TOKEN" \
  --data-urlencode "account_id=acct_5f2e7d10" \
  --data-urlencode "asset_code=ETH"
{
  "data": {
    "asset": { "code": "ETH", "name": "Ethereum", "type": "Crypto", "uuid": "b7a005b5-f4d5-44ea-ae80-d4f9e8313558" },
    "summary": {
      "total_quantity": "1.5",
      "total_quantity_with_cost_basis": "1.5",
      "total_cost": "4875.00",
      "average_unit_cost": "3250.00"
    },
    "lots": [
      {
        "id": "b72696f9-0f10-5827-94c3-289b6366a599",
        "acquisition_datetime": "2026-02-14T16:20:11Z",
        "term": "short-term",
        "quantity": "1.5",
        "fiat_asset_code": "USD",
        "cost": "4875.00",
        "unit_cost": "3250.00",
        "client_acquisition_transaction_id": "trade_88213",
        "client_modified_by_transaction_id": "trade_88214"
      }
    ],
    "lots_ordered_by": "HIFO"
  }
}

Lots are returned in the order the account's cost-basis method (disposition_method) would sell them. lots_ordered_by shows that method. Pass lots_ordered_by to see them in another method's order. client_acquisition_transaction_id is the transaction that created the lot, and client_modified_by_transaction_id is the last one that sold part of it. The response pages at 25 lots by default. Use limit and offset for more.

Show unrealized gains

Pass the asset's current price to see what the account would gain or lose by selling at that price.

curl -G $BASE_URL/v1/inventory \
  -H "Authorization: Bearer $TOKEN" \
  --data-urlencode "account_id=acct_5f2e7d10" \
  --data-urlencode "asset_code=ETH" \
  --data-urlencode "price=3400"

The summary then adds total_current_value, total_unrealized_gain_loss, and percent_unrealized_gain_loss, and each lot adds current_value, unrealized_gain_loss, and percent_unrealized_gain_loss.

Get every asset at once

GET /v1/inventory/summaries returns one summary per asset the account holds. You don't need to pass an asset.

curl -G $BASE_URL/v1/inventory/summaries \
  -H "Authorization: Bearer $TOKEN" \
  --data-urlencode "account_id=acct_5f2e7d10"

Each entry in data has the asset and a summary with the same totals as above. It pages at 25 assets by default, with limit and offset.

If the request fails

  • 400. A parameter is missing or invalid. On GET /v1/inventory, the most common cause is a missing asset: Either 'asset_id' or 'asset_code' need to be provided.
  • 401. The bearer token is missing, invalid, or expired. Request a new one and retry.
  • 429. Too many requests. Slow down and retry.

See Errors and rate limits for error formats, rate limits, and which requests are safe to retry.

Parameters

Only the parameters used above. The full lists are in the Get inventory and Get inventory summaries references.

ParameterTypeRequiredDescription
account_idstringOptionalYour system's identifier for the account.
asset_codestringConditionalThe asset's code, such as ETH. GET /v1/inventory needs this or asset_id.
asset_idstringConditionalThe asset's Taxbit UUID, instead of asset_code.
pricenumberOptionalThe asset's current price. Adds unrealized gain and loss to the response.
lots_ordered_bystringOptionalOrder lots by HIFO, FIFO, LIFO, or LOFO instead of the account's method.
limit, offsetintegerOptionalPaging. Default limit is 25.

Where to go next

Retrieve gains is the last step of Send transactions and read gains. It shows how to retrieve the gains and losses the sales realized.