Giter Site home page Giter Site logo

cloudxtreme / cryptoexchange Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coingecko/cryptoexchange

0.0 0.0 0.0 1.13 MB

Ruby library to query market data from cryptocurrency exchanges (https://www.coingecko.com)

Home Page: https://www.coingecko.com

License: MIT License

Ruby 99.96% Shell 0.04%

cryptoexchange's Introduction

Build Status

Cryptoexchange

Cryptoexchange is a rubygem for ruby developers to interact with over 40+ cryptocurrency exchange market data APIs in a single library.

Installation

Add this line to your application's Gemfile:

gem 'cryptoexchange'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cryptoexchange

Exchanges Supported

Exchange Ticker Order Book Trade Account Market List
Abucoins Y Y Y Y
ACX Y Y Y Y
Allcoin Y Y User-Defined
ANX Y User-Defined
Bit-Z Y Y
Binance Y Y User-Defined
Bitbay Y User-Defined
Bitcoin Indonesia Y User-Defined
Bitconnect Y Y
Bitfinex Y Y
Bitflyer Y Y
Bithumb Y Y
Bitkonan Y User-Defined
Bitso Y Y
Bitstamp Y Y Y User-Defined
Bittrex Y Y
Bleutrade Y Y
BTC-e
BTC38
BTCC Y User-Defined
BTCChina
BTER Y Y
BX Thailand Y Y
Cex Y Y Y Y
CCex Y Y
CHBTC Y User-Defined
Coincheck Y User-Defined
CoinExchange Y Y
Coinmate Y Y User-Defined
Coinone Y Y
CoinsMarkets Y Y
COSS Y Y
CryptoBridge Y Y
Cryptopia Y Y
EtherDelta Y Y
Exmo Y Y Y Y
Gate Y Y Y Y
Gatecoin Y Y
GDAX Y Y
Gemini Y Y Y Y
HitBTC Y Y
Huobi Y Y
Itbit Y User-Defined
Jubi Y Y
Korbit Y User-Defined
Kraken Y Y
Kucoin Y Y
Kuna Y Y Y User-Defined
LakeBTC Y Y
Liqui Y Y
LiteBit.eu Y Y
Livecoin Y Y
LocalBitcoins Y Y Y Y
Luno Y Y
Lykke Y Y N Y
MercadoBitcoin Y User-Defined
Mercatox Y N N N Y
Nova Exchange Y Y
OKCoin Y User-Defined
OKEx Y Y Y User-Defined
Poloniex Y Y
Qryptos Y Y
QuadrigaCX Y User-Defined
Quoine Y Y
Stocks Exchange Y Y
SZZC Y Y
The Rock Trading Y Y
Tidex Y Y
TuxExchange Y Y
Unocoin
Viabtc Y User-Defined
Wex Y Y Y Y
Yobit Y Y
Yuanbao Y User-Defined
Yunbi Y Y
Zaif Y Y Y Y

Usage

List market pairs supported by an exchange

  client = Cryptoexchange::Client.new
  pairs = client.pairs('bitflyer')

List exchange services for certain currency

  client.exchange_for('btc')

  # ['anx', 'bianance', ...]

Query the Ticker API

  pair = client.pairs('bitflyer').first
  ticker = client.ticker(pair)
  ticker.base
  ticker.target
  ticker.last

Query the OrderBook API

  # Check if exchange has support for OrderBook
  pair = client.pairs('bitflyer').first
  order_book = client.order_book(pair)
  order_book.base
  order_book.target
  order_book.bids
  order_book.asks

Market List

Some exchange API do not support market pair listings. For those exchanges, we included a custom YML file to define the list of market pairs supported by that exchange. That configuration works out of the box, however if that exchange adds new market pairs, you as the user of Cryptoexchange can explicitly add those pairs instead of waiting for this library to be updated.

In the table above, look for the User-Defined under the Market List column.

The format of the yaml file should look like below. Name the file <exchange_name>.yml and place it under the config/cryptoexchange directory.

  :pairs:
    - :base: BTC
      :target: KRW
    - :base: ETH
      :target: KRW
    - :base: ETC
      :target: KRW

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/coingecko/cryptoexchange. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

When implementing a new exchange, refer to this guide.

The contributing guide may also be useful to you.

You can chat with the core team member or other participating in this repository chat on https://gitter.im/cryptoexchange-api/Lobby/~chat#

License

The gem is available as open source under the terms of the MIT License.

cryptoexchange's People

Contributors

akshaymankar avatar alexanderdavidpan avatar d0minicw0ng avatar diegous avatar estherleongym avatar falkoner avatar jimmynguyc avatar ranhiru avatar rusbal avatar swingcloud avatar tmlee avatar weh avatar yihangho avatar yihyang 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.