Module: Bitstamp
- Defined in:
- lib/bitstamp.rb,
lib/bitstamp/net.rb,
lib/bitstamp/model.rb,
lib/bitstamp/helper.rb,
lib/bitstamp/orders.rb,
lib/bitstamp/ticker.rb,
lib/bitstamp/collection.rb
Defined Under Namespace
Modules: Helper, Net
Classes: Collection, MissingConfigExecption, Model, Order, Orders, Ticker
Constant Summary
collapse
- @@currency =
:usd
Class Method Summary
collapse
Class Method Details
.balance ⇒ Object
33
34
35
36
37
|
# File 'lib/bitstamp.rb', line 33
def self.balance
self.sanity_check!
JSON.parse Bitstamp::Net.get('/balance').body_str
end
|
.orders ⇒ Object
27
28
29
30
31
|
# File 'lib/bitstamp.rb', line 27
def self.orders
self.sanity_check!
@@orders ||= Bitstamp::Orders.new
end
|
.sanity_check! ⇒ Object
47
48
49
50
51
|
# File 'lib/bitstamp.rb', line 47
def self.sanity_check!
unless self.key || self.secret
raise MissingConfigExecption.new("Bitstamp Gem not properly configured")
end
end
|
.setup {|_self| ... } ⇒ Object
43
44
45
|
# File 'lib/bitstamp.rb', line 43
def self.setup
yield self
end
|