Description References See Also Examples
Utilities related to Bitcoin and other cryptocurrencies. Core functionalities are:
fromBTC
, toBTC
- fast conversion based on blockchain.info rates.
market.api.query
- launch query on markets API. Both public and private API calls supported. All methods and all currency pairs supported.
market.api.process
- launch query in a common way (for all markets), receive results in a common structure (for all markets). It will perform pre-process of API request, post-process of API results, and catch market error. Requires API dictionary definition, for built-in dictionary see api.dict
.
blockchain.api.query
- launch query on blockchain.info API json interface.
blockchain.api.process
- launch query and postprocess results.
rbtc.plot
- visualize the data returned by some Rbitcoin functions.
wallet_manager
- track the assets amounts and values in multiple source systems.
antiddos
- built-in antiddos procedure to prevent to be banned.
You need to note that imported digest package docs states: Please note that this package is not meant to be deployed for cryptographic purposes for which more comprehensive (and widely tested) libraries such as OpenSSL should be used. Still digest is one of the top downloaded package from CRAN.
It is advised to maintain your API keys security level as tight as possible, if you do not need withdraw api method be sure to disable it for api keys.
SSL will be used by default. It can be customized using options("RCurlOptions")
, see examples or read RCurl docs.
In case of SSL error try update certificate CA file (cacert.pem
in cainfo = system.file("CurlSSL","cacert.pem",package="RCurl")
), see references for CA file source. Alternatively you can always disable SSL.
At the time of writing the most recent markets API version were used:
kraken v0
bitstamp v2 (public) / ? (private)
btce v3 (public) / v1 (private)
bitmarket v2
hitbtc v1
btcchina v1?
For package-level options see examples below.
There is also simple GUI app for Rbitcoin package shinyBTC: https://github.com/jangorecki/shinyBTC
Example SSL CA file source: http://curl.haxx.se/docs/caextract.html
market.api.process
, blockchain.api.process
, fromBTC
, wallet_manager
, rbtc.plot
, api.dict
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ## Not run:
# default options used by Rbitcoin
# turn off sci notation of numbers, important for market API calls
options(scipen=100)
# RCurl
O <- getOption("RCurlOptions")
O$ssl.verifyhost <- as.integer(2)
O$ssl.verifypeer <- TRUE
O$cainfo <- system.file("CurlSSL","cacert.pem",package="RCurl")
options("RCurlOptions" = O)
# Rbitcoin
options(Rbitcoin.verbose = 0) # 1+ will invoke Rbitcoin processing messages
options(Rbitcoin.antiddos = TRUE) # ?antiddos
options(Rbitcoin.antiddos.sec = 10) # ?antiddos
options(Rbitcoin.antiddos.fun = antiddos_fun) # ?antiddos
options(Rbitcoin.antiddos.verbose = 0) # ?antiddos
options(Rbitcoin.cancel_order.order_not_found = NULL) # ?api.dict
options(Rbitcoin.json.debug = FALSE) # ?market.api.query
options(Rbitcoin.plot.mask = FALSE) # ?rbtc.plot
options(Rbitcoin.plot.limit_pct = Inf) # ?rbtc.plot
options(Rbitcoin.archive_exchange_rate = FALSE) # ?wallet_manager
options(Rbitcoin.wallet_manager.archive_path = "wallet_archive.rds") # ?wallet_manager
# Rbitcoin dictionaries
options(Rbitcoin.query.dict = query_dict()) # ?query.dict
options(Rbitcoin.api.dict = api_dict()) # ?api.dict
options(Rbitcoin.ct.dict = ct_dict()) # ?ct.dict
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.