Skip to content

CetusProtocol/cetus-clmm-sui-sdk

Repository files navigation

NPM npm GitHub Repo stars


Logo

Cetus-CLMM-SUI-SDK

Integrating Cetus-CLMM-SUI-SDK: A Comprehensive Guide, Please see details in document.
Explore the document »

View Demo · Report Bug ·

SDK configuration parameters

  • 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.

Introduction

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.

Getting Started

To integrate our SDK into your local project, please follow the example steps provided below. Please see details in document.

Prerequisites

  • npm
    npm i @cetusprotocol/cetus-sui-clmm-sdk

Setting Up Configuration

  1. Initialize testnet (or mainnet) SdkOption

    NOTICE

    1. In this example, the contract address version may backward, please use the latest clmmpool and integrate address.
    2. simulationAccount should be add an account address with a small amount of assets, it used to do estimated or other query object from.
  2. Instantiate one CetusClmmSDK

Now, you can start using Cetus SDK.

Features Available Right Now

»»» See details in development document.

  1. Retrieve data 1.1 Retrieve clmm pools 1.2 Retrieve positions 1.3 Retrieve reward 1.4 Retrieve ticks
  2. 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
  3. 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
  4. Liquidity correlation calculation 4.1 Liquidity correlation calculation

LICENSE

CETUS-SUI-SDK released under the Apache license. See the LICENSE file for details.