加密货币监控器
监控加密货币钱包和DeFi头寸。当情况变化时获取警报。
功能特性
- 钱包追踪: 跨链ETH + 代币余额
- DeFi头寸: LP头寸、借贷健康度、质押奖励
- Gas警报: 当Gas费便宜适合交易时通知
- 巨鲸警报: 被监控代币的大额转账
使用方法
设置
# 添加要监控的钱包
crypto-watcher add 0x1234...abcd --name "主钱包" --chains eth,arb,base
# 配置警报
crypto-watcher config --gas-alert 20 --balance-change 5%
命令
# 检查所有头寸
crypto-watcher status
# 检查特定钱包
crypto-watcher status 主钱包
# Gas价格
crypto-watcher gas
# DeFi头寸(通过DefiLlama)
crypto-watcher defi 0x1234...abcd
心跳集成
### 加密货币检查
- 运行 `crypto-watcher status --quiet`
- 如果任何头寸健康度 < 1.5 或余额下降 > 10% 则警报
- 检查Gas,如果 < 15 gwei 则警报(适合L1交易的好时机)
配置
~/.config/crypto-watcher/config.json:
{
"wallets": [
{
"address": "0x...",
"name": "主钱包",
"chains": ["eth", "arb", "base"]
}
],
"alerts": {
"gasThreshold": 20,
"balanceChangePercent": 5,
"healthFactorMin": 1.5
}
}
数据源
- 余额: 公共RPC(无需API密钥)
- DeFi: DefiLlama API(免费)
- Gas: eth_gasPrice RPC调用
- 价格: CoinGecko API(免费版)
支持的链
| 链 | ID | RPC |
|---|---|---|
| 以太坊 | eth | https://eth.llamarpc.com |
| Arbitrum | arb | https://arb1.arbitrum.io/rpc |
| Base | base | https://mainnet.base.org |
| Optimism | op | https://mainnet.optimism.io |
| Polygon | matic | https://polygon-rpc.com |