Expand description
Raydium CLMM SDK
High-level SDK for interacting with Raydium Concentrated Liquidity Market Maker (CLMM). This SDK provides a convenient interface similar to Orca Whirlpools SDK.
§Architecture
- Core (
wp-solana-raydium-clmm-core): Pure plan layer, quote math, PDA derivation, tick utilities — zero I/O dependencies. - SDK (this crate): I/O layer — RPC fetching, orchestration, trait impls.
All pure types and functions are re-exported from core for backward compatibility so existing import paths continue to work.
Re-exports§
pub use harvester::RaydiumClmmHarvester;pub use infuser::RaydiumClmmInfuser;pub use position::fetch_positions_for_owner;pub use position::fetch_positions_in_pool;pub use position::PositionInfo;pub use position_viewer::common as position_viewer_common;pub use position_viewer::RaydiumClmmMultiPositionViewer;pub use position_viewer::RaydiumClmmPositionViewer;
Modules§
- discriminators
- Discriminator constants for Raydium CLMM events
- error
- Error types for the Raydium CLMM SDK
- fetch
- I/O-bound fetch modules: build plan-layer Snapshot structs by reading
on-chain state via
wp_solana_rpc::RpcContext. - harvester
- Raydium CLMM fee and reward harvester
- infuser
- Raydium CLMM Infuser implementation
- instructions
- Backward-compatible re-exports from
wp_solana_raydium_clmm_core::quote_math. - orchestrate
- Thin orchestrate-layer glue: fetch → plan → assemble → send.
- plan
- Pure plan-layer modules for Raydium CLMM operations.
- plan_
error - Error types for the plan / fetch / orchestrate layering.
- position
- Position fetching utilities for Raydium CLMM
- position_
viewer - Position viewer for Raydium CLMM positions
- quote_
math - Pure quote computation functions for Raydium CLMM.
- token
- Token account utilities for Raydium CLMM SDK.
- utils
- Utility functions for Raydium CLMM SDK.
Structs§
- Collect
Fees Quote - Result of fee calculation for a position
- Collect
Reward Quote - Result of reward calculation for a position
- Collect
Rewards Quote - Result of reward calculation for all rewards in a position
- Mint
AndAta - Per-mint state: the mint account itself, the ATA address, and the ATA account if it currently exists on chain.
- Token
Account State - On-chain state for an owner’s token accounts across a set of mints.
Enums§
- Fetch
Error - Errors produced by I/O-bound fetch functions.
- Orchestrate
Error - Plan
Error - Errors produced by pure planning functions.
- Raydium
Clmm Error - Errors that can occur when interacting with the Raydium CLMM SDK
- Token
Account Strategy - Strategy for token account creation.
Functions§
- calculate_
decrease_ liquidity_ quote - Calculates the liquidity quote for decreasing liquidity in a position.
- calculate_
increase_ liquidity_ quote - Calculates the liquidity quote for increasing liquidity in a position or opening a new position.
- collect_
fees_ quote - Calculate fees owed for a position
- collect_
rewards_ quote - Calculate rewards owed for a position
- get_
current_ transfer_ fee - Get the current transfer fee for a Token-2022 mint at a specific epoch.
Type Aliases§
- Token
Account Instructions - Type alias for
solana_token_toolkit::TokenAccountPlan.