class BitcoinTicker::Nevbit
Constants
- SUPPORTED_BITCURRENCIES
- SUPPORTED_CURRENCIES
Public Class Methods
link()
click to toggle source
# File lib/bitcoin_ticker/exchanges/nevbit.rb, line 12 def self.link "https://nevbit.com/" end
name()
click to toggle source
# File lib/bitcoin_ticker/exchanges/nevbit.rb, line 8 def self.name "nevbit" end
Private Class Methods
get_rate()
click to toggle source
# File lib/bitcoin_ticker/exchanges/nevbit.rb, line 21 def self.get_rate client = BitcoinTicker::Client.new(link) response = client.get(ticker_endpoint) BitcoinTicker::Rate.new(@bitcurrency, @currency, normalize_api_response(response[:body])) end
normalize_api_response(hash)
click to toggle source
# File lib/bitcoin_ticker/exchanges/nevbit.rb, line 30 def self.normalize_api_response hash { last: hash[:last], high: hash[:high], low: hash[:low], vwap: hash[:vwap], volume: hash[:vol], bid: hash[:buy], ask: hash[:sell] } end
ticker_endpoint()
click to toggle source
# File lib/bitcoin_ticker/exchanges/nevbit.rb, line 16 def self.ticker_endpoint "/data/#{@bitcurrency}#{@currency}/ticker.json" end