Skip to main content

Real-time DexScreener WebSocket scraper for cryptocurrency data

Project description

👻 Dexscraper

Real-time DexScreener market data in one CLI/SDK.

CI PyPI Release License Python

[!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 Dexscraper

Install with `pip` or `uv`
# pip install
pip install dexscraper

# or uv install
uv pip install dexscraper
Alternative: 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"
  • dexscraper auto-detects cloudscraper major version at runtime.
  • If <3 is detected, bypass still works in compatibility mode and the CLI prints a one-time warning in non-streaming flows with the install command above.

Why Dexscraper?

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.

What You Get

  • 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

Commands

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 mode

Python SDK

import 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())

Contributing

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dexscraper-1.1.0.tar.gz (94.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dexscraper-1.1.0-py3-none-any.whl (63.5 kB view details)

Uploaded Python 3

File details

Details for the file dexscraper-1.1.0.tar.gz.

File metadata

  • Download URL: dexscraper-1.1.0.tar.gz
  • Upload date:
  • Size: 94.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dexscraper-1.1.0.tar.gz
Algorithm Hash digest
SHA256 14d2a277c84a7ea3cd81dafc85f6f53ce1e4a43df395218f9e437e6559602ca5
MD5 382787b0dde31dde8cf3a90326ac38f7
BLAKE2b-256 86418558f720aa9ce6c1f18ebe2483f007ccb36666d78e71482161f8b88ed844

See more details on using hashes here.

Provenance

The following attestation bundles were made for dexscraper-1.1.0.tar.gz:

Publisher: release.yml on vincentkoc/dexscraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dexscraper-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: dexscraper-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 63.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dexscraper-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 715ab5df6f22855b650ce408ae50beb4cfd17e5ef6963bf297521df8ca6d192d
MD5 b8ef22dc1d7fb61194db8062e571ac60
BLAKE2b-256 bb06fb1e209667b0db0df474a052404f06bb116de2b565d3928f547bec281735

See more details on using hashes here.

Provenance

The following attestation bundles were made for dexscraper-1.1.0-py3-none-any.whl:

Publisher: release.yml on vincentkoc/dexscraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page