diff options
author | makefu <github@syntax-fehler.de> | 2011-08-22 01:35:55 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2011-08-22 01:35:55 +0200 |
commit | 5e102279a72d77305d84f3cab9aef464a76ecb68 (patch) | |
tree | f5cdb07de14ba80f08bffe7b7daae4c70a1d34bd /btc/mtgox | |
parent | cd2e7afcab18480fa8f21874a3eb529f0d070780 (diff) |
mtgox: add ticker text script
Diffstat (limited to 'btc/mtgox')
-rwxr-xr-x | btc/mtgox/json_ticker_helper.py | 7 | ||||
-rwxr-xr-x | btc/mtgox/ticker_text.sh | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/btc/mtgox/json_ticker_helper.py b/btc/mtgox/json_ticker_helper.py new file mode 100755 index 00000000..727dd594 --- /dev/null +++ b/btc/mtgox/json_ticker_helper.py @@ -0,0 +1,7 @@ +#!/usr/bin/python + +import json,sys + +result = json.load(sys.stdin) + +print "High: " + str(result["ticker"]["high"]) + " Low: " + str(result["ticker"]["low"]) + " Last: " + str(result["ticker"]["last"]) diff --git a/btc/mtgox/ticker_text.sh b/btc/mtgox/ticker_text.sh new file mode 100755 index 00000000..2bcac134 --- /dev/null +++ b/btc/mtgox/ticker_text.sh @@ -0,0 +1,3 @@ +#!/bin/sh +dirname=`dirname $(readlink -f $0)` +$dirname/mtgox.ticker | python $dirname/json_ticker_helper.py |