Skip to content

Get full tax report in single request (optimized)

GET
/api/calculate/full-report/{address}
curl --request GET \
--url https://api.qeychain.xyz/api/calculate/full-report/example

Returns tax summary, all lots, and wash sales in a SINGLE API call.

This is significantly faster than calling /tax-summary, /lots, and /wash-sales
separately because:
1. Transactions are fetched once (not 3x)
2. Cost basis engine runs once (not 3x)
3. Price enrichment happens once (not 3x)

Use this endpoint for the frontend dashboard for best performance.
address
required
Address
string
owned_wallets
Any of:
Array<string>

All wallet addresses owned by the user (for internal transfer detection)

Successful Response

Media typeapplication/json
FullReportResponse

Unified response containing tax summary, lots, and wash sales.

This endpoint processes the cost basis engine ONCE and returns all data, avoiding redundant processing when fetching multiple endpoints.

object
address
required
Address
string
total_realized_gl
required
Total Realized Gl
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
short_term_gains
required
Short Term Gains
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
short_term_losses
required
Short Term Losses
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
net_short_term
required
Net Short Term
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
long_term_gains
required
Long Term Gains
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
long_term_losses
required
Long Term Losses
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
net_long_term
required
Net Long Term
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
wash_sale_disallowed
required
Wash Sale Disallowed
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
wash_sale_count
required
Wash Sale Count
integer
disposal_count
required
Disposal Count
integer
total_proceeds
required
Total Proceeds
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
total_cost_basis
required
Total Cost Basis
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
income
Any of:
IncomeBreakdownResponse

Breakdown of income by type (airdrops, staking rewards, etc.).

object
airdrop
Airdrop

Total airdrop income at FMV

string
default: 0 /^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
staking_reward
Staking Reward

Total staking reward income at FMV

string
default: 0 /^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
mining_reward
Mining Reward

Total mining reward income at FMV

string
default: 0 /^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
interest
Interest

Total interest income at FMV

string
default: 0 /^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
other
Other

Other income at FMV

string
default: 0 /^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
total
Total

Total income received (sum of all types)

string
default: 0 /^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
lots
Lots
Array<object>
LotResponse

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
lot_id
required
Lot Id

Unique lot identifier (e.g., ‘ETH-ARB-001’)

string
symbol
required
Symbol

Token symbol

string
chain
required
Chain

Blockchain network

string
original_quantity
required
Original Quantity

Original quantity acquired

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
remaining_quantity
required
Remaining Quantity

Remaining quantity after disposals

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
cost_per_unit
required
Cost Per Unit

Cost per unit in USD

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
total_cost
required
Total Cost

Total cost basis in USD

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
remaining_cost
required
Remaining Cost

Remaining cost basis

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
acquisition_date
Any of:
string format: date-time
type
required
Type

Acquisition type (purchase, swap_in, etc.)

string
price_source
required
Price Source

Source of price data

string
decision_state
Any of:
string
status
required
Status

Lot status: OPEN, PARTIAL, or CLOSED

string
is_untracked
Is Untracked

Whether this lot has unknown cost basis

boolean
needs_manual_cost_basis
Needs Manual Cost Basis

Whether user should provide cost basis manually

boolean
manual_cost_basis_set
Manual Cost Basis Set

Whether user has provided manual cost basis

boolean
manual_cost_basis_note
Any of:
string
consumptions
Consumptions

List of consumption events

Array<object>
LotConsumptionResponse

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
lot_id
required
Lot Id
string
quantity_consumed
required
Quantity Consumed
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
cost_basis_used
required
Cost Basis Used
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
proceeds
Any of:
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
realized_gain_loss
Any of:
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
holding_period_days
Any of:
integer
is_long_term
Any of:
boolean
is_wash_sale
Is Wash Sale
boolean
wash_sale_disallowed_loss
Any of:
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
event_type
required
Event Type
string
decision_state
Any of:
string
consumed_at
required
Consumed At
string format: date-time
destination_type
Any of:
string
destination_symbol
Any of:
string
destination_address
Any of:
string
destination_chain
Any of:
string
destination_protocol
Any of:
string
destination_lot_id
Any of:
string
source_lots
Source Lots

