Class: Btce::Ticker
- Inherits:
-
PublicOperation
- Object
- PublicOperation
- Btce::Ticker
- Defined in:
- lib/btce.rb
Constant Summary collapse
- JSON_METHODS =
%w(high low avg vol vol_cur last buy sell server_time)
Instance Attribute Summary
Attributes inherited from PublicOperation
Instance Method Summary collapse
-
#initialize(pair) ⇒ Ticker
constructor
A new instance of Ticker.
- #spread ⇒ Object
- #spread_percent ⇒ Object
Methods inherited from PublicOperation
Constructor Details
#initialize(pair) ⇒ Ticker
Returns a new instance of Ticker.
162 163 164 |
# File 'lib/btce.rb', line 162 def initialize(pair) super 'ticker', pair end |
Instance Method Details
#spread ⇒ Object
183 184 185 |
# File 'lib/btce.rb', line 183 def spread (offer - bid) / offer end |
#spread_percent ⇒ Object
187 188 189 |
# File 'lib/btce.rb', line 187 def spread_percent spread * 100.0 end |