Class: Mcoin::Market::Bitstamp

Inherits:
Base
  • Object
show all
Defined in:
lib/mcoin/market/bitstamp.rb

Overview

:nodoc:

Constant Summary collapse

ENDPOINT =
'https://www.bitstamp.net/api/v2/ticker/%<type>s%<currency>s/'

Instance Method Summary collapse

Methods inherited from Base

#fetch, #initialize, #name, #uri

Constructor Details

This class inherits a constructor from Mcoin::Market::Base

Instance Method Details

#to_tickerObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/mcoin/market/bitstamp.rb', line 9

def to_ticker
  fetch
  Data::Ticker.new(
    :Bitstamp,
    @type, @currency,
    last: @data['last'],
    ask: @data['ask'], bid: @data['bid'],
    low: @data['low'], high: @data['high'],
    volume: @data['volume']
  )
end