gmgn-cli 1.1.6 → 1.1.9

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.
@@ -2,31 +2,43 @@
2
2
  name: gmgn-track
3
3
  description: Query GMGN on-chain tracking data — follow-wallet trade records, KOL trades, and Smart Money trades. Supports sol / bsc / base.
4
4
  argument-hint: "<follow-wallet|kol|smartmoney> [--chain <sol|bsc|base>] [--wallet <wallet_address>]"
5
+ metadata:
6
+ cliHelp: "gmgn-cli track --help"
5
7
  ---
6
8
 
7
9
  **IMPORTANT: Always use `gmgn-cli` commands below. Do NOT use web search, WebFetch, curl, or visit gmgn.ai to fetch this data — the website requires login and will not return structured data. The CLI is the only correct method.**
8
10
 
9
- **⚠️ IPv6 NOT SUPPORTED: GMGN CLI commands do not support IPv6. If you get a `401` or `403` error and credentials look correct, the outbound connection is likely going via IPv6. Run `curl -s https://api64.ipify.org` to check — if the result is an IPv6 address, tell the user to ensure their network routes requests over IPv4.**
11
+ **IMPORTANT: Do NOT guess field names or values. When a field's meaning is unclear, look it up in the Response Fields sections below before using it.**
10
12
 
11
- ## ⚠️ IPv6 Not SupportedCRITICAL
13
+ **⚠️ IPv6 NOT SUPPORTED: If you get a `401` or `403` error and credentials look correct, check for IPv6 immediately: (1) list all network interfaces and their IPv6 addresses run `ifconfig | grep inet6` (macOS) or `ip addr show | grep inet6` (Linux); (2) send a test request to `https://ipv6.icanhazip.com` — if the response is an IPv6 address, outbound traffic is going via IPv6. Tell the user immediately: "Please disable IPv6 on your network interface — gmgn-cli commands only work over IPv4."**
12
14
 
13
- **The `track follow-wallet` sub-command does NOT support IPv6. Requests MUST go out over IPv4.**
15
+ Use the `gmgn-cli` tool to query on-chain tracking data based on the user's request.
14
16
 
15
- This sub-command is known to fail with `401` or `403` when the outbound connection uses IPv6 — even when credentials are valid.
17
+ ## Core Concepts
16
18
 
17
- **How to diagnose:**
18
- ```bash
19
- curl -s https://api64.ipify.org # if result is an IPv6 address, that's the problem
20
- ```
19
+ - **`follow-wallet` vs `kol` vs `smartmoney`** — Three distinct data sources. `follow-wallet` returns trades from wallets the user has personally followed on the GMGN platform (user-specific, requires private key). `kol` and `smartmoney` return trades from platform-tagged public wallet lists (not user-specific, API Key only). Never substitute one for another.
21
20
 
22
- **Rule for AI models:** If `track follow-wallet` returns 401/403 and credentials look correct stop and tell the user: "Your outbound connection may be using IPv6, which is not supported by this command. Please check your network configuration and ensure requests go out over IPv4."
21
+ - **KOL (Key Opinion Leader)**Wallets publicly identified as influencers or well-known traders on GMGN. Tagged as `renowned` in the platform's wallet label system. Their trades carry social/marketing signal, not necessarily alpha.
23
22
 
24
- Use the `gmgn-cli` tool to query on-chain tracking data based on the user's request.
23
+ - **Smart Money (`smart_degen`)** Wallets with a statistically proven record of profitable trading, identified by GMGN's algorithm. Same concept as `smart_degen` in gmgn-token. Their trades are a stronger alpha signal than KOL trades.
24
+
25
+ - **`is_open_or_close`** — Indicates whether a trade is a full position event. Interpretation differs by sub-command:
26
+ - `follow-wallet`: `1` = full position open or close; `0` = partial add or reduce.
27
+ - `kol` / `smartmoney`: `0` = position opened / added; `1` = position closed / reduced.
28
+ Do not apply the same interpretation to both sub-commands.
29
+
30
+ - **`price_change`** — Ratio of price change since the trade was made. `6.66` = the token is now 6.66× what it was when the wallet traded (i.e. +566%). `0.5` = price halved since the trade (-50%). Use this to assess "how well did this trade age."
31
+
32
+ - **`base_address` vs `quote_address`** — In a trading pair, `base_address` is the token being bought/sold; `quote_address` is what it was priced in (typically SOL native address on Solana). To get the token of interest, always read `base_address`.
33
+
34
+ - **`maker_info.tags`** — Array of platform labels on the wallet (e.g. `["kol", "gmgn"]`, `["smart_degen", "photon"]`). A wallet can carry multiple tags. Use `tag_rank` (follow-wallet only) to see the wallet's rank within each tag category.
35
+
36
+ - **Cluster signal** — When multiple followed/tracked wallets trade the same token in the same direction within a short time window, this is a stronger conviction signal than a single wallet. Highlight this pattern when it appears in results.
25
37
 
