Git Product home page Git Product logo

bittrex's Introduction

bittrex: An R client for the Bittrex Crypto-Currency Exchange

Authors: Michael J. Kane
License: LGPL-2

Build Status AppVeyor Build Status Coverage Status DOI

Disclaimer

This software is in no way affiliated, endorsed, or approved by the Bittrex crypto-currency exchange or any of its affiliates. It comes with absolutely no warranty and should not be used in actual trading unless the user can read and understand the source and know what you are doing.

Overview

Package 'bittrex' is an R implementation of the REST interface used by the Bittrex crypto-currency exchange. It provides functions for endpoints supported by the exchange. This includes the ability to retrieve price, volume, and order book information as well as the ability to trade crypto-currencies.

Calls to the exchange are categorized as either public, which includes requests for price, volume, and order book information, and private, which includes all requests requiring an account including placing buy or sell orders. Public calls can be used directly by installing the package. Private calls require that you create an account and create an API and secret key with appropriate permissions.

Private calls retrieve the API and secret key using the BITTREX_API_KEY and BITTREX_SECRET_KEY environment variables. These may be set by the user before opening the R session or, they can be set using the 'bittrex_authenticate' function.

Quickstart

Install

The package is available from GitHub and will be uploaded to CRAN shortly. If you wish to install the development version then install the devtools package, available from CRAN.

#install.packages("devtools")
devtools::install_github("ropensci/bittrex")

Using the Package

After installation, you may query the exchange with any of the public calls. For example, if we want to see the spread of the cost of doge coins in bitcoins, we can use the following code.

library(bittrex)
library(scales)
library(ggplot2)

# The price of doge coins in bitcoins.
doge_btc = bt_getmarkethistory(market='btc-doge')$result

ggplot(doge_btc, aes(x=time_stamp, y=price, group=order_type, 
  color=order_type)) + geom_line() + 
  scale_x_datetime(breaks=date_breaks("hours"), 
    labels=date_format("%m-%d %H:%M")) + xlab("Date and Time") +
  ylab("Price") + scale_colour_discrete(name="Order Type")

Contributing

If you would like to contribute to the project please contact the maintainer directly. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

ropensci_footer

bittrex's People

Contributors

kaneplusplus avatar arfon avatar chrisfan24 avatar karthik avatar noamross avatar

Watchers

James Cloos avatar Taha Zaghdoudi 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.