summary refs log tree commit diff stats
path: root/README.org
diff options
context:
space:
mode:
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 @@
1* Bitcoincharts Beancount converter
2
3This is a quick tool I hacked together to convert historic bitcoin
4prices from [[http://api.bitcoincharts.com/v1/csv/][bitcoincharts CSVs]] into beancount price directives.
5
6The files are gzipped CSVs of (unixtime, price, tradeamount)
7
8For each month with trades on the 1st, the tool calculates a weighted
9average of trades on that day and outputs a beancount price directive.
10
11** Running
12
13The tool does not download files on its own. Download the files
14before running.
15
16#+BEGIN_SRC shell
17$ node index.js some.csv.gz
18# or
19$ node index.js some.csv.gz EUR
20# or
21$ node index.js some.csv.gz EUR BTC
22#+END_SRC
23
24*** Parameters
25
26- filename (gzipped CSV)
27- currency [optional] (currency code used in beancount {USD,EUR, etc})
28- commodity [optional] (currency code of commodity) {BTC,BCH,LTC, etc}
29
30*** Status
31
32It works. I don't plan on working on it much further.
33
34It's not very efficent. I suspect the main problem is the group
35function probably doesn't assume that the input is sorted and
36therefore buffers its entire input. Patches welcome.
37
38** License
39
40MIT