LiquidityPoolResponse

public struct LiquidityPoolResponse : Decodable, Sendable

Represents a liquidity pool response from the Horizon API. Liquidity pools are automated market makers that enable decentralized trading by maintaining reserves of two assets and allowing users to swap between them. See Stellar developer docs

  • A list of links related to this liquidity pool.

    Declaration

    Swift

    public let links: LiquidityPoolLinksResponse
  • Unique identifier for this liquidity pool.

    Declaration

    Swift

    public let poolId: String
  • fee

    The fee charged for swaps in this pool, in basis points.

    Declaration

    Swift

    public let fee: Int64
  • The type of liquidity pool. Currently only “constant_product” is supported.

    Declaration

    Swift

    public let type: String
  • The number of trustlines to this liquidity pool.

    Declaration

    Swift

    public let totalTrustlines: String
  • The total number of pool shares issued.

    Declaration

    Swift

    public let totalShares: String
  • The reserves of assets in this liquidity pool.

    Declaration

    Swift

    public let reserves: [ReserveResponse]
  • Paging token suitable for use as a cursor parameter.

    Declaration

    Swift

    public let pagingToken: String
  • The sequence number of the ledger in which this liquidity pool was last modified.

    Declaration

    Swift

    public let lastModifiedLedger: Int
  • An ISO 8601 formatted string of when this liquidity pool was last modified.

    Declaration

    Swift

    public let lastModifiedTime: String?
  • Initializer - creates a new instance by decoding from the given decoder.

    Declaration

    Swift

    public init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder containing the data