class Flashboy::Bittrex
Private Instance Methods
formatted_pair(pair)
click to toggle source
Calls superclass method
# File lib/flashboy/bittrex.rb, line 11 def formatted_pair(pair) currency, base = super(pair) "#{base}-#{currency}".upcase end
parse_order_book(order, pair)
click to toggle source
# File lib/flashboy/bittrex.rb, line 27 def parse_order_book(order, pair) { bids: order[:result][:buy].map{|o| { price: o[:Rate], amount: o[:Quantity] } }, asks: order[:result][:sell].map{|o| { price: o[:Rate], amount: o[:Quantity] } } } end
parse_quote(quote, pair)
click to toggle source
# File lib/flashboy/bittrex.rb, line 16 def parse_quote(quote, pair) data = quote[:result] { bid: data[:Bid], last: data[:Last], ask: data[:Ask], volume: data[:volume], timestamp: data[:timestamp] } end