Constants

PATTERN_TYPE_HASH256

PATTERN_TYPE_HASH256

The hex representation of a 256-bit hash

PATTERN_TYPE_HASH128

PATTERN_TYPE_HASH128

The hex representation of a 128-bit hash

PATTERN_TYPE_TIMESTAMP

PATTERN_TYPE_TIMESTAMP

An ISO 8601 combined date and time timestamp

PATTERN_TYPE_RIPPLEADDRESS

PATTERN_TYPE_RIPPLEADDRESS

A Ripple account address

PATTERN_TYPE_RESOURCEID

PATTERN_TYPE_RESOURCEID

A client-supplied unique identifier (ideally a UUID) for this transaction used to prevent duplicate payments and help confirm the transaction's final status. All ASCII printable characters are allowed. Note that 256-bit hex strings are disallowed because of the potential confusion with transaction hashes.

PATTERN_TYPE_FLOATSTRING

PATTERN_TYPE_FLOATSTRING

A string representation of a floating point number

PATTERN_TYPE_URL

PATTERN_TYPE_URL

A standard URL

PATTERN_TYPE_CURRENCY

PATTERN_TYPE_CURRENCY

The three-character code or hex string used to denote currencies

PATTERN_TYPE_UINT32

PATTERN_TYPE_UINT32

A string representation of an unsigned 32-bit integer (0-4294967295)

PATTERN_LEDGER_TIMEOUT

PATTERN_LEDGER_TIMEOUT

Pattern Rule for field `RippleRestOrder::$ledgerTimeout`

PATTERN_CANCEL_REPLACE

PATTERN_CANCEL_REPLACE

Pattern Rule for field `RippleRestOrder::$cancelReplace`

PATTERN_SEQUENCE

PATTERN_SEQUENCE

Pattern Rule for field `RippleRestOrder::$sequence`

PATTERN_STATE

PATTERN_STATE

Pattern Rule for field `RippleRestOrder::$state`

PATTERN_LEDGER

PATTERN_LEDGER

Pattern Rule for field `RippleRestOrder::$ledger`

Properties

$account

$account : string

(RippleAddress) The Ripple account address of the order's creator

Type

string

$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. If undefined or set to false it indicates that the creator is looking to sell the base_amount to receive the counter_amount

Type

boolean

$baseAmount

$baseAmount : \RippleRestAmount

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

Type

\RippleRestAmount

$counterAmount

$counterAmount : \RippleRestAmount

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

Type

\RippleRestAmount

$exchangeRate

$exchangeRate : string

(FloatString) 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

Type

string

$expirationTimestamp

$expirationTimestamp : string

(Timestamp) The ISO combined date and time string representing the point beyond which the order will no longer be considered active or valid

Type

string

$ledgerTimeout

$ledgerTimeout : string

(/^[0-9]*$/) A string representation of the number of ledger closes after submission during which the order should be considered active

Type

string

$immediateOrCancel

$immediateOrCancel : 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

Type

boolean

$fillOrKill

$fillOrKill : 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

Type

boolean

$maximizeBuyOrSell

$maximizeBuyOrSell : 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

Type

boolean

$cancelReplace

$cancelReplace : string

(/^d*$/) If this is set to the sequence number of an outstanding order, that order will be cancelled and replaced with this one

Type

string

$sequence

$sequence : string

(/^[0-9]*$/) 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

Type

string

$fee

$fee : string

(FloatString) 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

Type

string

$state

$state : string

(/^active|validated|filled|cancelled|expired|failed$/) 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

Type

string

$ledger

$ledger : string

(/^[0-9]+$/) 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.

Type

string

$hash

$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

Type

string

$previous

$previous : \RippleRestOrder

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

Type

\RippleRestOrder

Methods

__construct()

__construct(array $data) : \RippleRestOrder

Create a new instance of RippleRestOrder.

Parameters

array $data

(defaults to null) PHP Array (result of json_decode($json, true))

Returns

\RippleRestOrder

getAccount()

getAccount() : string

The Ripple account address of the order's creator

Returns

string —

(RippleAddress)

setAccount()

setAccount(string $value) : null

