txf-generator

1.0.0 • Public • Published

TXF File Generator

Introduction

This utility takes a csv file and converts it to a file that follows the Tax Exchange Format such that it can be uploaded as a supporting tax document to TurboTax. This process occurs entirely offline meaning you don't have to send your trade history to a server over which you have no control.

This current iteration will only generate a TXF formatted Form 8949 Copy C so it's most applicable use case is for documenting and submitting Digital Asset/CryptoCurreny trades to the IRS.

NOTE: Currently this utility does not properly account for wash sales. If you have any wash sales then it is likely they will not be properly recorded in the txf file. This feature is a work in progress.

The specification for TXF files can be found here: TurboTax TXF 042.

Contributing

If you'd like to add a feature, feel free to fork this repo and following the workflow listed in CONTRIBUTING.md. When your feature is ready, you can submit a PR for review.

Installation

In its current form, this utility is a CLI, so all commands are run in the terminal.

To install run: npm install -g txf-file-generator or yarn global add txf-file-generator

Usage

CSV File Format

The csv file must have the following headers:

  • ticker
  • acquisitionDate
  • saleDate
  • quantity
  • acquisitionPrice
  • salePrice

The headers don't have to be in this order, but all must exist and must be written in camelCase. Any additional headers will be ignored.

Additional header documentation:

  • Date Format: mm/dd/yyyy
  • Price Format: $xxx.xx
  • acquisitionPrice is your cost basis (in $) for the quantity purchased on acquisitionDate.
  • salePrice is the amount realized (in $) for the quantity purchased on acquisitionDate and sold on saleDate.

Example CSV File

ticker,acquisitionDate,saleDate,quantity,acquisitionPrice,salePrice
ETH,10/01/2017,10/02/2017,1.1565795,$500.00,$517.63

Generating a TXF File

txf <path/to/file.csv> [filename]

Running the above command will output a TXF file in the same directory where your global node_modules are installed. For most users this will be the home directory.

Example Usage:

txf trade-data.csv trade-conversion txf somePath/to/file/trade-data.csv trade-conversion txf trade-data.csv

The first argument is the path to a csv file. You can navigate to the directory where the csv file exists and simply pass the filename, including the .csv extension. You may also specify the path to the file from outside of the directory where the file exists.

Note that this utility does nothing to check the accuracy of the data within the csv file. You must ensure the accuracy of this yourself. Further note that the headers of the csv file must conform to those outlined above.

The second argument is an optional name to give to the file generated by the utility. If no name is provided, the generated file will be named csvToTxf-mm-dd-yyyy.txf where mm-dd-yyyy is the current date.

Observing Sample Input/Output

txf sample

Running the above command will print to the terminal both a sample csv file input and the resulting txf file output.

The only argument to be provided to txf is the string sample.

Disclaimer

This is a work in progress and MIT licensed so the software is provided "AS IS". I am not responsible if there is some anomaly in your .txf report. This tool is solely meant to convert files from csv to txf. The acquisitionPrice and salePrice must be accurately recorded.

The software is entirely free to use. My hope is it helps someone avoid having to pay a fee and send their trade history to a privately owned server where they can't control their own data. If it works for you and you have no problem submitting the TXF supporting document generated by this utility as part of your TurboTax filing, feel free to leave a donation at an address listed below.

ERC-20: 0x0d5214F750c5a40c45d38bd01053CED0D1219748

NANO: xrb_1drfiki9rdfwzpapkxdhc8yzjyjbfmpcqwyefswr8m3i5uxnj6uqsg4g6qde

Readme

Keywords

none

Package Sidebar

Install

npm i txf-generator

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

10.9 kB

Total Files

8

Last publish

Collaborators

  • kamirdjanian