A Node.js server for interacting with Meteora DLMM (Distributed Liquidity Market Maker) pools on the Solana blockchain.
- Fetch protocol metrics and pair data
- Get pool active bin information
- Retrieve user positions for specific pools
- Add and remove liquidity
- Perform swaps between tokens
- Move funds between pools
- Clone the repository
- Install dependencies:
npm install
- Copy the example environment file:
cp .env.example .env
- Edit the
.envfile with your preferred settings
node index.js- Health Check:
GET /health - Protocol Metrics:
GET /api/metrics - All Pairs:
GET /api/pairs - Specific Pair:
GET /api/pairs/:pairAddress - Pool Active Bin:
GET /api/pools/:poolAddress/active-bin - User Positions:
GET /api/users/:userAddress/pools/:poolAddress/positions
Static service for fetching data from the Meteora API:
- Protocol metrics
- Pair information
- Position data
Service for direct interactions with DLMM pools on the Solana blockchain:
- Initialize pools
- Get active bins
- Manage positions
- Add/remove liquidity
- Perform swaps
The project includes several types of tests:
# Run simple tests (fast, reliable)
npm run test:simple
# Run tests with coverage reporting
npm run test:coverage
# Run fork tests with local Solana validator
npm run test:forkFor more details on testing, see the tests/README.md file.
A utility script is included to remove all liquidity and close all positions for a user:
node cleanup-positions.jsNote: This requires a valid Solana keypair in id.json.
ISC