crypto-tracker
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCrypto Tracker
加密货币追踪器
Track cryptocurrency prices, set price/percentage alerts, and search coins using the free CoinGecko API (no API key required).
追踪加密货币价格,设置价格/涨跌幅提醒,还可通过免费的CoinGecko API搜索币种(无需API密钥)。
Quick Commands
快速命令
Check Prices
查看价格
bash
undefinedbash
undefinedSingle coin
Single coin
uv run {baseDir}/scripts/crypto.py price bitcoin
uv run {baseDir}/scripts/crypto.py price bitcoin
Multiple coins
Multiple coins
uv run {baseDir}/scripts/crypto.py price bitcoin ethereum solana
uv run {baseDir}/scripts/crypto.py price bitcoin ethereum solana
With more details (market cap, volume)
With more details (market cap, volume)
uv run {baseDir}/scripts/crypto.py price bitcoin --detailed
undefineduv run {baseDir}/scripts/crypto.py price bitcoin --detailed
undefinedSearch Coins
搜索币种
bash
undefinedbash
undefinedFind coin ID by name/symbol
Find coin ID by name/symbol
uv run {baseDir}/scripts/crypto.py search doge
uv run {baseDir}/scripts/crypto.py search cardano
undefineduv run {baseDir}/scripts/crypto.py search doge
uv run {baseDir}/scripts/crypto.py search cardano
undefinedManage Alerts
管理提醒
bash
undefinedbash
undefinedSet price threshold alert
Set price threshold alert
uv run {baseDir}/scripts/crypto.py alert <user_id> bitcoin above 100000
uv run {baseDir}/scripts/crypto.py alert <user_id> ethereum below 3000
uv run {baseDir}/scripts/crypto.py alert <user_id> bitcoin above 100000
uv run {baseDir}/scripts/crypto.py alert <user_id> ethereum below 3000
Set percentage change alert (24h)
Set percentage change alert (24h)
uv run {baseDir}/scripts/crypto.py alert <user_id> bitcoin change 5 # ±5%
uv run {baseDir}/scripts/crypto.py alert <user_id> solana drop 10 # -10%
uv run {baseDir}/scripts/crypto.py alert <user_id> ethereum rise 15 # +15%
uv run {baseDir}/scripts/crypto.py alert <user_id> bitcoin change 5 # ±5%
uv run {baseDir}/scripts/crypto.py alert <user_id> solana drop 10 # -10%
uv run {baseDir}/scripts/crypto.py alert <user_id> ethereum rise 15 # +15%
List user's alerts
List user's alerts
uv run {baseDir}/scripts/crypto.py alerts <user_id>
uv run {baseDir}/scripts/crypto.py alerts <user_id>
Remove an alert
Remove an alert
uv run {baseDir}/scripts/crypto.py alert-rm <alert_id>
uv run {baseDir}/scripts/crypto.py alert-rm <alert_id>
Check all alerts (for cron/heartbeat)
Check all alerts (for cron/heartbeat)
uv run {baseDir}/scripts/crypto.py check-alerts
undefineduv run {baseDir}/scripts/crypto.py check-alerts
undefinedCoin Aliases
币种别名
Common symbols are automatically resolved:
- → bitcoin
btc - → ethereum
eth - → solana
sol - → dogecoin
doge - → cardano
ada - → ripple
xrp - → polkadot
dot - → polygon
matic - → chainlink
link - → avalanche-2
avax - → litecoin
ltc
常用符号会自动解析:
- → bitcoin
btc - → ethereum
eth - → solana
sol - → dogecoin
doge - → cardano
ada - → ripple
xrp - → polkadot
dot - → polygon
matic - → chainlink
link - → avalanche-2
avax - → litecoin
ltc
Alert Types
提醒类型
| Type | Example | Triggers When |
|---|---|---|
| | Price >= $100,000 |
| | Price <= $3,000 |
| | 24h change >= ±5% |
| | 24h change <= -10% |
| | 24h change >= +15% |
| 类型 | 示例 | 触发条件 |
|---|---|---|
| | 价格 >= 100,000美元 |
| | 价格 <= 3,000美元 |
| | 24小时涨跌幅 >= ±5% |
| | 24小时涨跌幅 <= -10% |
| | 24小时涨跌幅 >= +15% |
Cron Integration
Cron集成
Check alerts periodically (e.g., every 15 minutes):
bash
uv run {baseDir}/scripts/crypto.py check-alerts --json-outputReturns triggered alerts with user IDs for notification.
定期检查提醒(例如每15分钟一次):
bash
uv run {baseDir}/scripts/crypto.py check-alerts --json-output返回触发的提醒及对应的用户ID,用于发送通知。
Data Storage
数据存储
Alerts stored in with:
{baseDir}/data/alerts.json- Per-user alert tracking
- Cooldown between repeat notifications (default: 1 hour)
- Last triggered timestamp
提醒存储在 中,包含:
{baseDir}/data/alerts.json- 按用户维度追踪提醒
- 重复通知冷却时间(默认1小时)
- 上次触发时间戳
Notes
注意事项
- CoinGecko free tier: ~10-30 requests/minute (no API key needed)
- 15,000+ coins supported
- Use flag for machine-readable output
--json-output
- CoinGecko免费套餐:每分钟约10-30次请求(无需API密钥)
- 支持超过15000种币种
- 使用 参数可获取机器可读的输出
--json-output