Liquidity Pools Request Builder
Builds requests connected to liquidity pools.
Liquidity pools enable automated market makers (AMMs) on the Stellar network, allowing users to deposit assets and earn fees from trades.
Example usage:
val server = HorizonServer("https://horizon.stellar.org")
// Get a specific liquidity pool by ID
val pool = server.liquidityPools()
.liquidityPool("67260c4c1807b262ff851b0a3fe141194936bb0215b2f77447f1df11998eabb9")
// Get liquidity pools for specific reserves
val pools = server.liquidityPools()
.forReserves(
"EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S",
"native"
)
.limit(20)
.execute()
// Get liquidity pools an account is participating in
val accountPools = server.liquidityPools()
.forAccount("GCDNJUBQSX7AJWLJACMJ7I4BC3Z47BQUTMHEICZLE6MU4KQBRYG5JY6B")
.execute()See also
Functions
Sets the cursor parameter for pagination.
Build and execute request to get a page of liquidity pools.
Returns all liquidity pools the specified account is participating in.
Returns all liquidity pools that contain reserves in all specified assets.
Sets the limit parameter defining maximum number of liquidity pools to return.
Requests a specific liquidity pool by ID.
Sets the order parameter defining the order in which to return liquidity pools.
Creates a Server-Sent Events (SSE) stream for this request. The stream will automatically reconnect on connection loss and resume from the last received event.