BitstampAPI - work in progress
Ruby Wrapper around https://www.bitstamp.net/api/
Goal is the mirror the methods as close as possible, and then provide an abstraction layer on top of that.
TODO
- Improve docs
- Release on RubyGems
- Unit tests
- Better abstraction layer and useful methods, e.g.
BitstamAPI::MarketOrder.buy!(amount: 1)
Installation
Clone the repo
Add this line to your application's Gemfile:
$ gem build bitstamp_api.gemspec
$ gem install bitstamp_api-0.1.0.gem
And then execute:
$ bundle
Usage
Set keys
BitstampAPI.configure do |config|
config.api_key = ENV["BITSTAMP_API_KEY"]
config.api_secret = ENV["BITSTAMP_API_SECRET"]
config.client_id = ENV["BITSTAMP_CLIENT_ID"]
end
Public Data
BitstampAPI::Data.ticker
BitstampAPI::Data.transactions(time: "hour")
BitstampAPI::Data.order_book(group: 1)
BitstampAPI::Data.conversion_rate(pair: :eur_usd)
Buy/Sell
BitstampAPI::LimitOrder.buy!(amount: 0.001, price: 800)
BitstampAPI::LimitOrder.sell!(amount: 0.001, price: 800)
BitstampAPI::LimitOrder.cancel!(id: 123456)
Contributing
- Fork it ( http://github.com//bitstamp_api/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request