GithubHelp home page GithubHelp logo

adelmofilho / krypto Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 500 KB

kRypto: Pull cryptocurrency data in tidy format from coinmarketcap API

License: GNU General Public License v3.0

R 100.00%
r-package r-programming api-wrapper cryptocurrency

krypto's Introduction

kRypto

lifecycle Travis build status Coverage status AppVeyor build status

Installation

You can install the released version of kRypto from CRAN with:

Installation

You can install the development version from Github with devtools:

devtools::install_github("adelmofilho/kRypto")

Usage

To get the updated cryptocurrencies' data, use the function ticker.

kRypto::ticker(cryptocurrency = c("BTC", "PPC"))
## # A tibble: 2 x 14
##   id    name     symbol website_slug  rank circulating_supply total_supply
##   <chr> <chr>    <chr>  <chr>        <int>              <dbl>        <dbl>
## 1 1     Bitcoin  BTC    bitcoin          1           17057262     17057262
## 2 5     Peercoin PPC    peercoin       193           24777461     24777461
## # ... with 7 more variables: max_supply <dbl>, USD.price <dbl>,
## #   USD.volume_24h <dbl>, USD.market_cap <dbl>,
## #   USD.percent_change_1h <dbl>, USD.percent_change_24h <dbl>,
## #   USD.percent_change_7d <dbl>

To obtain historical data for cryptocurrencies, use the function historical_data

kRypto::historical_data(cryptocurrency = "BTC")
## # A tibble: 1,855 x 8
##    coin    dia        Open.  High   Low Close..     Volume   Market.Cap
##    <chr>   <chr>      <dbl> <dbl> <dbl>   <dbl>      <dbl>        <dbl>
##  1 bitcoin 2018-05-26 7486. 7595. 7349.   7356. 4051540000 127682000000
##  2 bitcoin 2018-05-25 7592. 7659. 7393.   7480. 4867830000 129470000000
##  3 bitcoin 2018-05-24 7561. 7739. 7331.   7587. 6049220000 128925000000
##  4 bitcoin 2018-05-23 8037. 8055. 7508.   7558. 6491120000 137024000000
##  5 bitcoin 2018-05-22 8420. 8423. 8005.   8042. 5137010000 143534000000
##  6 bitcoin 2018-05-21 8522. 8558. 8365.   8419. 5154990000 145264000000
##  7 bitcoin 2018-05-20 8247. 8562. 8205.   8513. 5191060000 140556000000
##  8 bitcoin 2018-05-19 8256. 8372. 8183.   8247. 4712400000 140689000000
##  9 bitcoin 2018-05-18 8092. 8274. 7975.   8251. 5764190000 137881000000
## 10 bitcoin 2018-05-17 8370. 8446. 8054.   8094. 5862530000 142608000000
## # ... with 1,845 more rows

This package was written during the #IIISER - International Seminar on Statistics with R, at Rio de Janeiro, Brazil.

krypto's People

Contributors

adelmofilho avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.