OfferResponse

@Serializable
data class OfferResponse(val id: String, val pagingToken: String, val seller: String, val sellingAsset: Asset, val buyingAsset: Asset, val amount: String, val priceR: Price, val price: String, val lastModifiedLedger: Long? = null, val lastModifiedTime: String? = null, val sponsor: String? = null, val links: OfferResponse.Links) : Response, Pageable

Represents an offer response from the Horizon API.

An offer is an intent to trade one asset for another at a pre-determined exchange rate. Offers are created using the Manage Buy Offer or Manage Sell Offer operation.

See also

Constructors

Link copied to clipboard
constructor(id: String, pagingToken: String, seller: String, sellingAsset: Asset, buyingAsset: Asset, amount: String, priceR: Price, price: String, lastModifiedLedger: Long? = null, lastModifiedTime: String? = null, sponsor: String? = null, links: OfferResponse.Links)

Types

Link copied to clipboard
@Serializable
data class Links(val self: Link, val offerMaker: Link)

HAL links connected to this offer.

Properties

Link copied to clipboard
@SerialName(value = "amount")
val amount: String

The amount of selling being offered

Link copied to clipboard

Returns the buying asset as an SDK Asset object.

Link copied to clipboard
@SerialName(value = "buying")
val buyingAsset: Asset

The asset this offer wants to buy (nested JSON object)

Link copied to clipboard
@SerialName(value = "id")
val id: String

Unique identifier for this offer

Link copied to clipboard
@SerialName(value = "last_modified_ledger")
val lastModifiedLedger: Long?

The sequence number of the last ledger in which this offer was modified

Link copied to clipboard
@SerialName(value = "last_modified_time")
val lastModifiedTime: String?

An ISO 8601 formatted string of the last time this offer was modified

Link copied to clipboard
@SerialName(value = "_links")
val links: OfferResponse.Links

HAL links related to this offer

Link copied to clipboard
@SerialName(value = "paging_token")
open override val pagingToken: String

A cursor value for use in pagination

Link copied to clipboard
@SerialName(value = "price")
val price: String

The price to buy 1 unit of buying in terms of selling, as a string

Link copied to clipboard
@SerialName(value = "price_r")
val priceR: Price

The precise representation of buy and sell price as a rational number

Link copied to clipboard
@SerialName(value = "seller")
val seller: String

Account ID of the account making this offer

Link copied to clipboard

Returns the selling asset as an SDK Asset object.

Link copied to clipboard
@SerialName(value = "selling")
val sellingAsset: Asset

The asset this offer wants to sell (nested JSON object)

Link copied to clipboard
@SerialName(value = "sponsor")
val sponsor: String?

The account ID of the sponsor who is paying the reserves for this offer (optional)