Rbitcoin: R & Bitcoin integration

Description References See Also Examples

Description

Utilities related to Bitcoin and other cryptocurrencies. Core functionalities are:

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:

For package-level options see examples below.

There is also simple GUI app for Rbitcoin package shinyBTC: https://github.com/jangorecki/shinyBTC

References

Example SSL CA file source: http://curl.haxx.se/docs/caextract.html

See Also

market.api.process, blockchain.api.process, fromBTC, wallet_manager, rbtc.plot, api.dict

Examples

 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)

jangorecki/Rbitcoin documentation built on May 18, 2019, 12:24 p.m.