Integrating Cetus-CLMM-SUI-SDK: A Comprehensive Guide, Please see details in document.
Explore the document »
View Demo
·
Report Bug
·
- The contract address available for reference cetus-developer-docs.
simulationAccount
used to simulate trades and obtain tick data.- Notes: Please exercise caution when using a mainnet network account with assets as your
simulationAccount
.
Cetus-CLMM-SUI-SDK is the official software development kit (SDK) specifically designed for seamless integration with Cetus-CLMM. It provides developers with the necessary tools and resources to easily connect and interact with Cetus-CLMM, enabling the development of robust and efficient applications.
To integrate our SDK into your local project, please follow the example steps provided below. Please see details in document.
- npm
npm i @cetusprotocol/cetus-sui-clmm-sdk
-
Initialize testnet (or mainnet) SdkOption
NOTICE
- In this example, the contract address version may backward, please use the latest clmmpool and integrate address.
simulationAccount
should be add an account address with a small amount of assets, it used to do estimated or other query object from.
-
Instantiate one CetusClmmSDK
Now, you can start using Cetus SDK.
»»» See details in development document.
- Retrieve data 1.1 Retrieve clmm pools 1.2 Retrieve positions 1.3 Retrieve reward 1.4 Retrieve ticks
- Pools and postions 2.1 Create clmm pool 2.2 Open position 2.3 Add liquidity 2.4 Remove liquidity 2.5 Close position 2.6 Collect fees 2.7 Collect rewards
- Swap 3.1 Swap 3.2 Partner swap 3.3 Smart router v1 3.4 Smart router v2 3.5 Price impact 3.6 Minimum received & Maximum sold 3.7 Fee
- Liquidity correlation calculation 4.1 Liquidity correlation calculation
CETUS-SUI-SDK released under the Apache license. See the LICENSE file for details.