Module: Buttercoin::Client::UnauthMethods

Included in:
Buttercoin::Client
Defined in:
lib/buttercoin/client/unauth_methods.rb

Instance Method Summary collapse

Instance Method Details

#get_order_bookObject

Retrieve the orderbook

Returns:

  • Hashie object containing order book info



17
18
19
# File 'lib/buttercoin/client/unauth_methods.rb', line 17

def get_order_book
  get '/orderbook', nil, {}, false
end

#get_tickerObject

Retrieve the ticker

Returns:

  • Hashie object containing market price info



9
10
11
# File 'lib/buttercoin/client/unauth_methods.rb', line 9

def get_ticker
  get '/ticker', nil, {}, false
end

#get_trade_historyObject

Retrieve the last 100 trades

Returns:

  • Hashie object containing trade history



25
26
27
28
# File 'lib/buttercoin/client/unauth_methods.rb', line 25

def get_trade_history
  mash = get '/trades', nil, {}, false
  mash.trades
end