Get all lots for an address
const url = 'https://api.qeychain.xyz/api/calculate/lots/example?persist_lineage=false';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.qeychain.xyz/api/calculate/lots/example?persist_lineage=false'Returns all tax lots for a wallet address with their current status.
Lot statuses:
- OPEN: Not consumed at all
- PARTIAL: Partially consumed
- CLOSED: Fully consumed
When `persist_lineage=true`, lineage links are persisted to the database.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”All wallet addresses owned by the user (for internal transfer detection). Comma-separated or repeated.
Persist lineage links to database for audit trail
Persist lineage links to database for audit trail
Responses
Section titled “Responses”Successful Response
Tax lot with cost basis information.
Enhanced with detailed origin tracking for full money trail:
- WHERE it came from (origin_address, origin_chain)
- HOW it was acquired (origin_type, origin_symbol)
object
Unique lot identifier (e.g., ‘ETH-ARB-001’)
Token symbol
Blockchain network
Original quantity acquired
Remaining quantity after disposals
Cost per unit in USD
Total cost basis in USD
Remaining cost basis
Acquisition type (purchase, swap_in, etc.)
Source of price data
Lot status: OPEN, PARTIAL, or CLOSED
Whether this lot has unknown cost basis
Whether user should provide cost basis manually
Whether user has provided manual cost basis
List of consumption events
Individual lot consumption event.
Enhanced with destination tracking for full money trail:
- WHERE the lot went (destination_type, destination_address)
- WHAT it became (destination_symbol, destination_lot_id)
object
Lots this lot came from (e.g., SCR lots that became this ETH lot)
Reference to a lot in the lineage chain (money trail).
object
Unique lineage key (chain:symbol:lot_id)
Lot identifier
Token symbol
Blockchain network
Quantity from/to this lot
Cost basis contribution
Lots this lot became (e.g., ETH lot that this SCR lot was swapped for)
Reference to a lot in the lineage chain (money trail).
object
Unique lineage key (chain:symbol:lot_id)
Lot identifier
Token symbol
Blockchain network
Quantity from/to this lot
Cost basis contribution
Gas fee (USD) included in cost basis (IRS allows adding gas to acquisition cost)
Example
[ { "is_untracked": false, "needs_manual_cost_basis": false, "manual_cost_basis_set": false, "consumptions": [ { "is_wash_sale": false } ], "gas_fee_included": "0" }]Bad Request
Not Found
Validation Error
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}Internal Server Error
