Class: Bitex::Ask
Overview
An Ask is an order to sell a given specie.
Instance Attribute Summary collapse
-
#created_at ⇒ Time
Time when this Ask was created.
-
#id ⇒ Integer
This Ask’s unique ID.
-
#price ⇒ BigDecimal
Minimum price to charge per unit.
-
#quantity ⇒ BigDecimal
Quantity of specie to sell in this Ask.
-
#reason ⇒ Object
The cancellation reason of this Ask.
-
#remaining_quantity ⇒ BigDecimal
Quantity of specie left to sell in this Ask.
-
#specie ⇒ Symbol
:btc or :ltc.
-
#status ⇒ Object
The status of this Ask in its lifecycle.
Class Method Summary collapse
-
.create!(specie, quantity, price, wait = false) ⇒ Object
Create a new Ask for selling a Quantity of specie charging no less than Price per each.
Methods inherited from OrderBase
Instance Attribute Details
#created_at ⇒ Time
Returns Time when this Ask was created.
|
|
# File 'lib/bitex/order.rb', line 150
|
#id ⇒ Integer
Returns This Ask’s unique ID.
|
|
# File 'lib/bitex/order.rb', line 147
|
#price ⇒ BigDecimal
Returns Minimum price to charge per unit.
|
|
# File 'lib/bitex/order.rb', line 164
|
#quantity ⇒ BigDecimal
Returns Quantity of specie to sell in this Ask.
158 159 160 |
# File 'lib/bitex/order.rb', line 158 def quantity @quantity end |
#reason ⇒ Object
The cancellation reason of this Ask.
-
:not_cancelled Has not been cancelled.
-
:not_enough_funds Not enough funds to place this order.
-
:user_cancelled Cancelled per user’s request
-
:system_cancelled Bitex cancelled this order, for a good reason.
|
|
# File 'lib/bitex/order.rb', line 175
|
#remaining_quantity ⇒ BigDecimal
Returns Quantity of specie left to sell in this Ask.
162 163 164 |
# File 'lib/bitex/order.rb', line 162 def remaining_quantity @remaining_quantity end |
#specie ⇒ Symbol
Returns :btc or :ltc.
|
|
# File 'lib/bitex/order.rb', line 153
|
#status ⇒ Object
The status of this Ask in its lifecycle.
-
:received queued to check if you have enough funds.
-
:executing available in our ourderbook waiting to be matched.
-
:cancelling To be cancelled as soon as our trading engine unlocks it.
-
:cancelled no further executed. May have some Remaining Quantity.
-
:completed Fully executed, Remaining Quantity should be 0.
|
|
# File 'lib/bitex/order.rb', line 167
|
Class Method Details
.create!(specie, quantity, price, wait = false) ⇒ Object
Create a new Ask for selling a Quantity of specie charging no less than Price per each.
195 196 197 |
# File 'lib/bitex/order.rb', line 195 def self.create!(specie, quantity, price, wait=false) super end |