Lots this lot came from (e.g., SCR lots that became this ETH lot)

Array<object>
LineageRefResponse

Reference to a lot in the lineage chain (money trail).

object
lineage_key
required
Lineage Key

Unique lineage key (chain:symbol:lot_id)

string
lot_id
required
Lot Id

Lot identifier

string
symbol
required
Symbol

Token symbol

string
chain
required
Chain

Blockchain network

string
quantity
required
Quantity

Quantity from/to this lot

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
cost_basis
required
Cost Basis

Cost basis contribution

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
destination_lots
Destination Lots

Lots this lot became (e.g., ETH lot that this SCR lot was swapped for)

Array<object>
LineageRefResponse

Reference to a lot in the lineage chain (money trail).

object
lineage_key
required
Lineage Key

Unique lineage key (chain:symbol:lot_id)

string
lot_id
required
Lot Id

Lot identifier

string
symbol
required
Symbol

Token symbol

string
chain
required
Chain

Blockchain network

string
quantity
required
Quantity

Quantity from/to this lot

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
cost_basis
required
Cost Basis

Cost basis contribution

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
origin_type
Any of:
string
origin_address
Any of:
string
origin_entity
Any of:
object
key
additional properties
any
origin_chain
Any of:
string
origin_protocol
Any of:
string
origin_symbol
Any of:
string
origin_tx_hash
Any of:
string
gas_fee_included
Gas Fee Included

Gas fee (USD) included in cost basis (IRS allows adding gas to acquisition cost)

string
default: 0 /^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
total_lots
Total Lots
integer
0
open_lots
Open Lots
integer
0
closed_lots
Closed Lots
integer
0
wash_sales
Wash Sales
Array<object>
WashSaleResponse

Wash sale event details.

object
id
required
Id

Wash sale event ID

string
symbol
required
Symbol

Token symbol

string
sale_lot_id
required
Sale Lot Id

Lot ID that was sold at a loss

string
sale_date
required
Sale Date

Date of the loss sale

string format: date-time
sale_transaction_hash
required
Sale Transaction Hash

Transaction hash of sale

string
acquisition_lot_id
required
Acquisition Lot Id

Lot ID acquired within wash sale window

string
acquisition_date
required
Acquisition Date

Date of the replacement acquisition

string format: date-time
acquisition_transaction_hash
required
Acquisition Transaction Hash

Transaction hash of acquisition

string
disallowed_loss
required
Disallowed Loss

Amount of loss disallowed

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
quantity_matched
required
Quantity Matched

Quantity matched for wash sale

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
days_apart
required
Days Apart

Days between sale and acquisition

integer
processing_time_ms
Any of:
integer
Example
{
"address": "0xce8d2983e85a0b0435bf3d157f7d3a3888ca7eeb",
"long_term_gains": "0.00",
"long_term_losses": "0.00",
"lots": [],
"net_long_term": "0.00",
"net_short_term": "1500.00",
"processing_time_ms": 1234,
"short_term_gains": "2000.00",
"short_term_losses": "500.00",
"total_realized_gl": "1500.00",
"wash_sales": []
}

Bad Request

Media typeapplication/json
ErrorResponse

Standard error response.

object
detail
required
Detail

Error message

string
error_code
Any of:
string
Examplegenerated
{
"detail": "example",
"error_code": "example"
}

Not Found

Media typeapplication/json
ErrorResponse

Standard error response.

object
detail
required
Detail

Error message

string
error_code
Any of:
string
Examplegenerated
{
"detail": "example",
"error_code": "example"
}

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"
}
]
}

Internal Server Error

Media typeapplication/json
ErrorResponse

Standard error response.

object
detail
required
Detail

Error message

string
error_code
Any of:
string
Examplegenerated
{
"detail": "example",
"error_code": "example"
}