Skip to main content

Cryptocurrency snapshot parser — real-time prices, volume & alerts from CoinGecko and Binance

Project description

🔍 pycprarser

Cryptocurrency Snapshot Parser

Real-time crypto prices, volume & alerts from CoinGecko & Binance — right in your terminal.

PyPI Python License


✨ Features

  • Snapshot — one-shot price table for all configured coins
  • Watch — continuous monitoring with configurable interval
  • Alerts — instant notification when price moves beyond threshold
  • History — stored in SQLite, query stats (min/max/avg/trend)
  • Export — dump history to CSV or JSON
  • Zero API keys — CoinGecko + Binance public endpoints
  • Configurable — YAML config for coins, intervals, thresholds

📦 Install

pip install pycprarser

🚀 Usage

Snapshot — instant price table

pycprarser snapshot
Coin            Price USD        24h Vol        Mkt Cap        Bid        Ask
------------------------------------------------------------------------
bitcoin        $61,814.00 $33,817,704,863 $1,239,483,984,389 $61,913.99 $61,914.00
ethereum        $1,737.72 $12,979,993,603 $209,722,410,112  $1,741.25  $1,741.26
solana             $81.46 $3,126,349,866 $47,340,239,965     $81.48     $81.49
ripple              $1.11 $1,672,088,890 $68,993,905,122      $1.11      $1.11
dogecoin            $0.08   $662,485,261 $11,670,478,038      $0.08      $0.08

Watch — continuous monitoring + alerts

pycprarser watch
Watching 5 coins every 60s, alert >3.0%
  ALERT bitcoin ↓ -3.42%  $63,980.00 → $61,814.00
Coin            Price USD        24h Vol        Mkt Cap        Bid        Ask
------------------------------------------------------------------------
...
--- next in 60s ---

Press Ctrl+C to stop.

History — stats & trend

pycprarser history bitcoin
=== bitcoin (142 records) ===
  Min:  $58,200.00
  Max:  $64,500.00
  Avg:  $61,340.50
  First: $63,100.00  Last: $61,814.00
  Trend: down -2.18%

Export — CSV or JSON

pycprarser export bitcoin --format csv > btc.csv
pycprarser export ethereum --format json > eth.json

⚙️ Configuration

Create config.yaml in the working directory or set PYCPRARSER_CONFIG env var:

coins:
  - bitcoin
  - ethereum
  - solana
  - ripple
  - dogecoin

interval_sec: 60          # fetch frequency (min 30 recommended)
alert_threshold_pct: 3.0   # alert when price moves >3%
db_path: ./crypto.db       # SQLite database path

Or pass explicitly:

pycprarser --config /path/to/config.yaml snapshot

🏗️ Architecture

pycprarser/
├── __init__.py     # version
├── cli.py          # click CLI (snapshot, watch, history, export)
├── config.py       # YAML config loader with defaults
├── fetcher.py      # CoinGecko + Binance API clients
├── db.py           # SQLite storage (ticks table)
└── analytics.py    # stats (min/max/avg) & trend detection

Data sources:

Source Data Rate limit
CoinGecko price, market cap, 24h volume ~30 req/min
Binance bid/ask spread ~1200 req/min

📋 Requirements

  • Python 3.8+
  • requests, click, pyyaml

📄 License

MIT

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

pycprarser-0.1.3.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

pycprarser-0.1.3-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file pycprarser-0.1.3.tar.gz.

File metadata

  • Download URL: pycprarser-0.1.3.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pycprarser-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ab792faa6903eaf6050b8a694d1048b29d228e89fbcef35ed024dd8892c92de2
MD5 1996386cadf5f5b2f1260c111a29b4de
BLAKE2b-256 670789aa6c24f9e336ddb8582f3a33b6d86d846a36ffda2d713c4919c0898746

See more details on using hashes here.

File details

Details for the file pycprarser-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pycprarser-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pycprarser-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0cfa4c98a65bded252c617ecfe593de93bafebe0b5ec38b57be6b9303d50c7b9
MD5 2d87cd2d9035e16ca673e1fda037e7e1
BLAKE2b-256 c0d6dd57049e16541a11c85d921b2689ee31ff37f4c0f0393a766bcca7b2f47c

See more details on using hashes here.

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