Project

exmo_api

0.0
No release in over 3 years
Low commit activity in last 3 years
This gem provides access to public and trade API of Exmo.com exchange
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 4.7, >= 4.7.3
~> 10.0
>= 0
~> 3.0
~> 3.4, >= 3.4.2
 Project Readme

Build Status Code Climate Gem Version

ExmoApi

This gem is a simple wrapper for Exmo.com exchange API. Please, refer to official documentation for detailed API methods description.

Installation

Add this line to your application's Gemfile:

gem 'exmo_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install exmo_api

Configuration

Configure your gem if you want to use private API methods:

# config/initializers/exmo_api.rb

ExmoApi.setup do |config|
  config.api_key = 'your_api_key'
  config.api_secret = 'your_api_secret'
end

There is some additional configuration options available. These options are set by default:

ExmoApi.setup do |config|
  # API endpoint can be changed via configuration
  #
  config.api_endpoint = 'https://api/exmo.com/v1'

  # Public methods list can also be changed
  #
  public_api_methods = [
    :trades,
    :order_book,
    :ticker,
    :pair_settings,
    :currency
  ]
end

Usage

  request = ExmoApi::Request.new(:ticker)

  request.perform
  {
    "BTC_USD"=>{
      "buy_price"=>"6559.79",
      "sell_price"=>"6569",
      "last_trade"=>"6559.79000001",
      "high"=>"6591.15652728",
      "low"=>"6414",
      "avg"=>"6508.36792358",
      "vol"=>"789.26528294",
      "vol_curr"=>"5177414.51040588",
      "updated"=>1535105637
    },
    #  ... truncated ...
  }
  r = ExmoApi::Request.new(:currency)
  => #<ExmoApi::Request:0x00007f9af8814080 @api_method=:currency, @params={}>

  r.perform
  => ["USD", "EUR", "RUB", "PLN", "UAH", "BTC", "LTC", "DOGE", "DASH", "ETH", "WAVES", "ZEC", "USDT", "XMR", "XRP", "KICK", "ETC", "BCH", "BTG", "EOS", "HBZ", "BTCZ", "DXT", "STQ", "XLM", "MNX", "OMG", "TRX", "ADA", "INK"]

Development

After checking out the repo, run bin/setup to install dependencies. 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/[USERNAME]/exmo_api.

License

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