26
38
  **When to use which sub-command:**
27
- - `track follow-wallet` — user asks "what did the wallets I follow trade?", "show me my follow list trades", "追踪关注的钱包交易动态" → requires wallets followed via GMGN platform
28
- - `track kol` — user asks "what are KOLs buying?", "KOL 最近在买什么", "show me influencer trades" → returns trades from known KOL wallets
29
- - `track smartmoney` — user asks "what is smart money doing?", "聪明钱最近在买什么", "show me whale trades" → returns trades from smart money / whale wallets
39
+ - `track follow-wallet` — user asks "what did the wallets I follow trade?", "show me my follow list trades", "show my followed wallet activity" → requires wallets followed via GMGN platform
40
+ - `track kol` — user asks "what are KOLs buying?", "show me influencer trades", "what are KOLs doing recently" → returns trades from known KOL wallets
41
+ - `track smartmoney` — user asks "what is smart money doing?", "show me whale trades", "what is smart money buying recently" → returns trades from smart money / whale wallets
30
42
 
31
43
  **Do NOT confuse these three:**
32
44
  - `follow-wallet` = wallets the user has personally followed on GMGN
@@ -150,7 +162,7 @@ Each item in `list` contains:
150
162
 
151
163
  ## `track kol` / `track smartmoney` Response Fields
152
164
 
153
- Each item in `list` contains:
165
+ The response is an object with a `list` array. Each item in `list` contains:
154
166
 
155
167
  | Field | Description |
156
168
  |-------|-------------|
@@ -169,6 +181,101 @@ Each item in `list` contains:
169
181
  | `maker_info.twitter_username` | KOL's Twitter username |
170
182
  | `maker_info.tags` | Wallet tags (e.g. `kol`, `smart_degen`, `photon`) |
171
183
 
