Sha256: 6477f358546b2dfc70fb7b6a047621bd7e9240b4825eed2e4828435cba2e5b36

Contents?: true

Size: 536 Bytes

Versions: 6

Compression:

Stored size: 536 Bytes

Contents

# frozen_string_literal: true

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mcoin-0.5.2 lib/mcoin/market/bitfinex.rb
mcoin-0.5.1 lib/mcoin/market/bitfinex.rb
mcoin-0.5.0 lib/mcoin/market/bitfinex.rb
mcoin-0.4.0 lib/mcoin/market/bitfinex.rb
mcoin-0.3.0 lib/mcoin/market/bitfinex.rb
mcoin-0.2.1 lib/mcoin/market/bitfinex.rb