Sha256: 5108743fc3094ffa29a898a2b9d64ec1f5406b264c412ed9c3b2c879cb2f0751

Contents?: true

Size: 247 Bytes

Versions: 7

Compression:

Stored size: 247 Bytes

Contents

module CurrencyRate
  class BtcChinaAdapter < Adapter
    FETCH_URL = 'https://data.btcchina.com/data/ticker'

    def normalize(data)
      return nil unless super
      { "BTC_CNY" => BigDecimal(data["ticker"]["last"].to_s) }
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
currency-rate-1.7.0 lib/adapters/crypto/btc_china_adapter.rb
currency-rate-1.6.1 lib/adapters/crypto/btc_china_adapter.rb
currency-rate-1.6.0 lib/adapters/crypto/btc_china_adapter.rb
currency-rate-1.5.4 lib/adapters/crypto/btc_china_adapter.rb
currency-rate-1.5.3 lib/adapters/crypto/btc_china_adapter.rb
currency-rate-1.5.2 lib/adapters/crypto/btc_china_adapter.rb
currency-rate-1.5.1 lib/adapters/crypto/btc_china_adapter.rb