Class: RippleRest::Order
- Inherits:
-
RestObject
- Object
- RestObject
- RippleRest::Order
- Defined in:
- lib/ripple-rest/generated-schemas.rb,
lib/ripple-rest/generated-schemas.rb
Overview
A simplified Order object used by the ripple-rest API (note that “orders” are referred to elsewhere in the Ripple protocol as “offers”)
Instance Attribute Summary collapse
-
#account ⇒ String<RippleAddress>
The Ripple account address of the order’s creator.
-
#base_amount ⇒ Amount
The amount of currency the seller_account is seeking to buy.
-
#buy ⇒ Boolean
If set to true the order it indicates that the creator is looking to receive the base_amount in exchange for the counter_amount.
-
#cancel_replace ⇒ String
If this is set to the sequence number of an outstanding order, that order will be cancelled and replaced with this one.
-
#counter_amount ⇒ Amount
The amount of currency being sold.
-
#exchange_rate ⇒ BigDecimal
A string representation of the order price, defined as the cost one unit of the base currency in terms of the counter currency.
-
#expiration_timestamp ⇒ Time
The ISO combined date and time string representing the point beyond which the order will no longer be considered active or valid.
-
#fee ⇒ BigDecimal
The Ripple Network transaction fee, represented in whole XRP (NOT “drops”, or millionths of an XRP, which is used elsewhere in the Ripple protocol) used to create the order.
-
#fill_or_kill ⇒ Boolean
If set to true this order will only take orders that fill the base_amount and are available at the time of execution and will not create an entry in the Ripple Ledger.
-
#hash ⇒ String<Hash256>
When returned as the result of a historical query this will be the hash of Ripple transaction that created, modified, or deleted this order.
-
#immediate_or_cancel ⇒ Boolean
If set to true this order will only take orders that are available at the time of execution and will not create an entry in the Ripple Ledger.
-
#ledger ⇒ String
The string representation of the index number of the ledger containing this order or, in the case of historical queries, of the transaction that modified this Order.
-
#ledger_timeout ⇒ String
A string representation of the number of ledger closes after submission during which the order should be considered active.
-
#maximize_buy_or_sell ⇒ Boolean
If set to true and it is a buy order it will buy up to the base_amount even if the counter_amount is exceeded, if it is a sell order it will sell up to the counter_amount even if the base_amount is exceeded.
-
#previous ⇒ Order
If the order was modified or partially filled this will be a full Order object.
-
#sequence ⇒ String
The sequence number of this order from the perspective of the seller_account.
-
#state ⇒ String
If the order is active the state will be “active”.
Method Summary
Methods inherited from RestObject
Constructor Details
This class inherits a constructor from RippleRest::RestObject
Instance Attribute Details
#account ⇒ String<RippleAddress>
The Ripple account address of the order’s creator
86 |
# File 'lib/ripple-rest/generated-schemas.rb', line 86 property :account, :RippleAddress |
#base_amount ⇒ Amount
The amount of currency the seller_account is seeking to buy. If other orders take part of this one, this value will change to represent the amount left in the order. This may be specified along with the counter_amount OR exchange_rate but not both. When the order is parsed from the Ripple Ledger the base currency will be determined according to the Priority Ranking of Currencies (XRP,EUR,GBP,AUD,NZD,USD,CAD,CHF,JPY,CNY) and if neither currency is listed in the ranking the base currency will be the one that is alphabetically first
97 |
# File 'lib/ripple-rest/generated-schemas.rb', line 97 property :base_amount, :Amount |
#buy ⇒ Boolean
If set to true the order it indicates that the creator is looking to receive the base_amount in exchange for the counter_amount. If undefined or set to false it indicates that the creator is looking to sell the base_amount to receive the counter_amount
92 |
# File 'lib/ripple-rest/generated-schemas.rb', line 92 property :buy, :Boolean |
#cancel_replace ⇒ String
If this is set to the sequence number of an outstanding order, that order will be cancelled and replaced with this one
137 |
# File 'lib/ripple-rest/generated-schemas.rb', line 137 property :cancel_replace, [:String, "^d*$"] |
#counter_amount ⇒ Amount
The amount of currency being sold. If other orders take part of this one, this value will change to represent the amount left in the order. This may be specified along with the base_amount OR the exchange_rate but not both
102 |
# File 'lib/ripple-rest/generated-schemas.rb', line 102 property :counter_amount, :Amount |
#exchange_rate ⇒ BigDecimal
A string representation of the order price, defined as the cost one unit of the base currency in terms of the counter currency. This may be specified along with the base_amount OR the counter_amount but not both. If it is unspecified it will be computed automatically based on the counter_amount divided by the base_amount
107 |
# File 'lib/ripple-rest/generated-schemas.rb', line 107 property :exchange_rate, :FloatString |
#expiration_timestamp ⇒ Time
The ISO combined date and time string representing the point beyond which the order will no longer be considered active or valid
112 |
# File 'lib/ripple-rest/generated-schemas.rb', line 112 property :expiration_timestamp, :Timestamp |
#fee ⇒ BigDecimal
The Ripple Network transaction fee, represented in whole XRP (NOT “drops”, or millionths of an XRP, which is used elsewhere in the Ripple protocol) used to create the order
147 |
# File 'lib/ripple-rest/generated-schemas.rb', line 147 property :fee, :FloatString |
#fill_or_kill ⇒ Boolean
If set to true this order will only take orders that fill the base_amount and are available at the time of execution and will not create an entry in the Ripple Ledger
127 |
# File 'lib/ripple-rest/generated-schemas.rb', line 127 property :fill_or_kill, :Boolean |
#hash ⇒ String<Hash256>
When returned as the result of a historical query this will be the hash of Ripple transaction that created, modified, or deleted this order. The transaction hash is used throughout the Ripple Protocol to uniquely identify a particular transaction
162 |
# File 'lib/ripple-rest/generated-schemas.rb', line 162 property :hash, :Hash256 |
#immediate_or_cancel ⇒ Boolean
If set to true this order will only take orders that are available at the time of execution and will not create an entry in the Ripple Ledger
122 |
# File 'lib/ripple-rest/generated-schemas.rb', line 122 property :immediate_or_cancel, :Boolean |
#ledger ⇒ String
The string representation of the index number of the ledger containing this order or, in the case of historical queries, of the transaction that modified this Order.
157 |
# File 'lib/ripple-rest/generated-schemas.rb', line 157 property :ledger, [:String, "^[0-9]+$"] |
#ledger_timeout ⇒ String
A string representation of the number of ledger closes after submission during which the order should be considered active
117 |
# File 'lib/ripple-rest/generated-schemas.rb', line 117 property :ledger_timeout, [:String, "^[0-9]*$"] |
#maximize_buy_or_sell ⇒ Boolean
If set to true and it is a buy order it will buy up to the base_amount even if the counter_amount is exceeded, if it is a sell order it will sell up to the counter_amount even if the base_amount is exceeded
132 |
# File 'lib/ripple-rest/generated-schemas.rb', line 132 property :maximize_buy_or_sell, :Boolean |
#previous ⇒ Order
If the order was modified or partially filled this will be a full Order object. If the previous object also had a previous object that will be removed to reduce data complexity. Order changes can be walked backwards by querying the API for previous.hash repeatedly
167 |
# File 'lib/ripple-rest/generated-schemas.rb', line 167 property :previous, :Order |
#sequence ⇒ String
The sequence number of this order from the perspective of the seller_account. The seller_account and the sequence number uniquely identify the order in the Ripple Ledger
142 |
# File 'lib/ripple-rest/generated-schemas.rb', line 142 property :sequence, [:String, "^[0-9]*$"] |
#state ⇒ String
If the order is active the state will be “active”. If this object represents a historical order the state will be “validated”, “filled” if the order was removed because it was fully filled, “cancelled” if it was deleted by the owner, “expired” if it reached the expiration_timestamp, or “failed” if there was an error with the initial attempt to place the order
152 |
# File 'lib/ripple-rest/generated-schemas.rb', line 152 property :state, [:String, "^active|validated|filled|cancelled|expired|failed$"] |