Get Liquidity Pools
Fetch a paginated list of Stellar liquidity pools using the Blux core SDK.
The getLiquidityPools function returns a paginated list of Stellar liquidity pools.
The return value contains two properties:
response— the records you can use directlybuilder— exposesnext()andprev()to paginate through results
Type
export type CallBuilderOptions = {
cursor?: string;
limit?: number;
network?: string;
order?: "asc" | "desc";
};
type GetLiquidityPoolsOptions = CallBuilderOptions & {
forAssets?: Array<Asset>;
forAccount?: string;
};
type GetLiquidityPoolsResult = {
builder: LiquidityPoolCallBuilder;
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.LiquidityPoolRecord>;
};Usage
import { core } from "@bluxcc/core";
const result = await core.getLiquidityPools({});