Retrieve inventory
Read an account's open lots for one asset, or a summary of every asset it holds.
Part of Set up inventory and 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 reads it back for one asset or for all of them.
By the end of this page you can list an account's open lots for an asset, show their unrealized gains at a current price, and summarize every asset the account holds.
Before you begin
- A bearer token. See Authenticate your tenant.
- Transactions sent for the account, as in Set up inventory and gains. The examples continue that walkthrough: 2.5 ETH bought in February, 1 ETH sold in July.
Get one asset's lots
GET /v1/inventory returns one asset per call. Pass 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 come back in the order the account's disposition method would sell them, named in lots_ordered_by. 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, and needs no asset.
curl -G $BASE_URL/v1/inventory/summaries \
-H "Authorization: Bearer $TOKEN" \
--data-urlencode "account_id=acct_5f2e7d10"Each entry in data carries 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. Mint a new one and retry.
- 429. Too many requests. Slow down and retry.
Parameters
Only the parameters used above. The full lists are in the Get inventory and Get inventory summaries references.
| Parameter | Type | Required | Description |
|---|---|---|---|
account_id | string | Optional | Your system's identifier for the account. |
asset_code | string | Conditional | The asset's code, such as ETH. GET /v1/inventory needs this or asset_id. |
asset_id | string | Conditional | The asset's Taxbit UUID, instead of asset_code. |
price | number | Optional | The asset's current price. Adds unrealized gain and loss to the response. |
lots_ordered_by | string | Optional | Order lots by HIFO, FIFO, LIFO, or LOFO instead of the account's method. |
limit, offset | integer | Optional | Paging. Default limit is 25. |
Where to go next
Retrieve gains, the last step of Set up inventory and gains, reads back what the sales realized.
Updated 3 days ago

