LiquidityPoolResponse

@Serializable
data class LiquidityPoolResponse(val id: String, val pagingToken: String, val feeBp: Int? = null, val type: String, val totalTrustlines: Long? = null, val totalShares: String, val reserves: List<LiquidityPoolResponse.Reserve> = emptyList(), val lastModifiedLedger: Long? = null, val lastModifiedTime: String? = null, val links: LiquidityPoolResponse.Links) : Response, Pageable

Represents a liquidity pool response from the Horizon API.

Liquidity pools enable automated market makers (AMMs) on the Stellar network, allowing users to deposit assets and earn fees from trades.

See also

Constructors

Link copied to clipboard
constructor(id: String, pagingToken: String, feeBp: Int? = null, type: String, totalTrustlines: Long? = null, totalShares: String, reserves: List<LiquidityPoolResponse.Reserve> = emptyList(), lastModifiedLedger: Long? = null, lastModifiedTime: String? = null, links: LiquidityPoolResponse.Links)

Types

Link copied to clipboard
@Serializable
data class Links(val self: Link, val operations: Link? = null, val transactions: Link? = null)

HAL links connected to this liquidity pool.

Link copied to clipboard
@Serializable
data class Reserve(val amount: String, val asset: String)

Represents liquidity pool reserves.

Properties

Link copied to clipboard
@SerialName(value = "fee_bp")
val feeBp: Int?

Fee in basis points charged for swaps (typically 30, which is 0.3%)

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

Unique identifier for this liquidity pool

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

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

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

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

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

HAL links related to this liquidity pool

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 = "reserves")
val reserves: List<LiquidityPoolResponse.Reserve>

The list of reserves held by this pool

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

The total number of pool shares issued

Link copied to clipboard
@SerialName(value = "total_trustlines")
val totalTrustlines: Long?

The number of trustlines to this liquidity pool

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

The type of liquidity pool (currently only "constant_product" is supported)