Sha256: a12a8f9add93b9e0d89776e8df1e4e1c38ee4712a784f9102763c0e7095abc3c

Contents?: true

Size: 493 Bytes

Versions: 1

Compression:

Stored size: 493 Bytes

Contents

module Mcoin
  module Market
    # :nodoc:
    class Bitfinex < Base
      # rubocop:disable Metrics/LineLength
      ENDPOINT = 'https://api.bitfinex.com/v1/pubticker/%<type>s%<currency>s'.freeze

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mcoin-0.1.0 lib/mcoin/market/bitfinex.rb