Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt

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

The lb_clmm IDL exposes many instructions. Integrators can choose to either use the TypeScript SDK for transaction construction or build through CPI.

Pool Creation

InstructionUse
initialize_lb_pairLegacy permissionless SPL Token pool creation.
initialize_lb_pair2Current permissionless v2 pool creation with Token-2022 support and PresetParameter2.
initialize_permission_lb_pairOperator-controlled pool creation for permissioned launches.
initialize_customizable_permissionless_lb_pairLegacy customizable permissionless pool creation for SPL Token pools.
initialize_customizable_permissionless_lb_pair2Current customizable permissionless pool creation with Token-2022 support.

Bin Arrays

InstructionUse
initialize_bin_arrayCreates a bin array and initializes bin prices.
initialize_bin_array_bitmap_extensionCreates the bitmap extension for far bin array indexes.
close_bin_arrayCloses an empty bin array.
initialize_bin_array is compute-heavy. If you construct it manually, add a compute budget instruction.

Positions

InstructionUse
initialize_positionLegacy position initialization.
initialize_position2Current idempotent PositionV2 initialization.
initialize_position_pdaInitializes a position PDA.
initialize_position_by_operatorOperator-driven position initialization.
increase_position_length / increase_position_length2Expands a dynamic position.
decrease_position_lengthShrinks a dynamic position.
update_position_operatorChanges the operator authority.
set_permissionless_operation_bitsEnables selected permissionless position actions.
close_position, close_position2, close_position_if_emptyClose position accounts when eligible.

Liquidity

Instruction familyUse
add_liquidity*Adds liquidity by explicit bin amounts, strategy, weights, or one-sided parameters.
add_liquidity*2v2 liquidity flows with Token-2022 and dynamic-position support.
remove_liquidity*Removes liquidity by bin amounts, range, or all liquidity.
rebalance_liquidityCombines add, remove, claim, resize, and shrink behavior in one flow.

Swaps

InstructionUse
swapLegacy exact-in swap.
swap2Current exact-in swap with Token-2022 account support.
swap_exact_out / swap_exact_out2Exact-out swap flows.
swap_with_price_impact / swap_with_price_impact2Swap with price-impact controls.

Fees And Rewards

InstructionUse
claim_fee / claim_fee2Claims swap fees for a position.
claim_reward / claim_reward2Claims one reward index for a position.
initialize_rewardInitializes a reward mint for liquidity mining pools.
fund_rewardFunds reward emissions.
update_reward_durationUpdates reward duration.
update_reward_funderUpdates reward funder.
withdraw_ineligible_rewardWithdraws undistributable rewards.

Limit Orders

InstructionUse
place_limit_orderPlaces an order at one or more bins.
cancel_limit_orderCancels an existing order.
close_limit_order_if_emptyCloses the account after all order bins are empty.