ManageBuyOfferOperation
public class ManageBuyOfferOperation : ManageOfferOperation, @unchecked Sendable
Represents a Stellar manage buy offer operation creating or modifying offers with fixed buy amounts.
-
Creates a new ManageOfferOperation object.
Declaration
Parameters
sourceAccountId(optional) source account Id, must be valid, otherwise it will be ignored.
sellingAsset the offer creator is selling.
buyingAsset the offer creator is buying.
amountAmount of buying being bought. Set to 0 if you want to delete an existing offer.
pricePrice of 1 unit of buying in terms of selling. For example, if you wanted to buy 30 XLM and sell 5 BTC, the price would be {numerator, denominator} = {5,30}.
offerIdThe ID of the offer. 0 for new offer. Set to existing offer ID to update or delete. If you want to update an existing offer set Offer ID to existing offer ID. If you want to delete an existing offer set Offer ID to existing offer ID and set Amount to 0.
-
Creates a new ManageBuyOfferOperation object from the given ManageOfferOperationXDR object.
Declaration
Swift
public override init(fromXDR: ManageOfferOperationXDR, sourceAccountId: String?)Parameters
fromXDRthe ManageOfferOperationXDR object to be used to create a new ManageBuyOfferOperation object.
sourceAccountId(optional) source account Id, must be valid, otherwise it will be ignored.
View on GitHub
Install in Dash