Sha256: 85db88c1835907191257d254ffdd859c2c674b8e94b9963eba5f9f6edf1ec72c
Contents?: true
Size: 623 Bytes
Versions: 2
Compression:
Stored size: 623 Bytes
Contents
# frozen_string_literal: true require 'time' module Mcoin module Market # :nodoc: class Hitbtc < Base ENDPOINT = 'https://api.hitbtc.com/api/2/public/ticker/%<type>s%<currency>s' private def build_ticker(pair, response) fetch Data::Ticker.new( :Hitbtc, pair[:type], pair[:currency], last: response['last'], ask: response['ask'], bid: response['bid'], high: response['high'], low: response['low'], volume: response['volume'], timestamp: Time.parse(response['timestamp']).to_f ) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mcoin-0.6.1 | lib/mcoin/market/hitbtc.rb |
mcoin-0.6.0 | lib/mcoin/market/hitbtc.rb |