Documentation
    Preparing search index...

    Function fetchConcentratedLiquidityPool

    • Fetches the details of a specific Concentrated Liquidity Pool.

      Parameters

      • rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi>

        The Solana RPC client.

      • tokenMintOne: Address

        The first token mint address in the pool.

      • tokenMintTwo: Address

        The second token mint address in the pool.

      • tickSpacing: number

        The tick spacing of the pool.

      • OptionalwhirlpoolDeployment: WhirlpoolDeployment = DEFAULT_WHIRLPOOL_DEPLOYMENT

        The whirlpool program and config to query against. Defaults to DEFAULT_WHIRLPOOL_DEPLOYMENT.

      Returns Promise<PoolInfo>

      • A promise that resolves to the pool information, which includes whether the pool is initialized or not.
      import { fetchConcentratedLiquidityPool, WhirlpoolDeployment } from '@orca-so/whirlpools';
      import { createSolanaRpc, devnet, address } from '@solana/kit';

      const devnetRpc = createSolanaRpc(devnet('https://api.devnet.solana.com'));

      const tokenMintOne = address("So11111111111111111111111111111111111111112");
      const tokenMintTwo = address("BRjpCHtyQLNCo8gqRUr8jtdAj5AjPYQaoqbvcZiHok1k");
      const tickSpacing = 64;

      const poolInfo = await fetchConcentratedLiquidityPool(
      devnetRpc,
      tokenMintOne,
      tokenMintTwo,
      tickSpacing,
      WhirlpoolDeployment.devnet,
      );

      if (poolInfo.initialized) {
      console.log("Pool is initialized:", poolInfo);
      } else {
      console.log("Pool is not initialized:", poolInfo);
      };