Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitcoincharts-beancount

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitcoincharts-beancount

bitcoincharts historic price conversion

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source
  • Bitcoincharts Beancount converter

This is a quick tool I hacked together to convert historic bitcoin prices from [[http://api.bitcoincharts.com/v1/csv/][bitcoincharts CSVs]] into beancount price directives.

The files are gzipped CSVs of (unixtime, price, tradeamount)

For each month with trades on the 1st, the tool calculates a weighted average of trades on that day and outputs a beancount price directive.

** Running

The tool does not download files on its own. Download the files before running.

#+BEGIN_SRC shell $ node index.js some.csv.gz

or

$ node index.js some.csv.gz EUR

or

$ node index.js some.csv.gz EUR BTC #+END_SRC

*** Parameters

  • filename (gzipped CSV)
  • currency [optional] (currency code used in beancount {USD,EUR, etc})
  • commodity [optional] (currency code of commodity) {BTC,BCH,LTC, etc}

*** Status

It works. I don't plan on working on it much further.

It's not very efficent. I suspect the main problem is the group function probably doesn't assume that the input is sorted and therefore buffers its entire input. Patches welcome.

** License

MIT

Keywords

FAQs

Package last updated on 16 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc