]> git.treefish.org Git - bitvalue.git/commitdiff
Made exchange configurable
authorAlexander Schmidt <alex@treefish.org>
Tue, 7 Nov 2017 23:06:48 +0000 (00:06 +0100)
committerAlexander Schmidt <alex@treefish.org>
Tue, 7 Nov 2017 23:06:48 +0000 (00:06 +0100)
bitvalue

index f2bb53cd02923558551bb93501ff38ec5c2c5520..617305eaa7fcd1df1138fd2d0a5ddc105f9a0b28 100755 (executable)
--- a/bitvalue
+++ b/bitvalue
@@ -4,6 +4,7 @@ CONFIG=~/.bitvaluerc
 
 if [ ! -f $CONFIG ]; then
     cat << EOF > $CONFIG
+EXCHANGE="bitstamp"
 CURRENCY="EUR"
 ZERO_RATE="1"
 ZERO_VALUE="1"
@@ -24,7 +25,7 @@ set terminal dumb
 set datafile separator ","
 set xdata time
 set timefmt "%Y-%m-%d %H:%M:%S UTC"
-set title "TIMESPAN: $TIMESPAN | ZERO RATE: $ZERO_RATE $CURRENCY | ZERO VALUE: $ZERO_VALUE $CURRENCY"
-plot "< wget -q -O - \"https://data.bitcoinity.org/export_data.csv?currency=$CURRENCY&data_type=price&exchange=bitstamp&t=l&timespan=$TIMESPAN\"" \
+set title "EXCHANGE: $EXCHANGE | TIMESPAN: $TIMESPAN\nZERO RATE: $ZERO_RATE $CURRENCY | ZERO VALUE: $ZERO_VALUE $CURRENCY"
+plot "< wget -q -O - \"https://data.bitcoinity.org/export_data.csv?currency=$CURRENCY&data_type=price&exchange=$EXCHANGE&t=l&timespan=$TIMESPAN\"" \
      using 1:(\$3/$ZERO_RATE*$ZERO_VALUE) with lines title ""
 EOF