The Ripple account address of the order's creator

Parameters

string $value

(RippleAddress)

Returns

null

getBuy()

getBuy() : 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

Returns

boolean

setBuy()

setBuy(boolean $value) : null

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

Parameters

boolean $value

Returns

null

getBaseAmount()

getBaseAmount() : \RippleRestAmount

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

Returns

\RippleRestAmount

setBaseAmount()

setBaseAmount(\RippleRestAmount $value) : null

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

Parameters

\RippleRestAmount $value

Returns

null

getCounterAmount()

getCounterAmount() : \RippleRestAmount

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

Returns

\RippleRestAmount

setCounterAmount()

setCounterAmount(\RippleRestAmount $value) : null

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

Parameters

\RippleRestAmount $value

Returns

null

getExchangeRate()

getExchangeRate() : string

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

Returns

string —

(FloatString)

setExchangeRate()

setExchangeRate(string $value) : null

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

Parameters

string $value

(FloatString)

Returns

null

getExpirationTimestamp()

getExpirationTimestamp() : string

The ISO combined date and time string representing the point beyond which the order will no longer be considered active or valid

Returns

string —

(Timestamp)

setExpirationTimestamp()

setExpirationTimestamp(string $value) : null

The ISO combined date and time string representing the point beyond which the order will no longer be considered active or valid

Parameters

string $value

(Timestamp)

Returns

null

getLedgerTimeout()

getLedgerTimeout() : string

A string representation of the number of ledger closes after submission during which the order should be considered active

Returns

string —

(/^[0-9]*$/)

setLedgerTimeout()

setLedgerTimeout(string $value) : null

A string representation of the number of ledger closes after submission during which the order should be considered active

Parameters

string $value

(/^[0-9]*$/)

Returns

null

getImmediateOrCancel()

getImmediateOrCancel() : 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

Returns

boolean

setImmediateOrCancel()

setImmediateOrCancel(boolean $value) : null

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

Parameters

boolean $value

Returns

null

getFillOrKill()

getFillOrKill() : 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

Returns

boolean

setFillOrKill()

setFillOrKill(boolean $value) : null

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

Parameters

boolean $value

Returns

null

getMaximizeBuyOrSell()

getMaximizeBuyOrSell() : 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

Returns

boolean

setMaximizeBuyOrSell()

setMaximizeBuyOrSell(boolean $value) : null

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

Parameters

boolean $value

Returns

null

getCancelReplace()

getCancelReplace() : string

If this is set to the sequence number of an outstanding order, that order will be cancelled and replaced with this one

Returns

string —

(/^d*$/)

setCancelReplace()

setCancelReplace(string $value) : null

If this is set to the sequence number of an outstanding order, that order will be cancelled and replaced with this one

Parameters

string $value

(/^d*$/)

Returns

null

getSequence()

getSequence() : 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

Returns

string —

(/^[0-9]*$/)

setSequence()

setSequence(string $value) : null

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

Parameters

string $value

(/^[0-9]*$/)

Returns

null

getFee()

getFee() : string

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

Returns

string —

(FloatString)

setFee()

setFee(string $value) : null

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

Parameters

string $value

(FloatString)

Returns

null

getState()

getState() : 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

Returns

string —

(/^active|validated|filled|cancelled|expired|failed$/)

setState()

setState(string $value) : null

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

Parameters

string $value

(/^active|validated|filled|cancelled|expired|failed$/)

Returns

null

getLedger()

getLedger() : 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.

Returns

string —

(/^[0-9]+$/)

setLedger()

setLedger(string $value) : null

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.

Parameters

string $value

(/^[0-9]+$/)

Returns

null

getHash()

getHash() : string

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

Returns

string —

(Hash256)

setHash()

setHash(string $value) : null

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

Parameters

string $value

(Hash256)

Returns

null

getPrevious()

getPrevious() : \RippleRestOrder

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

Returns

\RippleRestOrder

setPrevious()

setPrevious(\RippleRestOrder $value) : null

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

Parameters

\RippleRestOrder $value

Returns

null

toArray()

toArray() : array

Convert this object to PHP native Array for serializing to JSON.

Returns

array