Class: Cryptsy::API2::User
- Inherits:
-
Object
- Object
- Cryptsy::API2::User
- Defined in:
- lib/cryptsy/api2/user.rb
Instance Method Summary collapse
- #addresses(currency_id = nil, options = {}) ⇒ Object
- #balances(currency_id = nil, options = {}) ⇒ Object
- #deposits(currency_id = nil, options = {}) ⇒ Object
- #info ⇒ Object
-
#initialize(public_key = nil, private_key = nil) ⇒ User
constructor
TODO: string to id conversion for currency_id.
- #orders(currency_id = nil, options = {}) ⇒ Object
- #tradehistory(options = {}) ⇒ Object
- #transfers(currency_id = nil, options = {}) ⇒ Object
- #triggers(currency_id = nil, options = {}) ⇒ Object
- #validatetradekey(tradekey) ⇒ Object
- #withdrawals(currency_id = nil, options = {}) ⇒ Object
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, ={}) path = "addresses" path += "/#{currency_id}" unless currency_id.nil? Request.send(path, , @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, ={}) path = "balances" path += "/#{currency_id}" unless currency_id.nil? Request.send(path, , @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, ={}) path = "deposits" path += "/#{currency_id}" unless currency_id.nil? Request.send(path, , @public_key, @private_key) end |
#info ⇒ Object
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, ={}) path = "orders" path += "/#{currency_id}" unless currency_id.nil? Request.send(path, , @public_key, @private_key) end |
#tradehistory(options = {}) ⇒ Object
45 46 47 |
# File 'lib/cryptsy/api2/user.rb', line 45 def tradehistory(={}) Request.send("tradehistory", , @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, ={}) path = "transfers" path += "/#{currency_id}" unless currency_id.nil? Request.send(path, , @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, ={}) path = "triggers" path += "/#{currency_id}" unless currency_id.nil? Request.send(path, , @public_key, @private_key) end |