Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def balance_io(cls, address):
- h = urllib2.urlopen('http://btc.blockr.io/api/v1/address/info/%s' % address)
- json = simplejson.load(h)
- json = simplejson.load(json)
- f = data['balance']
- return f
- This is what the page returns, I am just trying to get the balance:
- {
- "status": "success",
- "data": {
- "address": "14xg41kHFVfLX5LjYD4QbWaVwTNUiWK14n",
- "is_unknown": false,
- "balance": 0,
- "totalreceived": 0.26362206,
- "nb_txs": 4,
- "first_tx": {
- "time_utc": "2014-03-31T18:18:07Z",
- "tx": "46e99e14a6a413713565f8a20b83d05670ad99f76948f7e142a3ae3a11785254",
- "block_nb": "293433",
- "value": 0.1300608,
- "confirmations": 1407
- },
- "last_tx": {
- "time_utc": "2014-04-05T18:02:09Z",
- "tx": "de3547d3b59f1b0104d37dd833706aefaeae4444c727216bf9a64fd899d50dfd",
- "block_nb": "294382",
- "value": -0.13356126,
- "confirmations": 458
- },
- "is_valid": true
- },
- "code": 200,
- "message": ""
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement