SuperAPI AI Directory

crypto-gains

Coding & development

View repository

Updated 10-16 08:05

About this skill

/crypto-gains

Calculate capital gains with IRS-compliant rules.

Steps

  1. Load lots from normalized/cost-basis.json and transactions from normalized/transactions.json.
  2. Build sell list and allocate FIFO lots per asset.
  3. Classify each gain as short-term or long-term by holding period.
  4. Detect wash sales within 30 days for securities. Mark crypto as not applicable per current policy.
  5. Write gains to normalized/capital-gains.json and updated lots to normalized/cost-basis-updated.json.
  6. Generate Form 8949 outputs and summaries.

Examples

# Build FIFO gains and updated lots
pnpm gains
# Generate Form 8949 and tax summaries
pnpm report

References

  • normalized/transactions.json
  • normalized/cost-basis.json
  • normalized/capital-gains.json
  • normalized/cost-basis-updated.json
  • reports/tax-ready/form-8949-c.csv
  • reports/tax-ready/turbotax-import.csv
  • reports/tax-ready/schedule-d-summary.md
  • scripts/calculate-gains.ts
  • scripts/generate-report.ts