Skip to content

Get Cost Basis Report

GET
/api/v1/wallets/{address}/cost-basis
curl --request GET \
--url 'https://api.qeychain.xyz/api/v1/wallets/example/cost-basis?method=fifo&page=1&per_page=50'

Get full lot-level cost basis report.

Returns detailed lot information with cost basis breakdown. Supports different cost basis methods (FIFO is default).

Note: The method parameter changes the ordering of lots for consumption purposes. FIFO orders oldest first, LIFO newest first, HIFO highest cost first. The actual lot data remains the same; only the suggested consumption order differs.

Response Format:

{
  "success": true,
  "data": {
    "method": "fifo",
    "total_cost_basis": "35000.00",
    "lots": [
      {
        "lot_id": "ETH-001",
        "symbol": "ETH",
        "quantity": "1.0",
        "cost_per_unit": "3000.00",
        "acquisition_date": "2024-01-15T...",
        "is_long_term": true,
        "fifo_order": 1
      }
    ]
  },
  "meta": {...},
  "pagination": {...}
}
address
required
Address
string
method
Method

Cost basis method: fifo (default), lifo, hifo, specific_id

string
default: fifo
Allowed values: fifo lifo hifo specific_id

Cost basis method: fifo (default), lifo, hifo, specific_id

symbol
Any of:
string

Filter by token symbol

status
Any of:
string

Filter by lot status: OPEN, PARTIAL, CLOSED, or ALL

page
Page

Page number

integer
default: 1 >= 1

Page number

per_page
Per Page

Items per page

integer
default: 50 >= 1 <= 100

Items per page

owned_wallets
Any of:
Array<string>

Successful Response

Media typeapplication/json
Response Get Cost Basis Report Api V1 Wallets Address Cost Basis Get
object
key
additional properties
any
Examplegenerated
{}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}