Class: Cryptsy::API2::User

Inherits:
Object
  • Object
show all
Defined in:
lib/cryptsy/api2/user.rb

Instance Method Summary collapse

Constructor Details

#initialize(public_key = nil, private_key = nil) ⇒ User

TODO: string to id conversion for currency_id



6
7
8
9
# File 'lib/cryptsy/api2/user.rb', line 6

def initialize(public_key=nil, private_key=nil)
  @public_key = public_key
  @private_key = private_key
end

Instance Method Details

#addresses(currency_id = nil, options = {}) ⇒ Object



27
28
29
30
31
# File 'lib/cryptsy/api2/user.rb', line 27

def addresses(currency_id=nil, options={})
  path = "addresses"
  path += "/#{currency_id}" unless currency_id.nil?
  Request.send(path, options, @public_key, @private_key)
end

#balances(currency_id = nil, options = {}) ⇒ Object



15
16
17
18
19
# File 'lib/cryptsy/api2/user.rb', line 15

def balances(currency_id=nil, options={})
  path = "balances"
  path += "/#{currency_id}" unless currency_id.nil?
  Request.send(path, options, @public_key, @private_key)
end

#deposits(currency_id = nil, options = {}) ⇒ Object



21
22
23
24
25
# File 'lib/cryptsy/api2/user.rb', line 21

def deposits(currency_id=nil, options={})
  path = "deposits"
  path += "/#{currency_id}" unless currency_id.nil?
  Request.send(path, options, @public_key, @private_key)
end

#infoObject



11
12
13
# File 'lib/cryptsy/api2/user.rb', line 11

def info
  Request.send("info", {}, @public_key, @private_key)
end

#orders(currency_id = nil, options = {}) ⇒ Object



33
34
35
36
37
# File 'lib/cryptsy/api2/user.rb', line 33

def orders(currency_id=nil, options={})
  path = "orders"
  path += "/#{currency_id}" unless currency_id.nil?
  Request.send(path, options, @public_key, @private_key)
end

#tradehistory(options = {}) ⇒ Object



45
46
47
# File 'lib/cryptsy/api2/user.rb', line 45

def tradehistory(options={})
  Request.send("tradehistory", options, @public_key, @private_key)
end

#transfers(currency_id = nil, options = {}) ⇒ Object



53
54
55
56
57
# File 'lib/cryptsy/api2/user.rb', line 53

def transfers(currency_id=nil, options={})
  path = "transfers"
  path += "/#{currency_id}" unless currency_id.nil?
  Request.send(path, options, @public_key, @private_key)
end

#triggers(currency_id = nil, options = {}) ⇒ Object



39
40
41
42
43
# File 'lib/cryptsy/api2/user.rb', line 39

def triggers(currency_id=nil, options={})
  path = "triggers"
  path += "/#{currency_id}" unless currency_id.nil?
  Request.send(path, options, @public_key, @private_key)
end

#validatetradekey(tradekey) ⇒ Object



49
50
51
# File 'lib/cryptsy/api2/user.rb', line 49

def validatetradekey(tradekey)
  Request.send("validatetradekey", { tradekey: tradekey }, @public_key, @private_key)
end

#withdrawals(currency_id = nil, options = {}) ⇒ Object



59
60
61
62
63
# File 'lib/cryptsy/api2/user.rb', line 59

def withdrawals(currency_id=nil, options={})
  path = "withdrawals"
  path += "/#{currency_id}" unless currency_id.nil?
  Request.send(path, options, @public_key, @private_key)
end