added bizzybotte, cleaned up backup
This commit is contained in:
@@ -8,12 +8,25 @@ import decimal
|
||||
def main(argv):
|
||||
current = fetch_mtgox_orders()
|
||||
|
||||
selling = selling_stats(current['bids'])
|
||||
buying = buying_stats(current['asks'])
|
||||
|
||||
|
||||
def selling_stats(bids):
|
||||
high = max([bid[0] for bid in bids])
|
||||
low = min([bid[0] for bid in bids])
|
||||
print "highbid %s" % high
|
||||
print "lowbid %s" % low
|
||||
|
||||
def buying_stats(asks):
|
||||
pass
|
||||
|
||||
def fetch_mtgox_orders():
|
||||
url = 'https://mtgox.com/code/data/getDepth.php'
|
||||
parsed = json.loads(
|
||||
urllib.urlopen(url).read(),
|
||||
parse_float=decimal.Decimal
|
||||
)
|
||||
print repr(parsed)
|
||||
return parsed
|
||||
|
||||
sys.exit(main(sys.argv))
|
||||
|
||||
Reference in New Issue
Block a user