Project

btc_ticker

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

Development

~> 12.0
~> 3.0
~> 3.0

Runtime

 Project Readme

BTCTicker

Gem Version Build Status Dependency Status Coverage Status

A Ruby wrapper for the Bitstamp Ticker API.

Installation

Add this line to your application's Gemfile:

gem 'btc_ticker'

And then execute:

$ bundle

Or install it yourself as:

$ gem install btc_ticker

Usage

require 'btc_ticker'

#Get current BTC ticker (Hash object) by currency pair (Only :btc_usd and :btc_eur pairs are supported)
ticker = BTCTicker::Bitstamp::Ticker.get_info(:btc_usd)

#Print a list of the keys
p ticker.keys #=> ["high", "last", "timestamp", "bid", "vwap", "volume", "low", "ask", "open"]

current_btc_usd_price = ticker["last"]

Bitstamp Ticker API response

Attribute Description
last Last BTC price.
high Last 24 hours price high.
low Last 24 hours price low.
vwap Last 24 hours volume weighted average price.
volume Last 24 hours volume.
bid Highest buy order.
ask Lowest sell order.
timestamp Unix timestamp date and time.
open First price of the day.

License

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