Learn how to work with DLMM pools using the Saros DLMM SDK with these complete examples.
import { LiquidityBookServices, MODE } from "@saros-finance/dlmm-sdk";
import { PublicKey } from "@solana/web3.js";
const liquidityBookServices = new LiquidityBookServices({
mode: MODE.DEVNET, // or MODE.MAINNET
});
async function getDLMMQuote() {
// ... (quote logic)
}
async function executeDLMMSwap() {
// ... (swap logic)
}
// ... (execution)