class Bittrex::Quote

Attributes

ask[R]
bid[R]
last[R]
market[R]
raw[R]

Public Class Methods

current(market) click to toggle source

Example: Bittrex::Quote.current('BTC-HPY')

# File lib/bittrex/quote.rb, line 16
def self.current(market)
  new(market, client.get('public/getticker', market: market))
end
new(market, attrs = {}) click to toggle source
# File lib/bittrex/quote.rb, line 5
def initialize(market, attrs = {})
  @market = market
  return if attrs.nil?
  @bid = attrs['Bid']
  @ask = attrs['Ask']
  @last = attrs['Last']
  @raw = attrs
end

Private Class Methods

client() click to toggle source
# File lib/bittrex/quote.rb, line 22
def self.client
  @client ||= Bittrex.client
end