Skip to content

a processing tool for gain/loss details given a Coinbase transaction report

License

Notifications You must be signed in to change notification settings

mattthat/coinbase-transaction-gainloss-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coinbase-transaction-gainloss-report

a processing tool for gain/loss details given a Coinbase transaction report

usage

  • Export some transaction report from Coinbase in CSV, let's call it original-data.csv
  • Remove superfluous lines with sed
  • Produce analysis for report
$ sed 1,7d original-data.csv > report.csv
$ src/index.js report.csv
  • Example output...
$ src/index.js example-report.csv | jq
{
  "reference": {
    "assets": [
      "BTC",
      "ETH"
    ],
    "positions": {
      "BTC": 123,
      "ETH": 123
    },
    "costs": {
      "BTC": 123,
      "ETH": 123
    }
  },
  "assets": {
    "BTC": {
      "asset": "BTC",
      "position": 123,
      "average": 1,
      "price": 49025.45135929,
      "cost": 123,
      "mark": 6030130.517192669,
      "net": 6030007.517192669
    },
    "ETH": {
      "asset": "ETH",
      "position": 123,
      "average": 1,
      "price": 3234.50463372,
      "cost": 123,
      "mark": 397844.06994756,
      "net": 397721.06994756
    }
  },
  "totals": {
    "totalCost": 246,
    "totalMark": 6427974.5871402295,
    "totalNet": 6427728.5871402295
  }
}

About

a processing tool for gain/loss details given a Coinbase transaction report

Topics

Resources

License

Stars

Watchers

Forks