summary refs log tree commit diff stats
path: root/README.org
diff options
context:
space:
mode:
authorAlan Pearce2017-09-16 17:11:01 +0200
committerAlan Pearce2017-09-16 17:31:00 +0200
commit269e7b208e5d20bdc3f9cb2bdd178fbbecb046a6 (patch)
treef10e4670eb5335e35cbe99bc0b57ab821b59eb72 /README.org
downloadbitcoincharts-beancount-1.0.0.tar.lz
bitcoincharts-beancount-1.0.0.tar.zst
bitcoincharts-beancount-1.0.0.zip
Initial commit HEAD v1.0.0 master main
Diffstat (limited to 'README.org')
-rw-r--r--README.org40
1 files changed, 40 insertions, 0 deletions
diff --git a/README.org b/README.org
new file mode 100644
index 0000000..f0ff157
--- /dev/null
+++ b/README.org
@@ -0,0 +1,40 @@
+* 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