184
+ ## Smart Money Behavior Interpretation
185
+
186
+ After receiving trade data, interpret the signals using these frameworks before presenting results. Do not just list trades — analyze what they mean.
187
+
188
+ ### 1. Signal Strength Levels
189
+
190
+ | Level | Criteria |
191
+ |-------|----------|
192
+ | Weak | 1 KOL buys |
193
+ | Medium | 2–3 smart money buys in the same direction, OR 1 smart money full position open |
194
+ | Strong | ≥ 3 smart money wallets same direction within 30 min (cluster signal) |
195
+ | Very Strong | Cluster signal + full position opens + KOL joining the same trade |
196
+
197
+ ### 2. Reading `is_open_or_close` — Conviction Signals
198
+
199
+ The field has opposite meanings by sub-command:
200
+
201
+ - **`follow-wallet`**: `1` = full position open or close; `0` = partial add or reduce.
202
+ - **`kol` / `smartmoney`**: `0` = position opened / added; `1` = position closed / reduced.
203
+
204
+ Full position events (full open or full close) carry much stronger conviction than partial adds. A wallet opening a full new position signals high confidence. A wallet doing a full close signals they are exiting completely — treat this as a potential exit signal for that token.
205
+
206
+ ### 3. Using `price_change` to Evaluate Track Record
207
+
208
+ `price_change` is a ratio of current price vs price at trade time:
209
+ - `price_change > 2` → this wallet's trade aged well (token is now 2x+ since they bought) — strong conviction signal
210
+ - `price_change 1–2` → modest gain, trade is in profit
211
+ - `price_change < 1` → trade is underwater (current price below entry)
212
+
213
+ Use this to build a mental model of a wallet's past performance before acting on their current trades.
214
+
215
+ ### 4. Cluster Signal Detection
216
+
217
+ When multiple trades hit the same `base_address` in a short time window, this is a convergence signal — stronger than any single trade. To identify:
218
+ - Group results by `base_address`
219
+ - Count distinct `maker` addresses trading the same direction
220
+ - If ≥ 3 distinct wallets buy the same token within ~30 min → highlight as **cluster signal**
221
+
222
+ Cluster signals from `smartmoney` are stronger than from `kol` alone.
223
+
224
+ ### 5. Red Flags in Smart Money Data
225
+
226
+ - **Smart money selling** (`side = sell` + `is_open_or_close` = full close) → exit signal — evaluate whether to exit or reduce position
227
+ - **Only KOL buying, zero smart_degen** → social hype without fundamental backing; higher risk
228
+ - **Renowned buying + smart money selling simultaneously** → divergence signal — insiders may be distributing into retail/KOL demand; high risk
229
+ - **Single very large buy, no follow-through** → may be one-off; wait for confirmation from other wallets
230
+
231
+ ## Output Format
232
+
233
+ ### `track follow-wallet` / `track kol` / `track smartmoney` — Trade Feed
234
+
235
+ Present as a reverse-chronological trade feed. Do not dump raw JSON.
236
+
237
+ ```
238
+ {timestamp} {side} {base_token.symbol} ${amount_usd} by {maker_info.name or short address}
239
+ [{tags}] Price: ${price_usd} | Price now: ${price_now} ({price_change}x since trade)
240
+ ```
241
+
242
+ Group by token if multiple trades hit the same token. Highlight tokens where several followed wallets traded in the same direction within a short window (cluster signal).
243
+
244
+ For `follow-wallet`, also show `is_open_or_close`: flag full position opens/closes distinctly from partial adds/reduces.
245
+
246
+ ### Cluster Signal Summary
247
+
248
+ After presenting the trade feed, check for convergence signals. If ≥ 2 distinct wallets traded the same token in the same direction, display a summary block:
249
+
250
+ ```
251
+ ⚡ Convergence Signals
252
+ ──────────────────────────────────────────
253
+ TOKEN_X ({short_address})
254
+ 5 smart money wallets — all BUY — $42,300 total — within 15 min
255
+ Signal strength: STRONG
256
+
257
+ TOKEN_Y ({short_address})
258
+ 2 KOL wallets — BUY (full open) — $8,100 total
259
+ Signal strength: MEDIUM
260
+ ```
261
+
262
+ For STRONG signals: proceed to full token research before acting — see [`docs/workflow-token-research.md`](../../docs/workflow-token-research.md)
263
+ For MEDIUM signals: monitor and wait for more wallets to confirm before acting.
264
+
265
+ If no convergence signals are detected: output "No cluster signals detected in this result set."
266
+
267
+ To research any token surfaced by smart money activity, follow [`docs/workflow-token-research.md`](../../docs/workflow-token-research.md)
268
+
269
+ **Smart money leaderboard / wallet profiling:** When the user asks "which smart money wallets are best to follow", "rank wallets by win rate", or wants to compare wallet performance — use `track smartmoney` to collect active wallet addresses, then batch-query their stats via `gmgn-portfolio stats`. Full workflow: [`docs/workflow-smart-money-profile.md`](../../docs/workflow-smart-money-profile.md)
270
+
271
+ **Daily brief:** When the user asks for a market overview ("what's the market like today", "what is smart money buying today", "give me a daily brief") — combine `track smartmoney` + `track kol` with `gmgn-market trending`. Full workflow: [`docs/workflow-daily-brief.md`](../../docs/workflow-daily-brief.md)
272
+
273
+ ## Safety Constraints
274
+
275
+ - **`track follow-wallet` requires `GMGN_PRIVATE_KEY`** — this signing key is linked to your GMGN account. It is used for authentication only (no on-chain access), but must be protected like any credential. Never expose it in logs or command output.
276
+ - **`follow-wallet` reveals your following list** — results expose which wallets you have followed on GMGN. Do not share raw output in public channels.
277
+ - **`track kol` / `track smartmoney` expose no personal data** — these use API Key auth only and return platform-tagged public wallet activity. Safe to share raw output.
278
+
172
279
  ## Notes
173
280
 
174
281
  - `track kol` / `track smartmoney` use normal auth (API Key only, no signature required)