Class: BTCT::MtGoxAPI

Inherits:
Object
  • Object
show all
Defined in:
lib/btct/mtgox.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



7
8
9
# File 'lib/btct/mtgox.rb', line 7

def name
  "Mt.Gox"
end

#topObject



11
12
13
14
15
# File 'lib/btct/mtgox.rb', line 11

def top
  bid = MtGox.bids.sort { |x, y| x.price <=> y.price }.last
  ask = MtGox.asks.sort { |x, y| x.price <=> y.price }.first
  return Quote.new(bid.price, bid.amount, name), Quote.new(ask.price, ask.amount, name)
end