Class: KoinimPrice::Orderbook
- Inherits:
-
Object
- Object
- KoinimPrice::Orderbook
- Defined in:
- lib/koinim_price/orderbook.rb
Constant Summary collapse
- API_URL =
"#{KOINIM_URL}orderbook"
Class Method Summary collapse
Class Method Details
.asks ⇒ Object
8 9 10 |
# File 'lib/koinim_price/orderbook.rb', line 8 def self.asks response['asks'] end |
.bids ⇒ Object
12 13 14 |
# File 'lib/koinim_price/orderbook.rb', line 12 def self.bids response['bids'] end |
.refresh ⇒ Object
16 17 18 19 20 |
# File 'lib/koinim_price/orderbook.rb', line 16 def self.refresh @response = nil response true end |
.response ⇒ Object
22 23 24 |
# File 'lib/koinim_price/orderbook.rb', line 22 def self.response @response ||= JSON.parse(HTTParty.get(API_URL).body) end |