Get complete dashboard data (single API call)
const url = 'https://api.qeychain.xyz/api/wallets/example/dashboard?include_transactions=false&force_refresh=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/wallets/example/dashboard?include_transactions=false&force_refresh=false'Returns ALL data needed for the frontend dashboard in ONE call: - Portfolio positions with current values - Tax summary (realized gains/losses, short/long term) - All lots with consumptions and lineage - Wash sales - Transaction history - Fee summary
Frontend should make this ONE call and only display the data.
No additional API calls or calculations needed on frontend.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Include raw transactions in response (adds ~14MB). Default false — use /transactions endpoint instead.
Include raw transactions in response (adds ~14MB). Default false — use /transactions endpoint instead.
Force recompute from scratch, bypassing DB cache.
Force recompute from scratch, bypassing DB cache.
Responses
Section titled “Responses”Successful Response
Complete dashboard data in a single response.
Frontend makes ONE call, backend does ALL fetching and processing. Frontend only displays - no logic, no additional API calls.
object
Current position with cost basis data.
object
Token symbol
Blockchain network
Current quantity held
Total cost basis
Average cost per unit
Number of open lots
Number of partially consumed lots
True if this position was detected on-chain (Zerion) but has no matching FIFO engine entry. Cost basis is unknown.
Breakdown of income by type (airdrops, staking rewards, etc.).
object
Total airdrop income at FMV
Total staking reward income at FMV
Total mining reward income at FMV
Total interest income at FMV
Other income at FMV
Total income received (sum of all types)
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)
Wash sale event details.
object
Wash sale event ID
Token symbol
Lot ID that was sold at a loss
Date of the loss sale
Transaction hash of sale
Lot ID acquired within wash sale window
Date of the replacement acquisition
Transaction hash of acquisition
Amount of loss disallowed
Quantity matched for wash sale
Days between sale and acquisition
object
object
object
object
object
Example
{ "positions": [ { "open_lots_count": 0, "partial_lots_count": 0, "is_zerion_only": false } ], "portfolio_total_value": "0", "portfolio_total_cost_basis": "0", "portfolio_unrealized_gl": "0", "realized_including_pending": "0", "st_gains_including_pending": "0", "st_losses_including_pending": "0", "net_st_including_pending": "0", "lt_gains_including_pending": "0", "lt_losses_including_pending": "0", "net_lt_including_pending": "0", "wash_sale_disallowed": "0", "wash_sale_count": 0, "disposal_count": 0, "proceeds_including_pending": "0", "cost_basis_sold_including_pending": "0", "income": { "airdrop": "0", "staking_reward": "0", "mining_reward": "0", "interest": "0", "other": "0", "total": "0" }, "lots": [ { "is_untracked": false, "needs_manual_cost_basis": false, "manual_cost_basis_set": false, "consumptions": [ { "is_wash_sale": false } ], "gas_fee_included": "0" } ], "total_lots": 0, "open_lots": 0, "closed_lots": 0, "transaction_count": 0, "total_fees_usd": "0", "fee_transaction_count": 0, "unpriced_positions_count": 0, "unpriced_cost_basis": "0", "ytd_realized_gl": "0", "ytd_short_term_gains": "0", "ytd_short_term_losses": "0", "ytd_net_short_term": "0", "ytd_long_term_gains": "0", "ytd_long_term_losses": "0", "ytd_net_long_term": "0", "confirmed_realized_gl": "0", "confirmed_st_gl": "0", "confirmed_lt_gl": "0", "confirmed_proceeds": "0", "confirmed_cost_basis_sold": "0", "pending_disposals_count": 0, "pending_proceeds_total": "0", "pending_realized_gl": "0", "is_limited": false}Bad Request
Not Found
Validation Error
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}Internal Server Error
