npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dlmm-agent

v1.0.0

Published

Autonomous DLMM LP agent for Meteora on Solana

Readme

DLMM Agent

**Autonomous Meteora DLMM liquidity management agent for Solana, powered by LLMs.**Autonomous Meteora DLMM liquidity management agent for Solana, powered by LLMs.

DLMM Agent runs continuous screening and management cycles, deploying capital into high-quality Meteora DLMM pools and closing positions based on live PnL, yield, and range data. It learns from every position it closes.


⚡ Quick Setup (OpenCode + DeepSeek)

This configuration uses OpenCode API with DeepSeek-v4-Flash model for cost-effective autonomous trading.

# Clone
git clone https://github.com/dhimasab/meridianagent.git
cd meridianagent

# Install
npm install

# Setup .env (see below)
# Edit user-config.json if needed

# Test (dry run)
npm run dev

# Go live
npm start

Configuration for 1 SOL Wallet

Conservative settings for low-capital testing:

.env

# ── LLM Provider (OpenCode + DeepSeek) ────────────────────
LLM_BASE_URL=https://opencode.ai/zen/go/v1
LLM_API_KEY=sk-your-opencode-api-key
LLM_MODEL=deepseek-v4-flash

# ── Wallet ────────────────────────────────────────────────
WALLET_PRIVATE_KEY=your_base58_private_key

# ── Solana RPC ─────────────────────────────────────────────
RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_KEY
HELIUS_API_KEY=your_helius_key

# ── Jupiter API (opsional, tanpa key juga jalan) ──────────
JUPITER_API_KEY=

# ── Deploy Settings (1 SOL wallet) ─────────────────────────
DEPLOY_AMOUNT_SOL=0.05         # Per position
MAX_DEPLOY_AMOUNT=0.3          # Max per cycle
POSITION_SIZE_PCT=0.25         # 25% wallet
GAS_RESERVE=0.2                # Gas buffer

# ── Telegram (optional) ────────────────────────────────────
TELEGRAM_BOT_TOKEN=
TELEGRAM_CHAT_ID=

# ── Mode ───────────────────────────────────────────────────
DRY_RUN=true                   # Set false for live
LOG_LEVEL=info

user-config.json (key settings)

{
  "deployAmountSol": 0.05,
  "maxDeployAmount": 0.3,
  "maxPositions": 2,
  "minSolToOpen": 0.15,
  "positionSizePct": 0.25,
  "gasReserve": 0.2
}

Wallet math:

  • Total: 1 SOL
  • Gas reserve: 0.2 SOL (locked)
  • Deployable: 0.8 SOL
  • Per cycle: 2 positions × 0.05 = 0.1 SOL max
  • Buffer: 0.5 SOL remaining ✓

Deploy to VPS

1. Clone on VPS

ssh ubuntu@YOUR_VPS_IP
cd ~
git clone https://github.com/dhimasab/meridianagent.git
cd meridianagent

2. Setup & run

# Copy .env (secure method recommended)
# nano .env
# (paste your config, Ctrl+X to save)

npm install
npm start

3. Monitor from anywhere

# REPL commands while running:
> /status           # Wallet + positions
> /candidates       # Screen pools
> /learn            # Study top LPers
> /thresholds       # Settings + stats

What It Does

  • Screens pools — scans Meteora DLMM pools against configurable thresholds
  • Manages positions — monitors, claims fees, closes positions autonomously
  • Learns from performance — studies top LPers, evolves thresholds from history
  • Discord signals — optional LP Army channel monitoring
  • Telegram chat — full agent chat + cycle reports

How It Works

DLMM Agent runs a ReAct agent loop — each cycle the LLM reasons over live data, calls tools, and acts.

| Agent | Interval | Role | |---|---|---| | Screening | Every 30 min | Pool screening → deploy | | Management | Every 10 min | Position evaluation → close/stay |

Data sources:

  • Meteora DLMM SDK (on-chain data)
  • Meteora PnL API (yield, fees, PnL)
  • OKX OnchainOS (smart money signals)
  • Pool screening API (metrics)
  • Jupiter API (token audit)

Out of Range (OOR) Handling

Direction-Aware OOR Logic

DLMM Agent now distinguishes between OOR directions with different exit behaviors:

| Direction | Behavior | |-----------|----------| | OOR Up (price above upper bin) | Waits 45 minutes before closing (configurable via outOfRangeWaitMinutes) | | OOR Down (price below lower bin) | Immediate Stop Loss - closes position and swaps to SOL |

Configuration

{
  "outOfRangeWaitMinutes": 30,
  "outOfRangeDownTriggersSL": true,
  "stopLossPct": -10
}
  • outOfRangeWaitMinutes - minutes to wait before closing OOR Up positions (default: 45)
  • outOfRangeDownTriggersSL - enable/disable immediate SL for OOR Down (default: true)

Why Separate Handling?

  • OOR Down typically indicates strong downward momentum - waiting wastes time and risks further loss
  • OOR Up often recovers quickly as price can spike above range temporarily

Requirements

  • Node.js 18+
  • OpenCode API key (https://opencode.ai)
  • Solana wallet (base58 private key)
  • Helius RPC endpoint (https://helius.xyz)
  • Telegram bot token (optional)

Files

  • .env — API keys, wallet, RPC, deploy settings
  • user-config.json — risk preset, thresholds, models
  • decision-log.json — all decisions + reasoning
  • pool-notes.json — pool observations
  • lessons.json — learned patterns

Running Modes

| Mode | Command | Usage | |---|---|---| | Dry run | npm run dev | Test without transactions | | Live | npm start | Autonomous trading | | CLI tools | dlmm-agent <command> | Direct tool calls |


Troubleshooting

Model errors: If using OpenCode, ensure tool_choice=auto (not required) — some models don't support it with thinking enabled.

Connection issues: Use VPS for 24/7 uptime. Recommended: DigitalOcean, Linode ($5-10/mo).

Low balance: Minimum 0.5 SOL recommended for 1-position safety. 5+ SOL for comfortable operation.


License

MIT