Skip to content

Get wash sale events for an address

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

Returns all wash sale events for a wallet address.

A wash sale occurs when you sell a security at a loss and purchase
a substantially identical security within 30 days before or after.
The loss is disallowed and added to the cost basis of the new shares.
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.

Successful Response

Media typeapplication/json
Response Get Wash Sales Api Calculate Wash Sales Address Get
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
Examplegenerated
[
{
"id": "example",
"symbol": "example",
"sale_lot_id": "example",
"sale_date": "2026-04-15T12:00:00Z",
"sale_transaction_hash": "example",
"acquisition_lot_id": "example",
"acquisition_date": "2026-04-15T12:00:00Z",
"acquisition_transaction_hash": "example",
"disallowed_loss": "example",
"quantity_matched": "example",
"days_apart": 1
}
]

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