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.



64
65
66
# File 'lib/bitstamp/orders.rb', line 64

def amount
  @amount
end

#datetimeObject

Returns the value of attribute datetime.



64
65
66
# File 'lib/bitstamp/orders.rb', line 64

def datetime
  @datetime
end

#errorObject

Returns the value of attribute error.



65
66
67
# File 'lib/bitstamp/orders.rb', line 65

def error
  @error
end

#idObject

Returns the value of attribute id.



64
65
66
# File 'lib/bitstamp/orders.rb', line 64

def id
  @id
end

#messageObject

Returns the value of attribute message.



65
66
67
# File 'lib/bitstamp/orders.rb', line 65

def message
  @message
end

#priceObject

Returns the value of attribute price.



64
65
66
# File 'lib/bitstamp/orders.rb', line 64

def price
  @price
end

#reasonObject

Returns the value of attribute reason.



64
65
66
# File 'lib/bitstamp/orders.rb', line 64

def reason
  @reason
end

#statusObject

Returns the value of attribute status.



64
65
66
# File 'lib/bitstamp/orders.rb', line 64

def status
  @status
end

#transactionsObject

Returns the value of attribute transactions.



64
65
66
# File 'lib/bitstamp/orders.rb', line 64

def transactions
  @transactions
end

#typeObject

Returns the value of attribute type.



64
65
66
# File 'lib/bitstamp/orders.rb', line 64

def type
  @type
end

Instance Method Details

#cancel!Object



67
68
69
# File 'lib/bitstamp/orders.rb', line 67

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