Turbos
  • 📖About Turbos
    • Getting Started
    • About Turbos Finance
    • Why Sui Network
  • 📽️Products
    • Concentrated Liquidity AMM
      • Fee Tier for Token Pairs
      • Oracle
    • Automated Rebalance Vault
      • Step-by-Step Guide
      • Referral Program
    • TurboStar
    • TurbosBoost
  • 💡Protocol Concepts
    • About Concentrated Liquidity
    • Fee Tiers
    • Glossary
  • 🪙Tokenomics
    • TURBOS
    • Token Utility
    • Emission Distribution
  • ⚙️Others
    • Roadmap
    • Audits
    • Brand kit
    • Risks
    • Contract Address
  • Developer Docs
    • Installation
    • Initialize SDK
    • Contract
      • getConfig
      • getFees
    • NFT
      • getOwner
      • getFields
      • getPositionFields
      • getPositionFieldsByPositionId
    • Pool
      • getPools
      • getPool
      • createPool
      • addLiquidity
      • increaseLiquidity
      • decreaseLiquidity
      • removeLiquidity
    • Trade
      • swap
      • computeSwapResultV2
    • Vault
      • createAndDepositVault
      • depositVault
      • withdrawVault
      • withdrawAllVault
      • collectClmmRewardDirectReturnVault
      • closeVault
      • computeTokenWithdrawVaultSwapResult
      • getVaultBalanceAmount
      • getMyVaults
  • 📱Socials
    • Official website
    • Twitter
    • Discord
    • Medium
    • Zealy
  • Tutorials
    • Supported Wallets
      • SafePal Wallet
    • Move tutorial
    • Sui tutorial
Powered by GitBook
On this page
  • Signature
  • Params
  • Examples
  1. Developer Docs
  2. Pool

createPool

Create a turbos pool

Signature

createPool(options: CreatePoolOptions): Promise<Transaction>

Params

interface CreatePoolOptions {
  // From sdk.contract.getFees()
  fee: Contract.Fee;
  // Coin type such as 0x2::sui::SUI
  coinTypeA: string;
  // Coin type such as 0x2::sui::SUI
  coinTypeB: string;
  // Amount of coin A
  amountA: string | number;
  // Amount of coin B
  amountB: string | number;
  // Represents the index of the lower tick boundary
  tickLower: number;
  // Represents the index of the upper tick boundary
  tickUpper: number;
  // Initial price
  sqrtPrice: string;
  // Creator wallet address
  address: string;
  // Acceptable wasted amount percentage. Range: [0, 100)
  slippage: string | number;
  // Expires timeout(ms), defaults 60_000
  deadline?: number;
  // Custom transaction handler
  txb?: Transaction;
}

Examples

const fees = await sdk.contract.getFees();

const tx = await sdk.pool.createPool({
  fee: fees[0],
  coinTypeA: '0x5d1f47ea69bb0de31c313d7acf89b890dbb8991ea8e03c6c355171f84bb1ba4a::turbos::TURBOS',
  coinTypeB: '0x2::sui::SUI',
  address: '0xc851a734b97870c41435b06c8254f1ef4cef0d53cfe1bcb0ba21a175b528311e',
  slippage: 0.5,
  ...
});
PreviousgetPoolNextaddLiquidity

Last updated 10 months ago