Class: Bitstamp::Order

Inherits:
Model
  • Object
show all
Defined in:
lib/bitstamp/orders.rb

Constant Summary collapse

BUY =
0
SELL =
1

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#attributes, #attributes=, #initialize

Constructor Details

This class inherits a constructor from Bitstamp::Model

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



34
35
36
# File 'lib/bitstamp/orders.rb', line 34

def amount
  @amount
end

#datetimeObject

Returns the value of attribute datetime.



34
35
36
# File 'lib/bitstamp/orders.rb', line 34

def datetime
  @datetime
end

#errorObject

Returns the value of attribute error.



35
36
37
# File 'lib/bitstamp/orders.rb', line 35

def error
  @error
end

#idObject

Returns the value of attribute id.



34
35
36
# File 'lib/bitstamp/orders.rb', line 34

def id
  @id
end

#messageObject

Returns the value of attribute message.



35
36
37
# File 'lib/bitstamp/orders.rb', line 35

def message
  @message
end

#priceObject

Returns the value of attribute price.



34
35
36
# File 'lib/bitstamp/orders.rb', line 34

def price
  @price
end

#typeObject

Returns the value of attribute type.



34
35
36
# File 'lib/bitstamp/orders.rb', line 34

def type
  @type
end

Instance Method Details

#cancel!Object



37
38
39
# File 'lib/bitstamp/orders.rb', line 37

def cancel!
  Bitstamp::Net::post('/cancel_order', {id: self.id}).body_str
end