class Cryptsy::API2::Markets

Public Class Methods

new(public_key=nil, private_key=nil) click to toggle source
# File lib/cryptsy/api2/markets.rb, line 4
def initialize(public_key=nil, private_key=nil)
  @public_key = public_key
  @private_key = private_key
end

Public Instance Methods

fees(market_id) click to toggle source
# File lib/cryptsy/api2/markets.rb, line 29
def fees(market_id)
  Request.send("markets/#{market_id}/fees", {}, @public_key, @private_key)
end
info(market_id) click to toggle source
# File lib/cryptsy/api2/markets.rb, line 13
def info(market_id)
  Request.send("markets/#{market_id}")
end
list() click to toggle source
# File lib/cryptsy/api2/markets.rb, line 9
def list
  Request.send("markets")
end
ohlc(market_id, options={}) click to toggle source
# File lib/cryptsy/api2/markets.rb, line 45
def ohlc(market_id, options={})
  Request.send("markets/#{market_id}/ohlc", options)
end
orderbook(market_id, options={}) click to toggle source
# File lib/cryptsy/api2/markets.rb, line 37
def orderbook(market_id, options={})
  Request.send("markets/#{market_id}/orderbook", options)
end
ticker(market_id=nil) click to toggle source
# File lib/cryptsy/api2/markets.rb, line 23
def ticker(market_id=nil)
  path = "markets/ticker"
  path = "markets/#{market_id}/ticker" unless market_id.nil?
  Request.send(path)
end
tradehistory(market_id, options={}) click to toggle source
# File lib/cryptsy/api2/markets.rb, line 41
def tradehistory(market_id, options={})
  Request.send("markets/#{market_id}/tradehistory", options)
end
triggers(market_id) click to toggle source
# File lib/cryptsy/api2/markets.rb, line 33
def triggers(market_id)
  Request.send("markets/#{market_id}/triggers", {}, @public_key, @private_key)
end
volume(market_id=nil) click to toggle source
# File lib/cryptsy/api2/markets.rb, line 17
def volume(market_id=nil)
  path = "markets/volume"
  path = "markets/#{market_id}/volume" unless market_id.nil?
  Request.send(path)
end