Skip to content

Get tax summary for an address

GET
/api/calculate/tax-summary/{address}
curl --request GET \
--url 'https://api.qeychain.xyz/api/calculate/tax-summary/example?persist_lineage=false'

Returns comprehensive tax summary for a wallet address including: - Total realized gains/losses - Short-term vs long-term capital gains breakdown - Wash sale disallowed amounts - Disposal counts and totals

When `persist_lineage=true`, lineage links are persisted to the database
for audit trail and money trail tracking.
address
required
Address
string
owned_wallets
Any of:
Array<string>

All wallet addresses owned by the user (for internal transfer detection). Comma-separated or repeated.

persist_lineage
Persist Lineage

Persist lineage links to database for audit trail

boolean

Persist lineage links to database for audit trail

Successful Response

Media typeapplication/json
TaxSummaryResponse

Tax summary for an address.

object
address
required
Address

Wallet address

string
total_realized_gl
required
Total Realized Gl

Total realized gain/loss

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
short_term_gains
required
Short Term Gains

Total short-term capital gains

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
short_term_losses
required
Short Term Losses

Total short-term capital losses

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
net_short_term
required
Net Short Term

Net short-term gain/loss

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
long_term_gains
required
Long Term Gains

Total long-term capital gains

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
long_term_losses
required
Long Term Losses

Total long-term capital losses

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
net_long_term
required
Net Long Term

Net long-term gain/loss

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
wash_sale_disallowed
Wash Sale Disallowed

Total losses disallowed due to wash sales

string
default: 0 /^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
wash_sale_count
Wash Sale Count

Number of wash sale events

integer
0
disposal_count
required
Disposal Count

Total number of taxable disposals

integer
total_proceeds
required
Total Proceeds

Total proceeds from disposals

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

Total cost basis used in disposals

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*$/
Example
{
"wash_sale_disallowed": "0",
"wash_sale_count": 0,
"income": {
"airdrop": "0",
"staking_reward": "0",
"mining_reward": "0",
"interest": "0",
"other": "0",
"total": "0"
}
}

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