Export realized gains as IRS Form 8949 CSV
const 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';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/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.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Tax year (e.g., 2024)
Tax year (e.g., 2024)
Export format: ‘csv’ (IRS format) or ‘generic’ (accountant format)
Export format: ‘csv’ (IRS format) or ‘generic’ (accountant format)
Include extra columns (lot_id, tx_hash, etc.)
Include extra columns (lot_id, tx_hash, etc.)
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.
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.
All wallet addresses owned by the user (for internal transfer detection)
Responses
Section titled “Responses”CSV file download
Examplegenerated
exampleBad Request
Not Found
Validation Error
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}Internal Server Error
