Getting Started
Quick Example
import { FerraDlmmSDK, BinMath } from '@ferra-labs/dlmm'
// Initialize SDK
const sdk = new FerraDlmmSDK({
network: 'mainnet',
fullNodeUrl: 'https://...',
senderAddress: '0x...'
})
// Get a pair and check price
const pair = await sdk.Pair.getPair('0x...')
const price = BinMath.getPriceFromId(
pair.parameters.active_id,
Number(pair.binStep),
9, // tokenX decimals
6 // tokenY decimals
)
console.log(`Current price: ${price} tokenY per tokenX`)Prerequisites
Choose Your Path
For Developers
For Liquidity Providers
Support
Last updated