Real-time DexScreener market data in one CLI/SDK.
Important
This project is independent and not affiliated with DexScreener.
Use at your own risk for research purposes only and comply with DexScreener terms.
Install with `pip` or `uv`
# pip install
pip install dexscraper
# or uv install
uv pip install dexscraperAlternative: Development install
# download and install from main branch
git clone https://github.com/vincentkoc/dexscraper.git
cd dexscraper
pip install -e .[dev]Optional: Cloudflare bypass enhancements (cloudscraper v3)
# Recommended when using --cloudflare-bypass in interactive or --once modes
pip install "cloudscraper @ git+https://github.com/VeNoMouS/cloudscraper.git@3.0.0"dexscraperauto-detects cloudscraper major version at runtime.- If
<3is detected, bypass still works in compatibility mode and the CLI prints a one-time warning in non-streaming flows with the install command above.
DexScreener data is useful, but scraping it consistently is painful: protocol changes, Cloudflare behavior, reconnect logic, and export formatting. Dexscraper gives you one stable interface for real-time extraction, filtering, and export, both from CLI and Python code.
- Real-time streaming of webSocket extraction
- Multi-chain and multi-DEX filtering
- Trending/top/gainers/new presets
- Structured token profiles and OHLC/OHLCVT output for tools like Metatrader
- Optional Cloudflare bypass flow (with runtime v3 feature detection)
- Typed Python SDK + CLI
dexscraper # streaming json
dexscraper interactive # gui mode
dexscraper trending --chain solana --limit 10 --once # trending
dexscraper top --chain ethereum --min-liquidity 50000 --once # top
dexscraper trending --chain solana --format json --output pairs.json --once # trending to file
dexscraper --mode trending --chain solana --format rich # gui modeimport asyncio
from dexscraper import DexScraper, ScrapingConfig, Filters, Chain, RankBy, Timeframe
config = ScrapingConfig(
timeframe=Timeframe.H1,
rank_by=RankBy.VOLUME,
filters=Filters(chain_ids=[Chain.SOLANA], liquidity_min=50_000),
)
async def main():
scraper = DexScraper(config=config, use_cloudflare_bypass=True)
batch = await scraper.extract_token_data()
for token in batch.get_top_tokens(10):
if token.price is not None:
print(token.get_display_name(), token.price)
asyncio.run(main())Contributions are welcome. See CONTRIBUTING.md.
Open an issue for bugs, start a discussion for questions, and star the repo if it helps.
Made with 💙 by Vincent Koc · GPL-3.0