Sha256: b6f51f87420944078b65d80c781a65a64a9e99ad3cd21da76ba359c10d14fe6c
Contents?: true
Size: 603 Bytes
Versions: 2
Compression:
Stored size: 603 Bytes
Contents
# frozen_string_literal: true module Mcoin module Market # :nodoc: class Binance < Base ENDPOINT = 'https://api.binance.com/api/v1/ticker/24hr?symbol=%<type>s%<currency>s' private def build_ticker(pair, response) Data::Ticker.new( :Binance, pair[:type], pair[:currency], last: response['lastPrice'], ask: response['askPrice'], bid: response['bidPrice'], low: response['lowPrice'], high: response['highPrice'], volume: response['volume'], timestamp: Time.now.to_i ) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mcoin-0.6.1 | lib/mcoin/market/binance.rb |
mcoin-0.6.0 | lib/mcoin/market/binance.rb |