Class: MBTC::API
Class Method Summary collapse
-
.orderbook(type = :btc) ⇒ HTTParty::Response
GET Orderbook request.
-
.ticker(type = :btc) ⇒ HTTParty::Response
GET Ticker request.
-
.trades(type = :btc) ⇒ HTTParty::Response
GET Trades request.
Class Method Details
.orderbook(type = :btc) ⇒ HTTParty::Response
GET Orderbook request
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/mbtc/api.rb', line 31 def self.orderbook( type = :btc ) case type when :btc endpoint = '/orderbook/' when :ltc endpoint = '/orderbook_litecoin/' end get( endpoint ) end |
.ticker(type = :btc) ⇒ HTTParty::Response
GET Ticker request
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/mbtc/api.rb', line 14 def self.ticker( type = :btc ) case type when :btc endpoint = '/ticker/' when :ltc endpoint = '/ticker_litecoin/' end get( endpoint ) end |
.trades(type = :btc) ⇒ HTTParty::Response
GET Trades request
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/mbtc/api.rb', line 48 def self.trades( type = :btc ) case type when :btc endpoint = '/trades/' when :ltc endpoint = '/trades_litecoin/' end get( endpoint ) end |