class MBTC::API

Public Class Methods

orderbook( type = :btc ) click to toggle source

GET Orderbook request

@param type [Symbol] Tipo de request `:btc` ou `:ltc` @return [HTTParty::Response] Retorna as ofertas de compra e venda

# 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 ) click to toggle source

GET Ticker request

@param type [Symbol] Tipo de request `:btc` ou `:ltc` @return [HTTParty::Response] Retorna o ticker de preço

# 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 ) click to toggle source

GET Trades request

@param type [Symbol] Tipo de request `:btc` ou `:ltc` @return [HTTParty::Response] Retorna as negociações ou operações realizadas

# 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