Class: Bitstamp::Order

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

Constant Summary collapse

MARKET_ORDER =
:market
LIMIT_ORDER =
:limit_order
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.



86
87
88
# File 'lib/bitstamp/orders.rb', line 86

def amount
  @amount
end

#datetimeObject

Returns the value of attribute datetime.



86
87
88
# File 'lib/bitstamp/orders.rb', line 86

def datetime
  @datetime
end

#errorObject

Returns the value of attribute error.



87
88
89
# File 'lib/bitstamp/orders.rb', line 87

def error
  @error
end

#idObject

Returns the value of attribute id.



86
87
88
# File 'lib/bitstamp/orders.rb', line 86

def id
  @id
end

#messageObject

Returns the value of attribute message.



87
88
89
# File 'lib/bitstamp/orders.rb', line 87

def message
  @message
end

#priceObject

Returns the value of attribute price.



86
87
88
# File 'lib/bitstamp/orders.rb', line 86

def price
  @price
end

#reasonObject

Returns the value of attribute reason.



87
88
89
# File 'lib/bitstamp/orders.rb', line 87

def reason
  @reason
end

#statusObject

Returns the value of attribute status.



86
87
88
# File 'lib/bitstamp/orders.rb', line 86

def status
  @status
end

#typeObject

Returns the value of attribute type.



86
87
88
# File 'lib/bitstamp/orders.rb', line 86

def type
  @type
end

Instance Method Details

#cancel!Object



89
90
91
# File 'lib/bitstamp/orders.rb', line 89

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