Skip to content

Export realized gains as IRS Form 8949 CSV

GET
/api/calculate/tax-summary/{address}/export/8949
curl --request GET \
--url 'https://api.qeychain.xyz/api/calculate/tax-summary/example/export/8949?tax_year=1&format=csv&include_metadata=false&taxpayer_timezone=America%2FNew_York'

Export all taxable disposals for a tax year as IRS Form 8949 compatible CSV.

The CSV includes:
- Part I: Short-term capital gains/losses (held ≤1 year)
- Part II: Long-term capital gains/losses (held >1 year)
- Wash sale adjustments (if applicable)

Columns match IRS Form 8949:
- (a) Description of property
- (b) Date acquired
- (c) Date sold
- (d) Proceeds
- (e) Cost basis
- (f) Adjustment code
- (g) Adjustment amount
- (h) Gain or loss

Note: Dates are formatted as MM/DD/YYYY per IRS requirements.
address
required
Address
string
tax_year
required
Tax Year

Tax year (e.g., 2024)

integer

Tax year (e.g., 2024)

format
Format

Export format: ‘csv’ (IRS format) or ‘generic’ (accountant format)

string
default: csv

Export format: ‘csv’ (IRS format) or ‘generic’ (accountant format)

include_metadata
Include Metadata

Include extra columns (lot_id, tx_hash, etc.)

boolean

Include extra columns (lot_id, tx_hash, etc.)

taxpayer_timezone
Taxpayer Timezone

Taxpayer’s timezone for tax year boundaries. Use IANA names (e.g., ‘America/New_York’, ‘America/Los_Angeles’) or shortcuts: ‘ET’, ‘CT’, ‘MT’, ‘PT’, ‘AK’, ‘HI’. IRS uses local time, not UTC.

string
default: America/New_York

Taxpayer’s timezone for tax year boundaries. Use IANA names (e.g., ‘America/New_York’, ‘America/Los_Angeles’) or shortcuts: ‘ET’, ‘CT’, ‘MT’, ‘PT’, ‘AK’, ‘HI’. IRS uses local time, not UTC.

owned_wallets
Any of:
Array<string>

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

CSV file download

Examplegenerated
example

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