Offer
The Offer
ledger entry describes an Offer to exchange currencies in Xahau's decentralized exchange. (In finance, this is more traditionally known as an order.) An [OfferCreate transaction][] only creates an Offer
entry in the ledger when the Offer cannot be fully executed immediately by consuming other Offers already in the ledger.
An Offer can become unfunded through other activities in the network while remaining in the ledger. When processing transactions, the network automatically prunes any unfunded Offers that those transactions come across. (Otherwise, unfunded Offers remain because only transactions can change the ledger state.)
Example JSON
Fields
An Offer
object has the following fields:
Offer Flags
There are several options that can be either enabled or disabled when an [OfferCreate transaction][] creates an offer object. In the ledger, flags are represented as binary values that can be combined with bitwise-or operations. The bit values for the flags in the ledger are different than the values used to enable or disable those flags in a transaction. Ledger flags have names that begin with lsf
.
Offer
objects can have the following flag values:
Offer ID Format
The ID of an Offer
object is the [SHA-512Half][] of the following values, concatenated in order:
The Offer space key (
0x006F
)The AccountID of the account placing the Offer
The Sequence number of the [OfferCreate transaction][] that created the Offer.
If the OfferCreate transaction used a Ticket, use the
TicketSequence
value instead.
Last updated