binance-alpha-notify
监控 Binance Alpha 空投(数据来自 alpha123.uk)并通过 Apprise 推送通知的命令行工具。安装后一条命令即可用,跑一次就退出,定时交给系统调度器。
灵感来自一个跑在服务器 crontab 上的裸脚本,重写为跨平台、可
pip/pipx安装、带去重与测试的 CLI。
特性
- 🛰️ 抓取当天尚未到期、且有具体领取时间的空投,并附带价格估算
- 🔔 通过 Apprise 推送到 80+ 渠道:Telegram、Bark、钉钉、飞书、企业微信、Server酱、邮件、Discord、Slack…
- 🧠 SQLite 去重,同一空投只推一次;
--test可强制重发且不污染去重库 - 💻 跨平台(Linux / macOS / Windows),一次性命令,调度交给 cron / 计划任务
- 📂 配置与数据放在系统标准用户目录(platformdirs),支持环境变量覆盖
- ✅ 模块化实现,68 个单元测试,离线可测(不打真实网络/不发真实通知)
安装
# 从源码安装
pip install -e .
# 或用 pipx 隔离安装(推荐,命令全局可用且互不污染)
pipx install .
安装后会得到 alpha-notify 命令(等价于 python -m alpha_notify)。
配置
alpha-notify config init # 在标准位置生成配置模板
alpha-notify config path # 查看配置 / 数据文件的实际位置
alpha-notify config show # 查看当前生效配置(密钥脱敏)
编辑生成的 config.ini,填入 apprise_urls:
[alpha-notify]
# 每行一个 URL,或单行用逗号分隔;
# 若某个 URL 本身包含逗号(如 mailto 的多收件人 ?to=a,b),请让它单独成行。
apprise_urls =
tgram://BOT_TOKEN/CHAT_ID
bark://DEVICE_KEY@HOST
# HTTP 请求超时(秒)
timeout = 30
# 时区小时偏移(北京时间为 8)
timezone = 8
也可以用环境变量覆盖(优先级最高,适合 cron / 容器):
export APPRISE_URLS="tgram://BOT_TOKEN/CHAT_ID"
各渠道的 URL 格式见 Apprise 文档。
使用
alpha-notify run # 抓取并推送(无子命令时等同 alpha-notify)
alpha-notify run --dry-run # 只预览,不发送、不写库(首次配置时先用它确认)
alpha-notify run --test # 强制发送,忽略去重(测试通知是否畅通)
alpha-notify run --debug # 详细日志 + 出错时打印 traceback
alpha-notify --version
定时运行
本工具跑一次即退出,定时交给系统调度器。
Linux / macOS(cron,每 5 分钟):
*/5 * * * * APPRISE_URLS="tgram://BOT_TOKEN/CHAT_ID" /path/to/alpha-notify run
Windows(任务计划程序): 新建基本任务 → 触发器设为按间隔重复 → 操作执行
alpha-notify(或 python -m alpha_notify run)。
工作原理
- 从
alpha123.uk拉取空投列表与价格; - 筛选今天、有具体时间 (HH:MM)、且尚未到期的空投;
- 用 SQLite 按空投唯一标识去重,跳过已推送的;
- 用 Apprise 把待推送的空投格式化后发送到所有配置渠道,并记录已发送。
数据位置
- 配置:
<user_config_dir>/alpha-notify/config.ini - 去重 DB / 缓存:
<user_data_dir>/alpha-notify/(运行config path可查看实际路径) - 可用
ALPHA_NOTIFY_DB_PATH/ALPHA_NOTIFY_CACHE_PATH覆盖(支持~展开,父目录会自动创建)
开发
pip install -e ".[dev]"
pytest -v
免责声明
本工具仅从公开接口读取信息并做本地通知,不进行任何交易或下单操作。空投信息以官方与 alpha123.uk 为准,请自行核实。
许可证
Metadata
Release files for binance-alpha-notify 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| binance_alpha_notify-0.1.1.tar.gz | 19.3 kB | Without provenance | Details for binance_alpha_notify-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| binance_alpha_notify-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for binance_alpha_notify-0.1.1-py3-none-any.whl |
Total release size: 37.4 kB
Release files / binance_alpha_notify-0.1.1.tar.gz
| Download URL | binance_alpha_notify-0.1.1.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
122dfd92842d5375c7eb01f3176d643eff305db231a2f695e72c998e532eebc1
|
|
BLAKE2b-256 checksum How to use checksums |
3b0ba402526c45e8bec95074c0df91322794a65e25c7f02d8a50a3caae9d3158
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / binance_alpha_notify-0.1.1-py3-none-any.whl
| Download URL | binance_alpha_notify-0.1.1-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9336fcd2a9ff44be611af057c99215224edb08cb1d86ebfc341fe92e4fe9b6ea
|
|
BLAKE2b-256 checksum How to use checksums |
89e0cc1b7f2a26e8b74c6f86303e8e5372a5791e9517cd45798e683c5301ca2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for binance-alpha-notify 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.