0.0
No commit activity in last 3 years
No release in over 3 years
Ruby wrapper for Bitstamp's API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.2
~> 2.7
~> 10.0
~> 3.5
~> 1.2
~> 3.0
~> 2.3

Runtime

 Project Readme

BitstampClient

API wrapper for Bitstamp.

Installation

Add this line to your application's Gemfile:

gem 'bitstamp_client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bitstamp_client

Usage

# Orderbook
client = BitstampClient.new
response = client.order_book("btcusd")
response.success? # true
order_book = response.order_book
order_book.timestamp # unix timestamp
order_book.bids # Array of Order instances
order_book.asks # Array of Order instances
# Balance
client = BitstampClient.new
response = client.balance(nonce: ...)
response.success? # true

response.usd_balance  # BigDecimal
response.btc_reserved # BigDecimal

For more, see the files in spec/acceptance.

Development

  • Make a copy of .env and name it .env.local
  • Make changes
  • rspec spec to run the specs

Factories

You may include FactoryGirl factories in the gem in your tests to easily build models in the gem by require "bitstamp_client/factories"

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/bloom-solutions/bitstamp_client. 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.

License

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