priestc / moneywagon

Universal bitcoin/altcoin blockchain client library for Python and the command line
http://multiexplorer.com
MIT License
149 stars 48 forks source link

Command line address-balance throwing an error #13

Closed BitLox closed 8 years ago

BitLox commented 8 years ago

Installed via pip on OS X 10.11.5

All calls via the command line for address-balance give errors:

$ moneywagon address-balance doge D8ZXs3JDdLuyRjG3wDtRQE2PMT4YQWELfZ
usage: moneywagon [-h]
                  {current-price,generate-keypair,historical-price,address-balance,single-transaction,get-block,historical-transactions,sweep,unspent-outputs,explorer-urls,service-table,wallet-balance}
                  ...
moneywagon: error: unrecognized arguments: D8ZXs3JDdLuyRjG3wDtRQE2PMT4YQWELfZ

Or:

moneywagon address-balance btc 1HWpyFJ7N6rvFkq3ZCMiFnqM6hviNFmG5X --paranoid=5 --verbose
usage: moneywagon [-h]
                  {current-price,generate-keypair,historical-price,address-balance,single-transaction,get-block,historical-transactions,sweep,unspent-outputs,explorer-urls,service-table,wallet-balance}
                  ...
moneywagon: error: unrecognized arguments: 1HWpyFJ7N6rvFkq3ZCMiFnqM6hviNFmG5X
BitLox commented 8 years ago

Ah, after reading the code I figured it out that you have to precede addresses with --address= Now it works fine. Might want to update the docs on the README ;-)

$ moneywagon address-balance btc --address=1JNg15eWhwGi4PiJUqJcBXXtvqD5WRZYh --paranoid=5 --verbose
* Trying: <Service: Toshi (0 in cache)> btc 1jng15ewhwgi4pijuqjcbxxtvqd5wrzyh
* Trying: <Service: BlockCypher (0 in cache)> btc 1jng15ewhwgi4pijuqjcbxxtvqd5wrzyh
* Trying: <Service: Blockr (0 in cache)> btc* Trying: <Service: ChainSo (0 in cache)> btc 1jng15ewhwgi4pijuqjcbxxtvqd5wrzyh
 1jng15ewhwgi4pijuqjcbxxtvqd5wrzyh
* Trying: <Service: BlockSeer (0 in cache)> btc 1jng15ewhwgi4pijuqjcbxxtvqd5wrzyh
Got Response: https://bitcoin.toshi.io/api/v0/addresses/1JNg15eWhwGi4PiJUqJcBXXtvqD5WRZYh
Got Response: http://btc.blockr.io/api/v1/address/info/1JNg15eWhwGi4PiJUqJcBXXtvqD5WRZYh
Got Response: https://chain.so/api/v2/get_address_balance/btc/1JNg15eWhwGi4PiJUqJcBXXtvqD5WRZYh/1
Got Response: https://api.blockcypher.com/v1/btc/main/addrs/1JNg15eWhwGi4PiJUqJcBXXtvqD5WRZYh
Got Response: https://www.blockseer.com/api/addresses/1JNg15eWhwGi4PiJUqJcBXXtvqD5WRZYh
FAIL: <Service: BlockSeer (1 in cache)> KeyError 'data'
* Trying: <Service: BlockChainInfo (0 in cache)> btc 1jng15ewhwgi4pijuqjcbxxtvqd5wrzyh
Got Response: https://blockchain.info/address/1JNg15eWhwGi4PiJUqJcBXXtvqD5WRZYh?format=json
0.06222621
priestc commented 8 years ago

Thanks for discovering his. The README has been updated.