Class: Bitcoinica::Quote

Inherits:
Connection
  • Object
show all
Defined in:
lib/bitcoinica/quote.rb

Class Method Summary collapse

Methods inherited from Connection

authenticate!

Class Method Details

.exchange_style(currency_pair = 'BTCUSD') ⇒ Object



14
15
16
# File 'lib/bitcoinica/quote.rb', line 14

def exchange_style(currency_pair = 'BTCUSD')
  find(:all, from: "#{self.site}/quotes/#{currency_pair}/compatible.json")
end

.history(currency_pair = 'BTCUSD', n = 100) ⇒ Object



10
11
12
# File 'lib/bitcoinica/quote.rb', line 10

def history(currency_pair = 'BTCUSD', n = 100)
  find(:all, from: "#{self.site}/quotes/#{currency_pair}/history.json", params: { n: n })
end

.ticker(currency_pair = 'BTCUSD') ⇒ Object



6
7
8
# File 'lib/bitcoinica/quote.rb', line 6

def ticker(currency_pair = 'BTCUSD')
  find(currency_pair)
end