Class: Bitex::Bid
Overview
A Bid is an order to buy a given order book.
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.
-
#order_book ⇒ Symbol
:btc_usd or :btc_ars.
-
#price ⇒ BigDecimal
Maximum price to pay per unit.
-
#produced_quantity ⇒ BigDecimal
TODO: rever esta documentacion.
-
#reason ⇒ Object
The cancellation reason for this Bid, if any.
-
#remaining_amount ⇒ BigDecimal
Amount of USD left to be spent in this Bid.
-
#status ⇒ Object
The status of this Bid in its lifecycle.
Class Method Summary collapse
-
.create!(order_book, amount, price, wait = false) ⇒ Object
Create a new Bid for spending Amount USD paying no more than price per unit.
Methods inherited from BaseOrder
Instance Attribute Details
#amount ⇒ BigDecimal
Returns Amount of USD to spend in this Bid.
16 17 18 |
# File 'lib/bitex/bid.rb', line 16 def amount @amount end |
#created_at ⇒ Time
Returns Time when this Bid was created.
|
# File 'lib/bitex/bid.rb', line 8
|
#id ⇒ Integer
Returns This Bid’s unique ID.
|
# File 'lib/bitex/bid.rb', line 5
|
#issuer ⇒ String
Returns The issuer of this order, helps you tell apart orders created from the web UI and the API.
|
# File 'lib/bitex/bid.rb', line 45
|
#order_book ⇒ Symbol
Returns :btc_usd or :btc_ars.
|
# File 'lib/bitex/bid.rb', line 11
|
#price ⇒ BigDecimal
Returns Maximum price to pay per unit.
|
# File 'lib/bitex/bid.rb', line 22
|
#produced_quantity ⇒ BigDecimal
TODO: rever esta documentacion
43 44 45 |
# File 'lib/bitex/bid.rb', line 43 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/bid.rb', line 33
|
#remaining_amount ⇒ BigDecimal
Returns Amount of USD left to be spent in this Bid.
20 21 22 |
# File 'lib/bitex/bid.rb', line 20 def remaining_amount @remaining_amount end |
#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/bid.rb', line 25
|
Class Method Details
.create!(order_book, amount, price, wait = false) ⇒ Object
Create a new Bid for spending Amount USD paying no more than price per unit.
59 60 61 |
# File 'lib/bitex/bid.rb', line 59 def self.create!(order_book, amount, price, wait = false) super end |