Class: Cryptsy::API2::Markets
- Inherits:
-
Object
- Object
- Cryptsy::API2::Markets
- Defined in:
- lib/cryptsy/api2/markets.rb
Instance Method Summary collapse
- #fees(market_id) ⇒ Object
- #info(market_id) ⇒ Object
-
#initialize(public_key = nil, private_key = nil) ⇒ Markets
constructor
A new instance of Markets.
- #list ⇒ Object
- #ohlc(market_id, options = {}) ⇒ Object
- #orderbook(market_id, options = {}) ⇒ Object
- #ticker(market_id = nil) ⇒ Object
- #tradehistory(market_id, options = {}) ⇒ Object
- #triggers(market_id) ⇒ Object
- #volume(market_id = nil) ⇒ Object
Constructor Details
#initialize(public_key = nil, private_key = nil) ⇒ Markets
Returns a new instance of Markets.
4 5 6 7 |
# 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 |
Instance Method Details
#fees(market_id) ⇒ Object
29 30 31 |
# 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) ⇒ Object
13 14 15 |
# File 'lib/cryptsy/api2/markets.rb', line 13 def info(market_id) Request.send("markets/#{market_id}") end |
#list ⇒ Object
9 10 11 |
# File 'lib/cryptsy/api2/markets.rb', line 9 def list Request.send("markets") end |
#ohlc(market_id, options = {}) ⇒ Object
45 46 47 |
# File 'lib/cryptsy/api2/markets.rb', line 45 def ohlc(market_id, ={}) Request.send("markets/#{market_id}/ohlc", ) end |
#orderbook(market_id, options = {}) ⇒ Object
37 38 39 |
# File 'lib/cryptsy/api2/markets.rb', line 37 def orderbook(market_id, ={}) Request.send("markets/#{market_id}/orderbook", ) end |
#ticker(market_id = nil) ⇒ Object
23 24 25 26 27 |
# 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 = {}) ⇒ Object
41 42 43 |
# File 'lib/cryptsy/api2/markets.rb', line 41 def tradehistory(market_id, ={}) Request.send("markets/#{market_id}/tradehistory", ) end |