I built a Python CLI that fetches real-time Solana DEX liquidity data — no pip install, no API key, just the standard library and a terminal. Here's how it works and why I made it.
The Problem
If you trade or monitor Solana DeFi, you probably check DexScreener multiple times a day. Their web UI is great, but there's no simple way to pipe that data into scripts, monitoring dashboards, or terminal workflows. The API exists, but you end up writing the same urllib boilerplate every time.
I wanted a single command I could run in a terminal tab — or pipe into a monitoring system — to see top pools by volume, track a specific token across DEXes, or log historical snapshots.
The Tool
liquidity-pool-analyzer is a single-file, zero-dependency Python script:
# Search pools for SOL, show top 3 by volume
python3 liquidity_pool_analyzer.py --token SOL --top 3
# Filter to Raydium only, machine-readable JSON
python3 liquidity_pool_analyzer.py --token USDC --dex raydium --json
# Live watch mode — refreshes every 30 seconds
python3 liquidity_pool_analyzer.py --top 10 --watch 30
# Compare specific pools side-by-side
python3 liquidity_pool_analyzer.py --compare ADDR1 ADDR2 ADDR3
What It Does
Under the hood, it talks to the free DexScreener API endpoints (/token-boosted/top/v1 for the latest pools, /search for token lookups). The output is either a human-readable table or JSON for scripting.
Why Pure stdlib?
No pip install, no requirements.txt, no venv activation. Drop it on any box with Python 3 and it works. This matters when you're running tools in CI pipelines, cron jobs, or fresh cloud instances where you don't want to manage dependencies.
Features
- Search — by token symbol or contract address
- Filter — by DEX (Raydium, Orca, Meteora, Jupiter)
- Sort — top N pools by volume or liquidity
- Compare — specific pool addresses side-by-side
- Watch — live auto-refresh every N seconds
- JSON mode — structured output for piping into other tools
- Error handling — graceful network failure messages instead of stack traces
Why I Made This
I run a Solana monitoring bot (cron-based, no user) and frequently need to check pool health, track where liquidity is flowing, and spot unusual activity. Having a CLI tool I can pipe into log files, alert scripts, or just glance at in a terminal window saves me from context-switching to a browser. It's part of a growing toolkit of crypto-adjacent CLI utilities I'm building.
Tech Stack
-
Language: Python 3 (stdlib only —
urllib,json,argparse) - API: DexScreener (free, no API key)
- License: MIT
Get It
wget https://raw.githubusercontent.com/neuralmint/liquidity-pool-analyzer/main/liquidity_pool_analyzer.py
# or clone the repo
git clone https://github.com/neuralmint/liquidity-pool-analyzer.git
What's Next
I'm building a series of single-file CLI tools for crypto and developer workflows — all pure Python stdlib, all MIT-licensed. Follow me for more, or check the GitHub repo for what's coming next.
Repository
https://github.com/neuralmint/liquidity-pool-analyzer
Support
If this saved you time or made you some money:
SOL: 4TGyiYBjaYhFFPNYyCoJjf16ctUsWVBiMR1FXQxEfhWi
ETH: 0xe07f177E0725c11EEc8BeA34C5b5193CaF2a1A6a
Or just drop a ⭐ on the repo. That's free.
Top comments (0)