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.

Track DLMM releases here.
lb_clmm 0.12.0
Limit Orders and Quote Token Fee
Mainnet deployment for Release 0.12.0 is planned for May 21, 2026, at 11:00 AM UTC+8 (Wednesday).
Breaking release. If you build swap instructions manually, run DLMM swap quotes, or index certain DLMM events, please plan an upgrade before mainnet deployment.

Release summary

ComponentVersionPR
Program0.12.0
TypeScript SDK1.9.8dlmm-sdk #273
CLI0.6.3dlmm-sdk #273
Commons0.3.3dlmm-sdk #273

What We Shipped

  • Limit Orders
  • Quote Token Fee

What To Do

IntegratorsWhat ChangedWhat To Do
Swap Routers
  • Swap quote computation
  • swap and swap2 bitmap extension mutability
  • Remaining-accounts layout changed
  • If you are using the Typescript SDK, upgrade to @meteora-ag/dlmm@1.9.5-rc.4 to test.
  • If you are using Rust, update your quote logic based on the new quote math in commons@0.3.3
  • Mark bitmap extension writable on swap / swap2
  • If you are using host_fee_in account that is Token-2022 mint with Transfer Hook, add TransferHookReferral and any transfer-hook accounts
Trading Terminals
  • FeeParameterUpdate event parsing
  • Swap2Evt event parsing
  • Update your event parsing logic to decode the updated events
Partners
  • New limit order functions
  • Breaking changes to createCustomizablePermissionlessLbPair and getPairPubkeyIfExists
  • Swap quote computation
  • Bump your SDK version to @meteora-ag/dlmm@1.9.5-rc.4 to start testing.

Program: lb_clmm 0.12.0

Program ID (mainnet and devnet): LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo

Added

  • New endpoint add_liquidity_by_weight2, that is same as add_liquidity_by_weight but supports token2022
  • New endpoint set_permissionless_operation_bits to allow position owner to enable permissionless authorization on some operations such as claim_fee
  • New endpoint place_limit_order to allow user to place limit orders for either bid or ask side.
  • New endpoint cancel_limit_order to cancel limit order.
  • New endpoint close_limit_order_if_empty to close a limit order if it’s empty.
  • New endpoint close_bin_array to close an invalid bin array.
  • Account PresetParameter added new collect_fee_mode field. All the existing PresetParameter account will have default CollectFeeMode::OnlyInput.
  • Account LbPair::StaticParameters added new collect_fee_mode field. All existing LbPair account will have default CollectFeeMode::OnlyInput.

Changed

  • Allow permissionless claim_fee if position owner enabled it
  • All the existing LbPair accounts without any liquidity mining rewards will be defaulted to limit order supported pool and doesn’t support LM anymore. This is not revert-able.
  • Updated initialize_permissioned_lb_pair parameter InitPermissionPairIx field protocol_share to padding0 because it was no longer in use
  • Endpoint go_to_a_bin will revert if the pool is disabled / before activation. The restriction can be bypassed by operator by passing operator associated accounts through remaining accounts.

Removed

  • Remove endpoint reset_pool_tombstone_fields, reset_bin_array_tombstone_fields, reset_position_tombstone_fields

Breaking Changes

  • Endpoint initialize_preset_parameter added new collect_fee_mode field.
  • Endpoint initialize_preset_parameter field function_type enum type has been changed to concrete_function_type.
  • Enum FunctionType no longer defaulted to FunctionType::LiquidityMining. All existing on chain LbPair account will defaulted to FunctionType::Undetermined. With FunctionType::Undetermined, if there’s liquidity reward initialized, it will be FunctionType::LiquidityMining, else will be FunctionType::LimitOrder
  • Swap quote mechanism due to introducing of collect fee mode on in/out side, and limit order mechanism. Affected endpoints are swap, swap_exact_out, swap_with_price_impact, swap2, swap_exact_out2 and swap_with_price_impact2.
  • Due to new limit order logic (consuming more CU), max bins to swap in 1 instruction changes from 280 bins to 260 bins
  • Endpoint swap and swap2 bitmap extension account will be mutable due to limit order logic require flipping of liquidity tracking bits.
  • Event FeeParameterUpdate added new field base_fee_power_factor
  • AccountsType enum variants introduces TransferHookReferral. Clients building swap2, swap_exact_out2 and swap_with_price_impact2 instructions must update their RemainingAccountsInfo slices to include AccountsType::TransferHookReferral when the swap has host_fee_in account. Additionally, any required transfer hook accounts for the referral mint must also be provided in the instruction.
pub enum ConcreteFunctionType {
  LimitOrder = 0,
  LiquidityMining = 1,
}

pub enum CollectFeeMode {
  InputOnly = 0,
  OnlyY = 1,
}

TypeScript SDK: @meteora-ag/dlmm 1.9.8

SDK PR #273

Added

  • Added function placeLimitOrder to place a new limit order. Only applicable for pair with function type of LimitOrder.
  • Added function cancelLimitOrder to cancel an existing limit order.
  • Added function closeLimitOrderIfEmpty to close a limit order if it’s empty.
  • Added function enablePositionPermissionlessClaimFee. This allow non position owner to invoke claim fee instruction for other’s position.
  • Added function getLimitOrderByUserAndLbPair to get all limit orders of a user for a given pair.
  • Added function getLimitOrder to get limit order data by limit order pubkey.
  • Added function addLiquidityByWeight2 which support token 2022 add liquidity by weight.
  • Added function quoteCreateLimitOrder which returns the cost for creating a Limit Order

Breaking Changes

  • Added concreteFunctionType, collectFeeMode parameters in createCustomizablePermissionlessLbPair function. This allow user to create pair with function of LimitOrder or LiquidityMining and collect fee in InputToken, or TokenY (single sided fee).
  • Added concreteFunctionType, collectFeeMode parameters in getPairPubkeyIfExists function. This allow user to query existing pair with addition filter of function type and collect fee mode.

Removed

  • Position type (v1) removed, there’s no more v1 position on chain anymore.
  • updateBinArray function removed since it’s not used anywhere.

Changes

  • Update logic of swapQuote and swapQuoteExactOut to limit order and collect fee mode.
  • swapExactOutQuoteAtBin function’s ‘amountIn` now include fee.

CLI: 0.6.3

CLI PR #273

Added

  • Added place_limit_order command to place limit orders
  • Added cancel_limit_order command to cancel existing limit orders
  • Added close_limit_order_if_empty command to close empty limit order account
  • Added get_limit_orders command to query limit orders for a user on a specific pair
  • Added set_permissionless_operation_bits command to set operation bits on a position

Commons: 0.3.3

Commons PR #273

Added

  • Added DynamicPosition in dynamic_position.rs to support parsing on position account
  • Added LimitOrder in limit_order.rs to support parsing on limit order account

Changed

  • quote_exact_in() and quote_exact_out() now support limit order liquidity