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.
✨ 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycprarser-0.1.2.tar.gz.
File metadata
- Download URL: pycprarser-0.1.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19cafa7bd55e7e5bfa46cd37d57764d5468990fccee11eee582b8e53cecf1a35
|
|
| MD5 |
6ffbf58499c244b6a0eaf2b063205b28
|
|
| BLAKE2b-256 |
84d15e27a7a182df1baba5be6a69d753b273597e25e1b7e2f919dff6e633464c
|
File details
Details for the file pycprarser-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pycprarser-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76896ab5afae3ec38f09bae0dab536ecb07651366214ddcf705294905ec839dd
|
|
| MD5 |
b7404cf5d0bca888b3d7c4ea9646ddaf
|
|
| BLAKE2b-256 |
91fc8234b03a44e1e7f78ff01c233683acaa16ca59b0492863a7d753e381fefa
|