Learn R Programming

Rbitcoin (version 0.9.2)

blockchain.api.query: Query blockchain.info API

Description

Query bitcoin related data from blockchain.info.

Usage

blockchain.api.query(..., method, verbose = getOption("Rbitcoin.verbose", 0))

Arguments

...
params passed to blockchain.info API, specific for particular method, example 'bitcoin_address' or 'tx_index', for more see references or examples.
method
character. For details see references, currently supported 'Single Address' and 'Single Transaction'. If method missing the function will try to guess it based on first param in ....
verbose
integer. Rbitcoin processing messages, print to console if verbose > 0, each subfunction reduce verbose by 1. If missing then getOption("Rbitcoin.verbose",0) is used, by default 0.

Value

result returned by fromJSON function applied on the blockchain result, most probably the list.

References

https://blockchain.info/api/blockchain_api

See Also

market.api.query

Examples

Run this code
## Not run: 
# # query bitcoin address information - 'Single Address' method
# # Rbitcoin donation address final balance in BTC
# blockchain.api.query('15Mb2QcgF3XDMeVn6M7oCG6CQLw4mkedDi',limit=0)[['final_balance']]/100000000
# # Rbitcoin donation address full details
# blockchain.api.query('15Mb2QcgF3XDMeVn6M7oCG6CQLw4mkedDi',verbose=1)
# # some first wallet final balance in BTC
# blockchain.api.query('1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa',limit=0)[['final_balance']]/100000000
# # some first wallet details (limit to 3 txs, skip two txs)
# blockchain.api.query(method = 'Single Address',
#                      bitcoin_address = '1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa', limit=3, offset=2)
# # query bitcoin transaction information - 'Single Transaction' method
# # Some recent transaction of some first wallet
# blockchain.api.query('e5c4de1c70cb6d60db53410e871e9cab6a0ba75404360bf4cda1b993e58d45f8')
# ## End(Not run)

Run the code above in your browser using DataLab