Cetus
Create Pool CLMM
Learn how to create new pool clmm on Cetus
Create pool CLMM Cetus
Usage
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
coinTypeA | string | Yes | Address or symbol of the first token |
coinTypeB | string | Yes | Address or symbol of the second token |
initializePrice | number | Yes | Initial price for the token pair |
tickSpacing | number | Yes | The spacing between ticks in the liquidity pool |
inputTokenAmount | number | Yes | Amount of tokens to be provided as input |
isTokenAInput | boolean | Yes | true means fixed coinA amount, false means fixed coinB amount |
slippage | number | Yes | Maximum allowable slippage (e.g., 0.07 for 7%) |
Example Prompts
Natural Language Prompts
LangChain Tool Prompts
Example Implementation
Implementation Details
- Initialize the sqrt price and current tick index based on initializePrice
- Build the tick range
- Estimate liquidity and token amounts from a single input
- Calculate the required amounts of Token A and Token B
- Once all parameters are set, prepare the transaction payload
- Sign and execute the transactionn
Response Format
Error Handling
Best Practices
- Balance Verification
- Account for transaction fees
- Transaction Management
- Monitor transaction status
- Implement proper error handling
- Use appropriate commitment levels
- Security
- Verify transaction details
- Double-check amounts
- Keep private keys secure
- User Experience
- Show transaction progress
- Display staking rewards
Related Functions
- get_holding: Check token balances