Smart Alerts
CRUD management for smart alerts. Alerts are internal-only (requires Nansen internal API key).
Quick Reference
CODEBLOCK0
Options Reference
| Flag | Create | Update | Toggle | Delete |
|---|
| INLINECODE0 (positional) | | required | required | required |
| INLINECODE1 |
required | optional | | |
|
--type | required | required with type-specific flags | | |
|
--chains | recommended | optional | | |
|
--telegram | chat ID | optional | | |
|
--slack | webhook URL | optional | | |
|
--discord | webhook URL | optional | | |
|
--webhook | endpoint URL | optional | optional | |
|
--webhook-secret | optional (webhook only) | optional | | |
|
--description | optional | optional | | |
|
--enabled | | flag | flag | |
|
--disabled | flag | flag | flag | |
|
--data | optional (JSON escape hatch) | optional | | |
Alert Types
1. sm-token-flows — Smart Money Token Flows
Track aggregated SM inflow/outflow. At least one flow threshold should be specified.
Type-specific flags:
- -
--inflow-1h-min/max, --inflow-1d-min/max, --inflow-7d-min/max (USD thresholds) - INLINECODE17 ,
--outflow-1d-min/max, INLINECODE19 - INLINECODE20 ,
--netflow-1d-min/max, INLINECODE22 - INLINECODE23 (repeatable) — include specific tokens
- INLINECODE24 (repeatable)
- INLINECODE25 /
--exclude-token-sector <name> (repeatable) - INLINECODE27
- INLINECODE28 , INLINECODE29
Example:
CODEBLOCK1
2. common-token-transfer — Token Transfer Events
Track real-time transfer events matching specified criteria.
Subject types: address, entity, label, custom-label
Format: --subject type:value (e.g. --subject label:"Centralized Exchange")
Type-specific flags:
- -
--events <buy,sell,swap,send,receive> (comma-separated) - INLINECODE38 , INLINECODE39
- INLINECODE40 (repeatable) — addresses/entities/labels to track
- INLINECODE41 (repeatable) — requires INLINECODE42
- INLINECODE43 /
--exclude-token <address:chain> (repeatable) - INLINECODE45 /
--exclude-token-sector <name> (repeatable) - INLINECODE47 , INLINECODE48
- INLINECODE49 /
--exclude-to <type:value> (repeatable)
Event direction notes:
- -
buy for counterparties = sell for subjects - INLINECODE53 for counterparties =
receive for subjects - To track "any address sending to CEX": use
--subject with receive, not --counterparty with INLINECODE58
Example:
CODEBLOCK2
3. smart-contract-call — Smart Contract Interactions
Track contract calls matching specified criteria.
Type-specific flags:
- - INLINECODE60
- INLINECODE61 (repeatable, e.g.
0x095ea7b3 for approve) - INLINECODE64 /
--exclude-caller <type:value> (repeatable) - INLINECODE66 /
--exclude-contract <type:value> (repeatable)
Example:
CODEBLOCK3
Notes
- - Chain aliases: Hyperliquid =
hyperevm, BSC = bnb. - Multiple channels can be combined: INLINECODE70
- INLINECODE71 sends a POST request with the alert payload to any HTTP/HTTPS endpoint. Useful for server deployments, Zapier, n8n, or custom integrations. The endpoint must be publicly reachable and return a 2xx response.
- INLINECODE72 merges raw JSON on top of named flags (escape hatch for fields without named flags).
- Alert endpoints are internal-only. Non-internal users receive 404.
- Use single quotes for names with
$ or special characters: INLINECODE74
智能告警
智能告警的CRUD管理。告警仅限内部使用(需要Nansen内部API密钥)。
快速参考
bash
nansen alerts list --table
nansen alerts create --name <名称> --type <类型> --chains <链> --telegram <聊天ID>
nansen alerts update [--name <名称>] [--chains <链>]
nansen alerts toggle --enabled|--disabled
nansen alerts delete
选项参考
| 标志 | 创建 | 更新 | 切换 | 删除 |
|---|
| <ID>(位置参数) | | 必需 | 必需 | 必需 |
| --name |
必需 | 可选 | | |
| --type | 必需 | 与类型特定标志一起必需 | | |
| --chains | 推荐 | 可选 | | |
| --telegram | 聊天ID | 可选 | | |
| --slack | Webhook URL | 可选 | | |
| --discord | Webhook URL | 可选 | | |
| --webhook | 端点URL | 可选 | 可选 | |
| --webhook-secret | 可选(仅webhook) | 可选 | | |
| --description | 可选 | 可选 | | |
| --enabled | | 标志 | 标志 | |
| --disabled | 标志 | 标志 | 标志 | |
| --data | 可选(JSON转义) | 可选 | | |
告警类型
1. sm-token-flows — 聪明钱代币流动
追踪聚合的聪明钱流入/流出。至少应指定一个流动阈值。
类型特定标志:
- - --inflow-1h-min/max、--inflow-1d-min/max、--inflow-7d-min/max(美元阈值)
- --outflow-1h-min/max、--outflow-1d-min/max、--outflow-7d-min/max
- --netflow-1h-min/max、--netflow-1d-min/max、--netflow-7d-min/max
- --token <地址:链>(可重复)— 包含特定代币
- --exclude-token <地址:链>(可重复)
- --token-sector <名称> / --exclude-token-sector <名称>(可重复)
- --token-age-max <天数>
- --market-cap-min/max <美元>、--fdv-min/max <美元>
示例:
bash
nansen alerts create \
--name SM ETH 流入 >500万 \
--type sm-token-flows \
--chains ethereum \
--telegram 5238612255 \
--inflow-1h-min 5000000 \
--token 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2:ethereum
2. common-token-transfer — 代币转账事件
追踪符合指定条件的实时转账事件。
主体类型: address、entity、label、custom-label
格式:--subject 类型:值(例如 --subject label:中心化交易所)
类型特定标志:
- - --events (逗号分隔)
- --usd-min/max <美元>、--token-amount-min/max <数量>
- --subject <类型:值>(可重复)— 要追踪的地址/实体/标签
- --counterparty <类型:值>(可重复)— 需要 --subject
- --token <地址:链> / --exclude-token <地址:链>(可重复)
- --token-sector <名称> / --exclude-token-sector <名称>(可重复)
- --token-age-min/max <天数>、--market-cap-min/max <美元>
- --exclude-from <类型:值> / --exclude-to <类型:值>(可重复)
事件方向说明:
- - 对手方的 buy = 主体的 sell
- 对手方的 send = 主体的 receive
- 要追踪任何向CEX发送的地址:使用 --subject 配合 receive,而不是使用 --counterparty 配合 send
示例:
bash
nansen alerts create \
--name 大额USDC转账 \
--type common-token-transfer \
--chains ethereum \
--telegram 123456789 \
--events send,receive \
--usd-min 1000000 \
--token 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48:ethereum
3. smart-contract-call — 智能合约交互
追踪符合指定条件的合约调用。
类型特定标志:
- - --usd-min/max <美元>
- --signature-hash <哈希>(可重复,例如 approve 的 0x095ea7b3)
- --caller <类型:值> / --exclude-caller <类型:值>(可重复)
- --contract <类型:值> / --exclude-contract <类型:值>(可重复)
示例:
bash
nansen alerts create \
--name Uniswap V3 大额兑换 \
--type smart-contract-call \
--chains ethereum \
--telegram 123456789 \
--usd-min 1000000 \
--contract entity:Uniswap V3
注意事项
- - 链别名:Hyperliquid = hyperevm,BSC = bnb。
- 多个渠道可以组合:--telegram 123 --slack https://... --webhook https://...
- --webhook 向任何HTTP/HTTPS端点发送包含告警负载的POST请求。适用于服务器部署、Zapier、n8n或自定义集成。端点必须可公开访问并返回2xx响应。
- --data 将原始JSON合并到命名标志之上(用于没有命名标志的字段的转义)。
- 告警端点仅限内部使用。非内部用户将收到404错误。
- 对于包含 $ 或特殊字符的名称,请使用单引号:--name SM >$100万