Skip to main content

Documentation Index

Fetch the complete documentation index at: https://kamino.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Kamino Liquidity provides access to automated concentrated liquidity strategies on Solana via a TypeScript SDK and public API. A strategy manages a CLMM position for a token pair within a defined price range, handling rebalancing, fee compounding, and reward collection. Depositors receive kTokens, which represent a proportional share of the strategy and are redeemable for the underlying assets based on the current share price.
Providing liquidity carries impermanent loss risk — see Liquidity Concepts for the full explanation before integrating.

Key Components of Liquidity Integration

Strategy Operations

Two-sided and single-sided deposits, partial and full withdrawals, with ATA management and lookup-table resolution handled by the SDK.

Position Tracking

User share holdings, USD valuation, pending fees and rewards, PnL, and transaction history.

Strategy Analytics

Share price, TVL, APR/APY, price range, and historical metrics for charts and dashboards.

Integration Options

Public API

Read-only access to strategy metrics, historical performance, user PnL, fees and rewards, and transaction history. Language-agnostic REST endpoints.

TypeScript SDK

On-chain reads and transaction building for deposits, withdrawals, and position tracking. TS/JS only.

Deposit

import { createSolanaRpc, address } from '@solana/kit';
import { Kamino } from '@kamino-finance/kliquidity-sdk';
import Decimal from 'decimal.js';

const rpc = createSolanaRpc('https://api.mainnet-beta.solana.com');
const kamino = new Kamino('mainnet-beta', rpc);

const STRATEGY = address('CEz5keL9hBCUbtVbmcwenthRMwmZLupxJ6YtYAgzp4ex');
const strategyState = (await kamino.getStrategiesWithAddresses([STRATEGY]))[0];

// Single-sided deposit: 2 USDC with 100 bps slippage. The SDK swaps half
// the input into the other side via Jupiter v6 before depositing.
const { instructions, lookupTablesAddresses } =
  await kamino.singleSidedDepositTokenB(
    { address: STRATEGY, strategy: strategyState.strategy },
    new Decimal(2.0),
    signer, // TransactionSigner
    new Decimal(100),
  );

console.log('Deposit Instructions:', instructions);
View Code
For the full deposit flow including lookup-table resolution and transaction confirmation, see Deposit Operations.

Withdraw

import { createSolanaRpc, address } from '@solana/kit';
import { Kamino } from '@kamino-finance/kliquidity-sdk';

const rpc = createSolanaRpc('https://api.mainnet-beta.solana.com');
const kamino = new Kamino('mainnet-beta', rpc);

const STRATEGY = address('CEz5keL9hBCUbtVbmcwenthRMwmZLupxJ6YtYAgzp4ex');
const strategy = await kamino.getStrategyByAddress(STRATEGY);
const strategyWithAddress = { strategy, address: STRATEGY };

// Burn all shares and receive Token A + Token B back to the user's ATAs.
const bundle = await kamino.withdrawAllShares(
  strategyWithAddress,
  signer, // TransactionSigner
);

console.log('Withdraw Instructions:', bundle?.withdrawIx);
View Code
For the full withdraw flow including ATA setup, lookup-table resolution, and transaction confirmation, see Withdraw Operations.

What’s Covered

Strategy Data

List strategies, read share price, TVL, APR/APY, price range, and token balances.

User Position Data

Fetch user positions, USD valuation, pending fees and rewards, and PnL.

Deposit

Two-sided deposits and single-sided deposits via auto-swap.

Withdraw

Withdraw a specific share amount or close the full position.

Fetch Data via the API

Access strategy metrics and performance data through REST endpoints.

Kliquidity SDK repository

Explore the SDK source, on-chain program docs, and example scripts.

NPM SDK package

Install the TypeScript SDK to integrate liquidity operations.

Liquidity Concepts

AMMs, concentrated liquidity, impermanent loss, and kTokens explained.