Skip to main content

Documentation Index

Fetch the complete documentation index at: https://v2-docs.exponent.finance/llms.txt

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

Raw Instructions

These are the low-level instruction builders generated by Codama from the Exponent CLMM program IDL. They provide direct access to every onchain instruction, requiring you to manually resolve all accounts and serialize arguments.
For most use cases, prefer the higher-level MarketThree Instructions which handle account resolution, address lookup tables, and CPI routing automatically.

Installation

npm install @exponent-labs/exponent-sdk @solana/web3.js @solana/codecs
All raw instructions are imported from the generated client:
import {
  createInitializeMarketInstruction,
  createDepositLiquidityInstruction,
  createTradePtInstruction,
  // ...
} from "@exponent-labs/exponent-sdk/client/clmm";

Core Instructions

Add Liquidity

Deposit Liquidity

Withdraw Liquidity

Trading Instructions

Trade PT

Trade PT Exact Out

Buy PT

Sell PT

Buy PT Exact Out

Sell PT Exact Out

Buy YT

Sell YT

Wrapper Instructions

These instructions combine multiple operations atomically (e.g., minting SY and providing liquidity in one transaction).

Wrapper Buy PT

Wrapper Sell PT

Wrapper Buy YT

Wrapper Sell YT

Wrapper Provide Liquidity

Wrapper Provide Liquidity Base

Wrapper Provide Liquidity Classic

Wrapper Withdraw Liquidity

Wrapper Withdraw Liquidity Classic

Farm Instructions

Market Accrue Emission