module Bitstamp

Public Class Methods

balance() click to toggle source
# File lib/bitstamp.rb, line 48
def self.balance
  self.sanity_check!

  JSON.parse Bitstamp::Net.post('/balance').body_str
end
configured?() click to toggle source
# File lib/bitstamp.rb, line 66
def self.configured?
  self.key && self.secret && self.client_id
end
order_book() click to toggle source
# File lib/bitstamp.rb, line 58
def self.order_book
  return JSON.parse Bitstamp::Net.get('/order_book/').body_str
end
orders() click to toggle source
# File lib/bitstamp.rb, line 32
def self.orders
  self.sanity_check!

  @@orders ||= Bitstamp::Orders.new
end
sanity_check!() click to toggle source
# File lib/bitstamp.rb, line 70
def self.sanity_check!
  unless configured?
    raise MissingConfigExeception.new("Bitstamp Gem not properly configured")
  end
end
setup() { |self| ... } click to toggle source
# File lib/bitstamp.rb, line 62
def self.setup
  yield self
end
ticker() click to toggle source
# File lib/bitstamp.rb, line 54
def self.ticker
  return Bitstamp::Ticker.from_api
end
transactions() click to toggle source
# File lib/bitstamp.rb, line 44
def self.transactions
  return Bitstamp::Transactions.from_api
end
user_transactions() click to toggle source
# File lib/bitstamp.rb, line 38
def self.user_transactions
  self.sanity_check!

  @@transactions ||= Bitstamp::UserTransactions.new
end