Class Offer
The Offer object type describes an offer to exchange currencies, more traditionally known as an order, in the XRP Ledger's distributed exchange.
An OfferCreate transaction only creates an Offer object in the ledger when the offer cannot be fully executed
immediately by consuming other offers already in the ledger.
Inheritance
Namespace: Xrpl.Models.Transactions
Assembly: Xrpl.dll
Syntax
public class Offer
Constructors
| Edit this page View SourceOffer()
Declaration
public Offer()
Properties
| Edit this page View SourceAccount
The address of the account that placed this Offer.
Declaration
public string Account { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
AmountEach
The exchange rate, as the ratio taker_gets divided by taker_pays.
Declaration
public decimal AmountEach { get; }
Property Value
| Type | Description |
|---|---|
| decimal |
BookDirectory
The ID of the Offer Directory that links to this Offer.
Declaration
public string BookDirectory { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
BookNode
A hint indicating which page of the Offer Directory links to this object, in case the directory consists of multiple pages.
Declaration
public string BookNode { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Expiration
The time this Offer expires, in seconds since the Ripple Epoch.
Declaration
[JsonConverter(typeof(RippleDateTimeConverter))]
public DateTime? Expiration { get; set; }
Property Value
| Type | Description |
|---|---|
| Nullable |
Flags
A bit-map of boolean flags enabled for this Offer.
Declaration
public OfferFlags Flags { get; set; }
Property Value
| Type | Description |
|---|---|
| OfferFlags |
Index
Declaration
[JsonPropertyName("index")]
public string Index { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
LedgerEntryType
The value 0x006F, mapped to the string Offer, indicates that this object describes an order to trade currency.
Declaration
[JsonConverter(typeof(LedgerEntryTypeConverter))]
public LedgerEntryType LedgerEntryType { get; set; }
Property Value
| Type | Description |
|---|---|
| LedgerEntryType |
OwnerFunds
Amount of the TakerGets currency the side placing the offer has available to be traded.
(XRP is represented as drops; any other currency is represented as a decimal value.
) If a trader has multiple offers in the same book, only the highest-ranked offer includes this field.
Declaration
[JsonPropertyName("owner_funds")]
public string OwnerFunds { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
OwnerNode
A hint indicating which page of the Owner Directory links to this object, in case the directory consists of multiple pages.
Declaration
public string OwnerNode { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
PreviousTxnID
The identifying hash of the transaction that most recently modified this object.
Declaration
[JsonPropertyName("PreviousTxnID")]
public string PreviousTxnID { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
PreviousTxnLgrSeq
The index of the ledger that contains the transaction that most recently modified this object.
Declaration
[JsonPropertyName("PreviousTxnLgrSeq")]
public uint PreviousTxnLgrSeq { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
Quality
The exchange rate, as the ratio taker_pays divided by taker_gets.
For fairness, offers that have the same quality are automatically taken first-in, first-out.
Declaration
[JsonPropertyName("quality")]
public decimal? Quality { get; set; }
Property Value
| Type | Description |
|---|---|
| decimal? |
Sequence
The Sequence value of the OfferCreate transaction that created this Offer object.
Used in combination with the Account to identify this Offer.
Declaration
public uint Sequence { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
TakerGets
The remaining amount and type of currency being provided by the Offer creator.
Declaration
[JsonConverter(typeof(CurrencyConverter))]
public Currency TakerGets { get; set; }
Property Value
| Type | Description |
|---|---|
| Currency |
TakerGetsFunded
The maximum amount of currency that the taker can get, given the funding status of the offer.
Declaration
[JsonPropertyName("taker_gets_funded")]
[JsonConverter(typeof(CurrencyConverter))]
public Currency TakerGetsFunded { get; set; }
Property Value
| Type | Description |
|---|---|
| Currency |
TakerPays
The remaining amount and type of currency requested by the Offer creator.
Declaration
[JsonConverter(typeof(CurrencyConverter))]
public Currency TakerPays { get; set; }
Property Value
| Type | Description |
|---|---|
| Currency |
TakerPaysFunded
The maximum amount of currency that the taker would pay, given the funding status of the offer.
Declaration
[JsonPropertyName("taker_pays_funded")]
[JsonConverter(typeof(CurrencyConverter))]
public Currency TakerPaysFunded { get; set; }
Property Value
| Type | Description |
|---|---|
| Currency |