Class: RippleRest::Order

Inherits:
RestObject show all
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

Method Summary

Methods inherited from RestObject

#initialize, #to_hash

Constructor Details

This class inherits a constructor from RippleRest::RestObject

Instance Attribute Details

#accountString<RippleAddress>

The Ripple account address of the order's creator


86
# File 'lib/ripple-rest/generated-schemas.rb', line 86

property :account, :RippleAddress

#base_amountAmount

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

#buyBoolean

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_replaceString

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_amountAmount

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_rateBigDecimal

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_timestampTime

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

#feeBigDecimal

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_killBoolean

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

#hashString<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_cancelBoolean

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

#ledgerString

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_timeoutString

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_sellBoolean

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

#previousOrder

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

#sequenceString

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]*$"]

#stateString

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$"]