knitr::opts_chunk$set( echo = TRUE, fig.path = "man/figures/README-" )
cryptor is an R package that wraps around the API's of Kraken, Binance and Nomics. The package can be used to access cryptocurrency-related data. To some extent, it can be used to manage a portfolio of cryptocurrencies on a centralized exchange.
# The easiest way to obtain the package is to install the development version from GitHub: # install.packages("devtools") devtools::install_github("minornode/cryptor")
The library comes with quite some dependencies. Installing the cryptor package should also install the following packages:
To use the functionality of the API's you can either call a public query (e.g. [kraken_servertime()]) or alternatively to call a private query you must first set the credentials using the appropriate function (e.g. [credentials_kraken()]).
# All nomics endpoints require a signature credentials_nomics(key = "2018-09-demo-dont-deploy-b69315e440beb145") # demo API key can be outdated nomics_markets() # Public Kraken API calls can be called without credentials kraken_assetpairs() # Private Kraken API calls require credentials to be set first credentials_kraken(key = 'abcd', secret = '123') kraken_ledger()
library(tidyverse) library(cryptor) kraken_candles(pairs = "XBTEUR", interval = 1440) %>% ggplot(aes(x = time, y = close)) + geom_line() + theme_classic()
All contributions are welcome. Feel free to add issues / PR's.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.