nansen-cli 1.17.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/package.json +5 -3
  3. package/skills/nansen-dca-tracker/SKILL.md +38 -0
  4. package/skills/nansen-defi-positions/SKILL.md +37 -0
  5. package/skills/nansen-exit-signals/SKILL.md +39 -0
  6. package/skills/nansen-fund-tracker/SKILL.md +35 -0
  7. package/skills/nansen-general-search/SKILL.md +34 -0
  8. package/skills/nansen-holder-analysis/SKILL.md +38 -0
  9. package/skills/nansen-perp-screener/SKILL.md +32 -0
  10. package/skills/nansen-perp-trader-profile/SKILL.md +39 -0
  11. package/skills/nansen-polymarket-deep-dive/SKILL.md +50 -0
  12. package/skills/nansen-polymarket-insider-scan/SKILL.md +62 -0
  13. package/skills/nansen-polymarket-trader-profile/SKILL.md +43 -0
  14. package/skills/nansen-portfolio-tracker/SKILL.md +36 -0
  15. package/skills/nansen-prediction-markets/SKILL.md +47 -0
  16. package/skills/nansen-sm-cross-chain-flows/SKILL.md +27 -0
  17. package/skills/nansen-smart-alerts/SKILL.md +137 -0
  18. package/skills/nansen-smart-money-alpha/SKILL.md +43 -0
  19. package/skills/nansen-smart-money-tracker/SKILL.md +71 -0
  20. package/skills/nansen-smart-money-trend/SKILL.md +30 -0
  21. package/skills/nansen-token-research/SKILL.md +90 -0
  22. package/skills/nansen-token-screener/SKILL.md +54 -0
  23. package/skills/nansen-token-transfer-analysis/SKILL.md +40 -0
  24. package/skills/nansen-trading/SKILL.md +100 -0
  25. package/skills/nansen-wallet-batch/SKILL.md +26 -0
  26. package/skills/nansen-wallet-clustering/REFERENCE.md +43 -0
  27. package/skills/nansen-wallet-clustering/SKILL.md +46 -0
  28. package/skills/nansen-wallet-deep-dive/SKILL.md +45 -0
  29. package/skills/nansen-wallet-keychain-migration/SKILL.md +183 -0
  30. package/skills/nansen-wallet-manager/SKILL.md +140 -0
  31. package/skills/nansen-wallet-profiler/SKILL.md +98 -0
  32. package/skills/nansen-web-fetcher/SKILL.md +50 -0
  33. package/skills/nansen-web-searcher/SKILL.md +39 -0
  34. package/src/api.js +76 -3
  35. package/src/cli.js +176 -14
  36. package/src/commands/alerts.js +717 -0
  37. package/src/schema.json +164 -1
  38. package/src/telemetry.js +237 -0
  39. package/src/update-check.js +2 -2
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: nansen-smart-alerts
3
+ description: Manage smart alerts — list, create, update, toggle, delete. Use when setting up or managing token flow alerts, smart money alerts, or notification rules.
4
+ metadata:
5
+ openclaw:
6
+ requires:
7
+ env:
8
+ - NANSEN_API_KEY
9
+ bins:
10
+ - nansen
11
+ primaryEnv: NANSEN_API_KEY
12
+ install:
13
+ - kind: node
14
+ package: nansen-cli
15
+ bins: [nansen]
16
+ allowed-tools: Bash(nansen:*)
17
+ ---
18
+
19
+ # Smart Alerts
20
+
21
+ CRUD management for smart alerts. Alerts are internal-only (requires Nansen internal API key).
22
+
23
+ ## Quick Reference
24
+
25
+ ```bash
26
+ nansen alerts list --table
27
+ nansen alerts create --name <name> --type <type> --chains <chains> --telegram <chatId>
28
+ nansen alerts update <id> [--name <name>] [--chains <chains>]
29
+ nansen alerts toggle <id> --enabled|--disabled
30
+ nansen alerts delete <id>
31
+ ```
32
+
33
+ ## Options Reference
34
+
35
+ | Flag | Create | Update | Toggle | Delete |
36
+ |------|--------|--------|--------|--------|
37
+ | `<id>` (positional) | | required | required | required |
38
+ | `--name` | required | optional | | |
39
+ | `--type` | required | required with type-specific flags | | |
40
+ | `--chains` | recommended | optional | | |
41
+ | `--telegram` | chat ID | optional | | |
42
+ | `--slack` | webhook URL | optional | | |
43
+ | `--discord` | webhook URL | optional | | |
44
+ | `--description` | optional | optional | | |
45
+ | `--enabled` | | flag | flag | |
46
+ | `--disabled` | flag | flag | flag | |
47
+ | `--data` | optional (JSON escape hatch) | optional | | |
48
+
49
+ ## Alert Types
50
+
51
+ ### 1. `sm-token-flows` — Smart Money Token Flows
52
+
53
+ Track aggregated SM inflow/outflow. At least one flow threshold should be specified.
54
+
55
+ **Type-specific flags:**
56
+ - `--inflow-1h-min/max`, `--inflow-1d-min/max`, `--inflow-7d-min/max` (USD thresholds)
57
+ - `--outflow-1h-min/max`, `--outflow-1d-min/max`, `--outflow-7d-min/max`
58
+ - `--netflow-1h-min/max`, `--netflow-1d-min/max`, `--netflow-7d-min/max`
59
+ - `--token <address:chain>` (repeatable) — include specific tokens
60
+ - `--exclude-token <address:chain>` (repeatable)
61
+ - `--token-sector <name>` / `--exclude-token-sector <name>` (repeatable)
62
+ - `--token-age-max <days>`
63
+ - `--market-cap-min/max <usd>`, `--fdv-min/max <usd>`
64
+
65
+ **Example:**
66
+ ```bash
67
+ nansen alerts create \
68
+ --name 'SM ETH Inflow >5M' \
69
+ --type sm-token-flows \
70
+ --chains ethereum \
71
+ --telegram 5238612255 \
72
+ --inflow-1h-min 5000000 \
73
+ --token 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2:ethereum
74
+ ```
75
+
76
+ ### 2. `common-token-transfer` — Token Transfer Events
77
+
78
+ Track real-time transfer events matching specified criteria.
79
+
80
+ **Subject types:** `address`, `entity`, `label`, `custom-label`
81
+ Format: `--subject type:value` (e.g. `--subject label:"Centralized Exchange"`)
82
+
83
+ **Type-specific flags:**
84
+ - `--events <buy,sell,swap,send,receive>` (comma-separated)
85
+ - `--usd-min/max <usd>`, `--token-amount-min/max <n>`
86
+ - `--subject <type:value>` (repeatable) — addresses/entities/labels to track
87
+ - `--counterparty <type:value>` (repeatable) — requires `--subject`
88
+ - `--token <address:chain>` / `--exclude-token <address:chain>` (repeatable)
89
+ - `--token-sector <name>` / `--exclude-token-sector <name>` (repeatable)
90
+ - `--token-age-min/max <days>`, `--market-cap-min/max <usd>`
91
+ - `--exclude-from <type:value>` / `--exclude-to <type:value>` (repeatable)
92
+
93
+ **Event direction notes:**
94
+ - `buy` for counterparties = `sell` for subjects
95
+ - `send` for counterparties = `receive` for subjects
96
+ - To track "any address sending to CEX": use `--subject` with `receive`, not `--counterparty` with `send`
97
+
98
+ **Example:**
99
+ ```bash
100
+ nansen alerts create \
101
+ --name 'Large USDC Transfers' \
102
+ --type common-token-transfer \
103
+ --chains ethereum \
104
+ --telegram 123456789 \
105
+ --events send,receive \
106
+ --usd-min 1000000 \
107
+ --token 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48:ethereum
108
+ ```
109
+
110
+ ### 3. `smart-contract-call` — Smart Contract Interactions
111
+
112
+ Track contract calls matching specified criteria.
113
+
114
+ **Type-specific flags:**
115
+ - `--usd-min/max <usd>`
116
+ - `--signature-hash <hash>` (repeatable, e.g. `0x095ea7b3` for `approve`)
117
+ - `--caller <type:value>` / `--exclude-caller <type:value>` (repeatable)
118
+ - `--contract <type:value>` / `--exclude-contract <type:value>` (repeatable)
119
+
120
+ **Example:**
121
+ ```bash
122
+ nansen alerts create \
123
+ --name 'Uniswap V3 Large Swaps' \
124
+ --type smart-contract-call \
125
+ --chains ethereum \
126
+ --telegram 123456789 \
127
+ --usd-min 1000000 \
128
+ --contract entity:"Uniswap V3"
129
+ ```
130
+
131
+ ## Notes
132
+
133
+ - Chain aliases: Hyperliquid = `hyperevm`, BSC = `bnb`.
134
+ - Multiple channels can be combined: `--telegram 123 --slack https://...`
135
+ - `--data '<json>'` merges raw JSON on top of named flags (escape hatch for fields without named flags).
136
+ - Alert endpoints are internal-only. Non-internal users receive 404.
137
+ - Use single quotes for names with `$` or special characters: `--name 'SM >$1M'`
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: nansen-smart-money-alpha
3
+ description: "What tokens is smart money accumulating before they pump? Token screener with SM filter cross-referenced against netflow."
4
+ metadata:
5
+ openclaw:
6
+ requires:
7
+ env:
8
+ - NANSEN_API_KEY
9
+ bins:
10
+ - nansen
11
+ primaryEnv: NANSEN_API_KEY
12
+ install:
13
+ - kind: node
14
+ package: nansen-cli
15
+ bins: [nansen]
16
+ allowed-tools: Bash(nansen:*)
17
+ ---
18
+
19
+ # Alpha Discovery
20
+
21
+ **Answers:** "What tokens is smart money accumulating before they pump?"
22
+
23
+ ```bash
24
+ CHAIN=solana
25
+
26
+ nansen research token screener --chain $CHAIN --timeframe 24h --smart-money --limit 20
27
+ # → token_symbol, price_usd, price_change, volume, buy_volume, market_cap_usd, fdv, liquidity, token_age_days
28
+
29
+ nansen research smart-money netflow --chain $CHAIN --labels "Smart Trader" --limit 10
30
+ # → token_symbol, net_flow_1h/24h/7d/30d_usd, trader_count
31
+
32
+ # Confirm SM flow on a specific token from screener results
33
+ TOKEN=<address_from_screener>
34
+ nansen research token flow-intelligence --token $TOKEN --chain $CHAIN
35
+ # → net_flow_usd per label: smart_trader, whale, exchange, fresh_wallets
36
+ ```
37
+
38
+ Cross-reference screener results with positive netflow to find early accumulation.
39
+
40
+ ## Source
41
+
42
+ - npm: https://www.npmjs.com/package/nansen-cli
43
+ - GitHub: https://github.com/nansen-ai/nansen-cli
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: nansen-smart-money-tracker
3
+ description: Smart money tracking — netflow, trades, holdings, perp trades. Use when finding what smart money wallets are buying/selling or tracking whale activity.
4
+ metadata:
5
+ openclaw:
6
+ requires:
7
+ env:
8
+ - NANSEN_API_KEY
9
+ bins:
10
+ - nansen
11
+ primaryEnv: NANSEN_API_KEY
12
+ install:
13
+ - kind: node
14
+ package: nansen-cli
15
+ bins: [nansen]
16
+ allowed-tools: Bash(nansen:*)
17
+ ---
18
+
19
+ # Smart Money
20
+
21
+ All commands: `nansen research smart-money <sub> [options]`
22
+
23
+ ## Subcommands
24
+
25
+ ```bash
26
+ # Netflow — what tokens are smart money accumulating?
27
+ nansen research smart-money netflow --chain solana --limit 10
28
+
29
+ # DEX trades — real-time spot trades by smart money
30
+ nansen research smart-money dex-trades --chain solana --labels "Smart Trader" --limit 20
31
+
32
+ # Holdings — aggregated SM portfolio
33
+ nansen research smart-money holdings --chain solana --limit 10
34
+
35
+ # Perp trades — Hyperliquid only (no --chain needed)
36
+ nansen research smart-money perp-trades --limit 10
37
+ ```
38
+
39
+ ## Labels
40
+
41
+ Filter by smart money category with `--labels`:
42
+
43
+ | Label | Use case |
44
+ |-------|----------|
45
+ | `Fund` | Crypto funds |
46
+ | `Smart Trader` | All-time top performers |
47
+ | `30D Smart Trader` | Hot hands — top 30 days |
48
+ | `90D Smart Trader` | Top 90 days |
49
+ | `180D Smart Trader` | Top 180 days |
50
+ | `Smart HL Perps Trader` | Top Hyperliquid perp traders |
51
+
52
+ ```bash
53
+ nansen research smart-money netflow --chain solana --labels "Fund" --limit 10
54
+ ```
55
+
56
+ ## Flags
57
+
58
+ | Flag | Purpose |
59
+ |------|---------|
60
+ | `--chain` | Required for netflow/dex-trades/holdings |
61
+ | `--labels` | Filter by SM label (quote multi-word values) |
62
+ | `--limit` | Number of results |
63
+ | `--sort` | Sort field:direction (e.g. `value_usd:desc`) |
64
+ | `--fields` | Select specific fields |
65
+ | `--table` | Human-readable table output |
66
+ | `--format csv` | CSV export |
67
+
68
+ ## Notes
69
+
70
+ - `perp-trades` is Hyperliquid-only. No `--chain` flag.
71
+ - For a time-series view of SM positions: `nansen research smart-money historical-holdings --chain <chain> --days 30`
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: nansen-smart-money-trend
3
+ description: "Has SM been in this token for weeks, or did they just enter? Are they still buying?"
4
+ metadata:
5
+ openclaw:
6
+ requires:
7
+ env:
8
+ - NANSEN_API_KEY
9
+ bins:
10
+ - nansen
11
+ primaryEnv: NANSEN_API_KEY
12
+ install:
13
+ - kind: node
14
+ package: nansen-cli
15
+ bins: [nansen]
16
+ allowed-tools: Bash(nansen:*)
17
+ ---
18
+ ```bash
19
+ TOKEN=<address> CHAIN=ethereum
20
+ nansen research smart-money netflow --chain $CHAIN --limit 200
21
+ # → filter by token_address; net_flow_1h_usd, net_flow_24h_usd, net_flow_7d_usd, net_flow_30d_usd
22
+ nansen research token holders --token $TOKEN --chain $CHAIN --smart-money --limit 20
23
+ # → address_label, value_usd, balance_change_24h, balance_change_7d, balance_change_30d
24
+ nansen research token flow-intelligence --token $TOKEN --chain $CHAIN
25
+ # → smart_trader_net_flow_usd, whale_net_flow_usd, fund_net_flow_usd, fresh_wallets_net_flow_usd
26
+ nansen research token dex-trades --token $TOKEN --chain $CHAIN --limit 50
27
+ # → block_timestamp, action, trader_address_label — find oldest SM-labeled BUY
28
+ ```
29
+ 1h/24h+ & 7d/30d+ = sustained accumulation. 24h+ & 7d− = fresh entry.
30
+ 24h− & 7d+ = reducing. All negative = distribution.
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: nansen-token-research
3
+ description: Token deep dive — info, OHLCV, holders, flows, flow intelligence, who bought/sold, DEX trades, PnL, perp trades, perp positions, perp PnL leaderboard. Use when researching a specific token in depth.
4
+ metadata:
5
+ openclaw:
6
+ requires:
7
+ env:
8
+ - NANSEN_API_KEY
9
+ bins:
10
+ - nansen
11
+ primaryEnv: NANSEN_API_KEY
12
+ install:
13
+ - kind: node
14
+ package: nansen-cli
15
+ bins: [nansen]
16
+ allowed-tools: Bash(nansen:*)
17
+ ---
18
+
19
+ # Token Deep Dive
20
+
21
+ All commands: `nansen research token <sub> [options]`
22
+
23
+ `--chain` required for spot endpoints. Use `--token <address>` for token-specific endpoints.
24
+
25
+ ## Info & Price
26
+
27
+ ```bash
28
+ nansen research token info --token <addr> --chain solana
29
+ nansen research token ohlcv --token <addr> --chain solana --timeframe 1h
30
+ ```
31
+
32
+ Timeframes: `1m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `1d`, `1w`, `1M`
33
+
34
+ ## Holders
35
+
36
+ ```bash
37
+ nansen research token holders --token <addr> --chain solana
38
+ nansen research token holders --token <addr> --chain solana --smart-money
39
+ ```
40
+
41
+ ## Flows
42
+
43
+ ```bash
44
+ nansen research token flows --token <addr> --chain solana --days 7
45
+ nansen research token flow-intelligence --token <addr> --chain solana
46
+ nansen research token who-bought-sold --token <addr> --chain solana
47
+ ```
48
+
49
+ `flow-intelligence` breaks down by label: whales, smart traders, exchanges, fresh wallets, public figures.
50
+
51
+ ## DEX Trades
52
+
53
+ ```bash
54
+ nansen research token dex-trades --token <addr> --chain solana --limit 20
55
+ ```
56
+
57
+ ## PnL
58
+
59
+ ```bash
60
+ nansen research token pnl --token <addr> --chain solana --sort total_pnl_usd:desc
61
+ ```
62
+
63
+ ## Perps (no --chain)
64
+
65
+ ```bash
66
+ nansen research token perp-trades --symbol ETH --days 7
67
+ nansen research token perp-positions --symbol BTC
68
+ nansen research token perp-pnl-leaderboard --symbol SOL
69
+ ```
70
+
71
+ ## Flags
72
+
73
+ | Flag | Purpose |
74
+ |------|---------|
75
+ | `--chain` | Required for spot endpoints (ethereum, solana, base, etc.) |
76
+ | `--token` | Token address (alias: `--token-address`) |
77
+ | `--symbol` | Token symbol for perp endpoints (e.g. BTC) |
78
+ | `--timeframe` | OHLCV interval |
79
+ | `--smart-money` | Filter to SM wallets only (holders) |
80
+ | `--days` | Lookback period (default 30) |
81
+ | `--sort` | Sort field:direction (e.g. `total_pnl_usd:desc`) |
82
+ | `--fields` | Select specific fields |
83
+ | `--table` | Human-readable table output |
84
+ | `--format csv` | CSV export |
85
+
86
+ ## Notes
87
+
88
+ - Perp endpoints use `--symbol` (e.g. BTC), not `--token`.
89
+ - `holders --smart-money` returns UNSUPPORTED_FILTER for tokens without SM tracking.
90
+ - `flow-intelligence` may return all-zero flows for illiquid tokens.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: nansen-token-screener
3
+ description: "Discover trending tokens — screener, SM holdings, Nansen indicators, and flow intelligence for promising finds. Use when scanning for new tokens or screening what's hot."
4
+ metadata:
5
+ openclaw:
6
+ requires:
7
+ env:
8
+ - NANSEN_API_KEY
9
+ bins:
10
+ - nansen
11
+ primaryEnv: NANSEN_API_KEY
12
+ install:
13
+ - kind: node
14
+ package: nansen-cli
15
+ bins: [nansen]
16
+ allowed-tools: Bash(nansen:*)
17
+ ---
18
+
19
+ # Token Discovery
20
+
21
+ **Answers:** "What tokens are trending and worth a deeper look?"
22
+
23
+ ```bash
24
+ CHAIN=solana
25
+
26
+ # Screen top tokens by volume
27
+ nansen research token screener --chain $CHAIN --timeframe 24h --limit 20
28
+ # → token_symbol, price_usd, price_change, volume, buy_volume, market_cap_usd, fdv, liquidity, token_age_days
29
+
30
+ # Smart money only
31
+ nansen research token screener --chain $CHAIN --timeframe 24h --smart-money --limit 20
32
+
33
+ # Search within screener results (client-side filter)
34
+ nansen research token screener --chain $CHAIN --search "bonk"
35
+
36
+ # Smart money holdings — what SM wallets are holding
37
+ nansen research smart-money holdings --chain $CHAIN --labels "Smart Trader" --limit 20
38
+ # → token_symbol, value_usd, holders_count, balance_24h_percent_change, share_of_holdings_percent
39
+
40
+ # Nansen indicators for a specific token
41
+ TOKEN=<address>
42
+ nansen research token indicators --token $TOKEN --chain $CHAIN
43
+ # → risk_indicators, reward_indicators (each with score, signal, signal_percentile)
44
+
45
+ # Flow intelligence — only use for promising tokens from screener/indicators above
46
+ nansen research token flow-intelligence --token $TOKEN --chain $CHAIN
47
+ # → net_flow_usd per label: smart_trader, whale, exchange, fresh_wallets, public_figure
48
+ ```
49
+
50
+ Screener timeframes: `5m`, `10m`, `1h`, `6h`, `24h`, `7d`, `30d`
51
+
52
+ Indicators: score is "bullish"/"bearish"/"neutral". signal_percentile > 70 = historically significant. Some tokens return empty indicators — not an error.
53
+
54
+ Flow intelligence is credit-heavy. Use it to confirm SM conviction on tokens that already look promising from screener + indicators, not as a first pass on every token.
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: nansen-token-transfer-analysis
3
+ description: "Where is this token moving and why? Large transfers, flow trends over time, and breakdown by wallet label."
4
+ metadata:
5
+ openclaw:
6
+ requires:
7
+ env:
8
+ - NANSEN_API_KEY
9
+ bins:
10
+ - nansen
11
+ primaryEnv: NANSEN_API_KEY
12
+ install:
13
+ - kind: node
14
+ package: nansen-cli
15
+ bins: [nansen]
16
+ allowed-tools: Bash(nansen:*)
17
+ ---
18
+
19
+ # Token Forensics
20
+
21
+ **Answers:** "Where is this token moving? Who is sending it and where?"
22
+
23
+ ```bash
24
+ TOKEN=<address> CHAIN=ethereum
25
+ # Examples: UNI on ethereum (0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984)
26
+ # BONK on solana (DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263)
27
+ # Note: token flows does NOT support stablecoins (USDC, USDT, etc.) — use non-stablecoin tokens
28
+
29
+ nansen research token transfers --token $TOKEN --chain $CHAIN --days 7 --limit 20
30
+ # → from_address_label, to_address_label, transfer_amount, transfer_value_usd
31
+
32
+ nansen research token flows --token $TOKEN --chain $CHAIN --days 7 --limit 20
33
+ # → date, price_usd, holders_count, total_inflows_count, total_outflows_count
34
+ # ⚠ Returns HTTP 422 for stablecoins — skip this command if TOKEN is a stablecoin
35
+
36
+ nansen research token flow-intelligence --token $TOKEN --chain $CHAIN
37
+ # → net_flow_usd per label: smart_trader, whale, exchange, fresh_wallets, public_figure
38
+ ```
39
+
40
+ Rising exchange_net_flow + large transfers to exchange addresses = potential sell pressure. Fresh wallet inflows may signal new interest or wash trading.
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: nansen-trading
3
+ description: Execute DEX swaps on Solana or Base. Use when buying or selling a token, getting a swap quote, or executing a trade.
4
+ metadata:
5
+ openclaw:
6
+ requires:
7
+ env:
8
+ - NANSEN_API_KEY
9
+ - NANSEN_WALLET_PASSWORD
10
+ bins:
11
+ - nansen
12
+ primaryEnv: NANSEN_API_KEY
13
+ install:
14
+ - kind: node
15
+ package: nansen-cli
16
+ bins: [nansen]
17
+ allowed-tools: Bash(nansen:*)
18
+ ---
19
+
20
+ # Trade
21
+
22
+ Two-step flow: quote then execute. **Trades are irreversible once on-chain.**
23
+
24
+ **Prerequisite:** You need a wallet first. Run `nansen wallet create` before trading.
25
+
26
+ ## Quote
27
+
28
+ ```bash
29
+ nansen trade quote \
30
+ --chain solana \
31
+ --from SOL \
32
+ --to USDC \
33
+ --amount 1000000000
34
+ ```
35
+
36
+ Symbols resolve automatically: `SOL`, `ETH`, `USDC`, `USDT`, `WETH`. Raw addresses also work.
37
+
38
+ ## Execute
39
+
40
+ ```bash
41
+ nansen trade execute --quote <quote-id>
42
+ ```
43
+
44
+ ## Agent pattern
45
+
46
+ ```bash
47
+ # Pipe quote ID directly into execute
48
+ quote_id=$(nansen trade quote --chain solana --from SOL --to USDC --amount 1000000000 2>&1 | grep "Quote ID:" | awk '{print $NF}')
49
+ nansen trade execute --quote "$quote_id"
50
+ ```
51
+
52
+ ## Common Token Addresses
53
+
54
+ | Token | Chain | Address |
55
+ |-------|-------|---------|
56
+ | SOL | Solana | `So11111111111111111111111111111111111111112` |
57
+ | USDC | Solana | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` |
58
+ | ETH | Base | `0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` |
59
+ | USDC | Base | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` |
60
+
61
+ ## Amounts are in base units
62
+
63
+ | Token | Decimals | 1 token = |
64
+ |-------|----------|-----------|
65
+ | SOL | 9 | `1000000000` |
66
+ | ETH | 18 | `1000000000000000000` |
67
+ | USDC | 6 | `1000000` |
68
+
69
+ ## Flags
70
+
71
+ | Flag | Purpose |
72
+ |------|---------|
73
+ | `--chain` | `solana` or `base` |
74
+ | `--from` | Source token (symbol or address) |
75
+ | `--to` | Destination token (symbol or address) |
76
+ | `--amount` | Amount in base units (integer) |
77
+ | `--wallet` | Wallet name (default: default wallet) |
78
+ | `--slippage` | Slippage tolerance as decimal (e.g. 0.03) |
79
+ | `--quote` | Quote ID for execute |
80
+ | `--no-simulate` | Skip pre-broadcast simulation |
81
+
82
+ ## Environment Variables
83
+
84
+ | Var | Purpose |
85
+ |-----|---------|
86
+ | `NANSEN_WALLET_PASSWORD` | **Required for `trade execute`.** Wallet encryption password — persisted in `~/.nansen/.env`. Source before executing: `source ~/.nansen/.env && nansen trade execute ...` |
87
+ | `NANSEN_API_KEY` | API key (also set via `nansen login`) |
88
+
89
+ > **Agents:** Never hold a wallet password only in session memory. If `NANSEN_WALLET_PASSWORD` is not in `~/.nansen/.env`, follow the setup flow in the nansen-wallet-manager skill Password Policy to generate and persist one before proceeding.
90
+
91
+ ## Notes
92
+
93
+ - Quotes expire after ~1 hour. If execute fails, get a fresh quote.
94
+ - A wallet is required even for quotes (the API builds sender-specific transactions).
95
+ - ERC-20 swaps may require an approval step — execute handles this automatically.
96
+
97
+ ## Source
98
+
99
+ - npm: https://www.npmjs.com/package/nansen-cli
100
+ - GitHub: https://github.com/nansen-ai/nansen-cli
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: nansen-wallet-batch
3
+ description: "Which of these addresses are smart money? Batch-profile a list in one call."
4
+ metadata:
5
+ openclaw:
6
+ requires:
7
+ env:
8
+ - NANSEN_API_KEY
9
+ bins:
10
+ - nansen
11
+ primaryEnv: NANSEN_API_KEY
12
+ install:
13
+ - kind: node
14
+ package: nansen-cli
15
+ bins: [nansen]
16
+ allowed-tools: Bash(nansen:*)
17
+ ---
18
+ ```bash
19
+ ADDRESSES="0xaddr1,0xaddr2,0xaddr3,..." CHAIN=ethereum
20
+ nansen research profiler batch --addresses "$ADDRESSES" --chain $CHAIN --include labels,balance
21
+ # → .data.{total, completed, results[]: {address, chain, labels[], balance, error}}
22
+ # labels[]: {label, category ("smart_money","fund","social","behavioral","others"), fullname}
23
+ # balance: {data[]: {token_symbol, token_amount, price_usd, value_usd}}
24
+ ```
25
+ Check .error per result — invalid addresses return an error message, not a crash. Skip those.
26
+ Keep addresses where any label.category == "smart_money" or "fund". Omit balance for faster checks.
@@ -0,0 +1,43 @@
1
+ # Wallet Attribution — Reference
2
+
3
+ ## Expansion Protocol
4
+
5
+ Run steps 1-2 on the seed address. For every new address found, ask the human:
6
+ **"Found `<addr>` via `<signal>` (`<label>`). Want me to query it?"**
7
+ On confirm, re-run steps 1-2 on it. Reserve step 3 (counterparties) for the seed address only.
8
+
9
+ **Stop expanding when:** address is a known protocol/CEX · confidence is Low · already visited · cluster > 10 wallets.
10
+
11
+ ## Attribution Rules
12
+
13
+ - CEX withdrawal → wallet owner (NOT the CEX)
14
+ - Smart account/DCA bot → end-user who funds it (NOT the protocol)
15
+ - Safe deployer ≠ owner — identical signer sets across Safes = same controller
16
+
17
+ ## Confidence Scoring
18
+
19
+ | Confidence | Signals |
20
+ |------------|---------|
21
+ | **High** | First Funder / shared Safe signers / same CEX deposit address |
22
+ | **Medium** | Coordinated balance movements / related-wallets + label match |
23
+ | **Exclude** | ENS alone, single CEX withdrawal, single deployer |
24
+
25
+ ## Output Format
26
+
27
+ `address` · `owner` · `confidence (H/M/L)` · `signals` · `role`
28
+
29
+ ## L2 Coverage
30
+
31
+ When step 3 returns sparse results on a mainnet EVM address, extend to L2s (4 calls):
32
+
33
+ ```bash
34
+ for CHAIN in base arbitrum optimism polygon; do
35
+ nansen research profiler counterparties --address $ADDR --chain $CHAIN --days 365
36
+ done
37
+ ```
38
+
39
+ ## Cost Warnings
40
+
41
+ - `trace` is credit-heavy; keep `--width 3` or lower
42
+ - L2 counterparty checks above add 4 API calls per address
43
+ - Historical balances reveal past holdings on drained wallets — useful fingerprint
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: nansen-wallet-clustering
3
+ description: "Cluster and attribute related wallets — funding chains, shared signers, CEX deposit patterns. Use when tracing wallet ownership, comparing two wallets, finding wallet relationships, governance voters, or related address clusters."
4
+ metadata:
5
+ openclaw:
6
+ requires:
7
+ env:
8
+ - NANSEN_API_KEY
9
+ bins:
10
+ - nansen
11
+ primaryEnv: NANSEN_API_KEY
12
+ install:
13
+ - kind: node
14
+ package: nansen-cli
15
+ bins: [nansen]
16
+ allowed-tools: Bash(nansen:*)
17
+ ---
18
+
19
+ # Wallet Attribution
20
+
21
+ **Answers:** "Who controls this wallet? Are these wallets related?"
22
+
23
+ Chain: `0x` → `--chain ethereum` (also base, arbitrum, optimism, polygon). Base58 → `--chain solana`.
24
+
25
+ ```bash
26
+ ADDR=<address> CHAIN=<ethereum|solana|base|...> # detect from address format above
27
+ # 1. Identity
28
+ nansen research profiler labels --address $ADDR --chain $CHAIN
29
+ # 2. Related wallets (paginate with --page N)
30
+ nansen research profiler related-wallets --address $ADDR --chain $CHAIN
31
+ # 3. Counterparties (paginate with --page N; widen with --days 365 if empty)
32
+ nansen research profiler counterparties --address $ADDR --chain $CHAIN --days 90
33
+ # 4. Batch profile cluster
34
+ nansen research profiler batch --addresses "addr1,addr2" --chain $CHAIN --include labels,balance,pnl
35
+ # 5. Compare pairs → shared_counterparties, shared_tokens, balances
36
+ nansen research profiler compare --addresses "addr1,addr2" --chain $CHAIN
37
+ # 6. Historical balances (fingerprint drained wallets)
38
+ nansen research profiler historical-balances --address $ADDR --chain $CHAIN --days 90
39
+ # 7. Multi-hop trace (credit-heavy — keep --width ≤3)
40
+ nansen research profiler trace --address $ADDR --chain $CHAIN --depth 2 --width 3
41
+ ```
42
+
43
+ **Expansion:** Run steps 1-2 on seed. For each new address found, ask the human before querying. Reserve step 3 for seed only.
44
+ **Stop when:** known protocol/CEX · Low confidence · already visited · cluster > 10 wallets.
45
+ **Confidence:** High = first funder / shared Safe signers / same CEX deposit. Medium = coordinated movements / related-wallets + label match. Exclude = ENS only, single CEX withdrawal, single deployer.
46
+ Full attribution rules in REFERENCE.md.