This guide provides instructions on how to get started with building on Meteora’s DLMM program using the DLMM TypeScript SDK.Before you begin, here are some important resources:
Once installed, you can initialize the DLMM client in your Node.js project like this:
Copy
Ask AI
import DLMM from '@meteora-ag/dlmm'import { Connection, PublicKey } from '@solana/web3.js';const mainnetConnection = new Connection('https://api.mainnet-beta.solana.com');// Create pool instances// e.g. creating a DLMM pool// You can get your desired pool address from the API https://dlmm-api.meteora.ag/pair/allconst USDC_USDT_POOL_ADDRESS = new PublicKey('ARwi1S4DaiTG5DX7S4M4ZsrXqpMD1MrTmbu9ue2tpmEq')const dlmmPool = await DLMM.create(connection, USDC_USDT_POOL_ADDRESS);// e.g. creating multiple poolsconst dlmmMultiplePools = await DLMM.createMultiple(connection, [USDC_USDT_POOL_ADDRESS, ...otherPoolAddresses]);