TradeResponse
public struct TradeResponse : Decodable, Sendable
Represents a trade response. See Stellar developer docs
-
A list of links related to this trade.
Declaration
Swift
public let links: TradeLinksResponse -
Unique identifier for this trade.
Declaration
Swift
public let id: String -
Paging token suitable for use as a cursor parameter.
Declaration
Swift
public let pagingToken: String -
An ISO 8601 formatted string of when the ledger with this trade was closed.
Declaration
Swift
public let ledgerCloseTime: Date -
Type: “orderbook” or “liquidity_pool”
Declaration
Swift
public let tradeType: String -
if type is “orderbook”
Declaration
Swift
public let offerId: String? -
if type is “orderbook”
Declaration
Swift
public let baseOfferId: String? -
if type is “liquidity_pool”
Declaration
Swift
public let baseLiquidityPoolId: String? -
if type is “liquidity_pool”
Declaration
Swift
public let liquidityPoolFeeBp: Int? -
base party of this trade
Declaration
Swift
public let baseAccount: String? -
amount of base asset that was moved from base_account to counter_account
Declaration
Swift
public let baseAmount: String -
type of base asset
Declaration
Swift
public let baseAssetType: String -
code of base asset
Declaration
Swift
public let baseAssetCode: String? -
issuer of base asset
Declaration
Swift
public let baseAssetIssuer: String? -
if type is “orderbook”
Declaration
Swift
public let counterOfferId: String? -
counter party of this trade
Declaration
Swift
public let counterAccount: String? -
amount of counter asset that was moved from counter_account to base_account
Declaration
Swift
public let counterAmount: String -
type of counter asset
Declaration
Swift
public let counterAssetType: String -
code of counter asset
Declaration
Swift
public let counterAssetCode: String? -
issuer of counter asset
Declaration
Swift
public let counterAssetIssuer: String? -
if type is “liquidity_pool”
Declaration
Swift
public let counterLiquidityPoolId: String? -
An object of a number numerator and number denominator that represents the original offer price. To derive the price, divide n by d.
Declaration
Swift
public let price: TradePrice -
indicates which party of the trade made the sell offer
Declaration
Swift
public let baseIsSeller: Bool -
Initializer - creates a new instance by decoding from the given decoder.
Declaration
Swift
public init(from decoder: Decoder) throwsParameters
decoderThe decoder containing the data
View on GitHub
Install in Dash