Coder Social home page Coder Social logo

coindeskr's Introduction

coindeskr

Build Status CRAN_Status_Badge DOWNLOADSTOTAL codecov

The goal of coindeskr is to access 'CoinDesk' Bitcoin Price Index API in R

Installation

You can install coindeskr from CRAN with:

install.packages('coindeskr')

Or alternatively, You can install the development version of coindeskr from github with:

# install.packages("devtools")
devtools::install_github("amrrs/coindeskr")

Note

Please note that, coindeskr connects with Coindesk API, hence requires Active Internet Connection for it to work.

Example

Get Current Bitcoin Price:

library(coindeskr)
get_current_price('EUR',F)

#output
> get_current_price('EUR',F)
              time.updated           time.updatedISO           time.updateduk
1 Jan 1, 2018 19:58:00 UTC 2018-01-01T19:58:00+00:00 Jan 1, 2018 at 19:58 GMT
                                                                                                                                                   disclaimer
1 This data was produced from the CoinDesk Bitcoin Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org
  bpi.USD.code bpi.USD.rate  bpi.USD.description bpi.USD.rate_float bpi.EUR.code bpi.EUR.rate bpi.EUR.description
1          USD  13,266.4225 United States Dollar           13266.42          EUR  11,045.6897                Euro
  bpi.EUR.rate_float
1           11045.69

Get Historic Bitcoin Price:

library(coindeskr)
get_historic_price('USD','2017-03-01','2017-03-03')

#output

> get_historic_price('USD','2017-03-01','2017-03-03')
              Price
2017-03-01 1230.016
2017-03-02 1260.924
2017-03-03 1290.786

Courtesy

Powered by Coindesk

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.