Class: Bitex::OrderBase
- Inherits:
-
Object
- Object
- Bitex::OrderBase
- Defined in:
- lib/bitex/order.rb
Overview
Base class for Bids and Asks
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#issuer ⇒ Object
Returns the value of attribute issuer.
-
#price ⇒ Object
Returns the value of attribute price.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#specie ⇒ Object
Returns the value of attribute specie.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
-
.active ⇒ Object
Returns an array with all your active orders of this type Uses Bitex::Order.active under the hood.
-
.all ⇒ Object
Returns an array with all your active orders of this type, and any other order of this type that was active in the last 2 hours.
-
.find(id) ⇒ Object
Find an order in your list of active orders.
Instance Method Summary collapse
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/bitex/order.rb', line 6 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/bitex/order.rb', line 5 def id @id end |
#issuer ⇒ Object
Returns the value of attribute issuer.
11 12 13 |
# File 'lib/bitex/order.rb', line 11 def issuer @issuer end |
#price ⇒ Object
Returns the value of attribute price.
8 9 10 |
# File 'lib/bitex/order.rb', line 8 def price @price end |
#reason ⇒ Object
Returns the value of attribute reason.
10 11 12 |
# File 'lib/bitex/order.rb', line 10 def reason @reason end |
#specie ⇒ Object
Returns the value of attribute specie.
7 8 9 |
# File 'lib/bitex/order.rb', line 7 def specie @specie end |
#status ⇒ Object
Returns the value of attribute status.
9 10 11 |
# File 'lib/bitex/order.rb', line 9 def status @status end |
Class Method Details
.active ⇒ Object
Returns an array with all your active orders of this type Uses Bitex::Order.active under the hood.
22 23 24 |
# File 'lib/bitex/order.rb', line 22 def self.active Order.active.select{|o| o.is_a?(self) } end |
.all ⇒ Object
Returns an array with all your active orders of this type, and any other order of this type that was active in the last 2 hours. Uses Bitex::Order.all under the hood.
16 17 18 |
# File 'lib/bitex/order.rb', line 16 def self.all Order.all.select{|o| o.is_a?(self) } end |
.find(id) ⇒ Object
Find an order in your list of active orders. Uses Bitex::Order.active under the hood.
28 29 30 |
# File 'lib/bitex/order.rb', line 28 def self.find(id) from_json(Api.private(:get, "/private#{base_path}/#{id}")) end |