Class: Bitex::Bid
Overview
A Bid is an order to buy a given specie.
Instance Attribute Summary collapse
-
#amount ⇒ BigDecimal
Amount of USD to spend in this Bid.
-
#created_at ⇒ Time
Time when this Bid was created.
-
#id ⇒ Integer
This Bid’s unique ID.
-
#issuer ⇒ String
The issuer of this order, helps you tell apart orders created from the web UI and the API.
-
#price ⇒ BigDecimal
Maximum price to pay per unit.
-
#produced_quantity ⇒ BigDecimal
Quantity of specie produced by this bid so far.
-
#reason ⇒ Object
The cancellation reason for this Bid, if any.
-
#remaining_amount ⇒ BigDecimal
Amount of USD left to be spent in this Bid.
-
#specie ⇒ Symbol
:btc or :ltc.
-
#status ⇒ Object
The status of this Bid in its lifecycle.
Class Method Summary collapse
-
.create!(specie, amount, price, wait = false) ⇒ Object
Create a new Bid for spending Amount USD paying no more than price per unit.
Methods inherited from OrderBase
Instance Attribute Details
#amount ⇒ BigDecimal
Returns Amount of USD to spend in this Bid.
99 100 101 |
# File 'lib/bitex/order.rb', line 99 def amount @amount end |
#created_at ⇒ Time
Returns Time when this Bid was created.
|
|
# File 'lib/bitex/order.rb', line 91
|
#id ⇒ Integer
Returns This Bid’s unique ID.
|
|
# File 'lib/bitex/order.rb', line 88
|
#issuer ⇒ String
Returns The issuer of this order, helps you tell apart orders created from the web UI and the API.
|
|
# File 'lib/bitex/order.rb', line 127
|
#price ⇒ BigDecimal
Returns Maximum price to pay per unit.
|
|
# File 'lib/bitex/order.rb', line 105
|
#produced_quantity ⇒ BigDecimal
Returns Quantity of specie produced by this bid so far.
125 126 127 |
# File 'lib/bitex/order.rb', line 125 def produced_quantity @produced_quantity end |
#reason ⇒ Object
The cancellation reason for this Bid, if any.
-
: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 116
|
#remaining_amount ⇒ BigDecimal
Returns Amount of USD left to be spent in this Bid.
103 104 105 |
# File 'lib/bitex/order.rb', line 103 def remaining_amount @remaining_amount end |
#specie ⇒ Symbol
Returns :btc or :ltc.
|
|
# File 'lib/bitex/order.rb', line 94
|
#status ⇒ Object
The status of this Bid 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 Amount.
-
:completed Fully executed, Remaining Amount should be 0.
|
|
# File 'lib/bitex/order.rb', line 108
|
Class Method Details
.create!(specie, amount, price, wait = false) ⇒ Object
Create a new Bid for spending Amount USD paying no more than price per unit.
144 145 146 |
# File 'lib/bitex/order.rb', line 144 def self.create!(specie, amount, price, wait=false) super end |