Class: Bitcoinica::Quote
- Inherits:
-
Connection
- Object
- ActiveResource::Base
- Connection
- Bitcoinica::Quote
- Defined in:
- lib/bitcoinica/quote.rb
Class Method Summary collapse
- .exchange_style(currency_pair = 'BTCUSD') ⇒ Object
- .history(currency_pair = 'BTCUSD', n = 100) ⇒ Object
- .ticker(currency_pair = 'BTCUSD') ⇒ Object
Methods inherited from Connection
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 |