Class: Cryptsy::API2::Order

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Order.



4
5
6
7
# File 'lib/cryptsy/api2/order.rb', line 4

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

Instance Method Details

#create(options) ⇒ Object

Required Options: { marketid: 0, ordertype: ‘buy|sell’, quantity: 0.00, price: 0.00 }



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

def create(options)
  Request.send("order", options, @public_key, @private_key, "POST")
end

#delete(order_id) ⇒ Object



19
20
21
# File 'lib/cryptsy/api2/order.rb', line 19

def delete(order_id)
  Request.send("order/#{order_id}", {}, @public_key, @private_key, "DELETE")
end

#info(order_id) ⇒ Object



15
16
17
# File 'lib/cryptsy/api2/order.rb', line 15

def info(order_id)
  Request.send("order/#{order_id}", {}, @public_key, @private_key)
end