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.
- package/Readme.md +196 -51
- package/Readme.zh.md +217 -29
- package/dist/client/OpenApiClient.d.ts +1 -1
- package/dist/client/OpenApiClient.d.ts.map +1 -1
- package/dist/client/OpenApiClient.js +18 -4
- package/dist/client/OpenApiClient.js.map +1 -1
- package/dist/commands/market.d.ts.map +1 -1
- package/dist/commands/market.js +167 -5
- package/dist/commands/market.js.map +1 -1
- package/dist/commands/portfolio.d.ts.map +1 -1
- package/dist/commands/portfolio.js +6 -15
- package/dist/commands/portfolio.js.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/gmgn-market/SKILL.md +270 -40
- package/skills/gmgn-portfolio/SKILL.md +133 -6
- package/skills/gmgn-swap/SKILL.md +89 -21
- package/skills/gmgn-token/SKILL.md +213 -53
- package/skills/gmgn-track/SKILL.md +121 -14
|
@@ -2,21 +2,52 @@
|
|
|
2
2
|
name: gmgn-market
|
|
3
3
|
description: Query GMGN market data — token K-line (candlestick), trending token swap data, and Trenches token lists. Supports sol / bsc / base.
|
|
4
4
|
argument-hint: "kline --chain <sol|bsc|base> --address <token_address> --resolution <1m|5m|15m|1h|4h|1d> [--from <unix_ts>] [--to <unix_ts>] | trending --chain <sol|bsc|base> --interval <1m|5m|1h|6h|24h> | trenches --chain <sol|bsc|base>"
|
|
5
|
+
metadata:
|
|
6
|
+
cliHelp: "gmgn-cli market --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
|
-
|
|
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.**
|
|
12
|
+
|
|
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."**
|
|
10
14
|
|
|
11
15
|
Use the `gmgn-cli` tool to query K-line data for a token, browse trending tokens, or view Trenches token lists.
|
|
12
16
|
|
|
17
|
+
## Core Concepts
|
|
18
|
+
|
|
19
|
+
- **`--filter` chain defaults** — SOL and EVM chains have different default safety filters that are applied automatically when `--filter` is omitted. Do not assume the same defaults apply across chains:
|
|
20
|
+
- **SOL**: defaults to `renounced frozen` (mint and freeze authority renounced)
|
|
21
|
+
- **BSC / Base (EVM)**: defaults to `not_honeypot verified renounced`
|
|
22
|
+
- Omitting `--filter` is NOT the same as "no filter" — the chain defaults are always applied. To use a custom filter set, explicitly specify all desired filter tags.
|
|
23
|
+
|
|
24
|
+
- **`volume` vs `amount` (kline)** — Naming is counterintuitive. `volume` = USD dollar value of trades; `amount` = token units traded. For a token priced at $0.0002, these differ by 5,000×. Always use `volume` for "how much USD was traded" and `amount` for "how many tokens changed hands."
|
|
25
|
+
|
|
26
|
+
- **`rug_ratio`** — A 0–1 score estimating rug pull likelihood. Values above `0.3` are high-risk. Do not treat as binary — combine with `top_10_holder_rate`, `dev_team_hold_rate`, and `is_honeypot` for a full picture.
|
|
27
|
+
|
|
28
|
+
- **`smart_degen_count` / `renowned_count`** — Number of platform-tagged smart money wallets (`smart_degen`) and KOL wallets (`renowned`) holding or trading this token. High values are bullish signals. These are GMGN-tagged wallet lists, not user-defined.
|
|
29
|
+
|
|
30
|
+
- **`hot_level`** — Trending intensity score. Higher = more actively traded right now. Not normalized — compare relative values within the same result set, not across time windows.
|
|
31
|
+
|
|
32
|
+
- **`renounced_mint` / `renounced_freeze_account`** — SOL-specific. Indicate whether the creator gave up the ability to mint more tokens or freeze wallets. Both being `1` is a safety baseline on Solana. Always `false` on EVM chains (concept does not apply).
|
|
33
|
+
|
|
34
|
+
- **`is_honeypot`** — EVM-specific (BSC / Base). Indicates whether the token contract prevents selling. Always empty/null on SOL — do not interpret an empty value as "not a honeypot" on Solana.
|
|
35
|
+
|
|
36
|
+
- **`creator_token_status`** — Dev holding status. `creator_hold` = dev still holds tokens (sell pressure risk). `creator_close` = dev has sold or burned their allocation (exit signal confirmed).
|
|
37
|
+
|
|
38
|
+
- **`cto_flag`** — Community Takeover flag. `1` = original dev abandoned the project and a community group took over marketing/development. Neutral to positive signal; evaluate in context.
|
|
39
|
+
|
|
40
|
+
- **Trenches categories** — Three lifecycle stages of launchpad tokens: `new_creation` (just created, still on bonding curve), `near_completion` (bonding curve nearly full, about to graduate), `completed` (graduated to open market / DEX). In the response, `near_completion` is always returned under the key `data.pump` regardless of the input `--type`.
|
|
41
|
+
|
|
42
|
+
- **`wash_trading` / `rat_trader_amount_rate` / `bundler_rate`** — Risk signals for artificial activity. `is_wash_trading` = coordinated fake volume detected. `rat_trader_amount_rate` = ratio of insider/sneak trading. `bundler_rate` = ratio of bot-bundled buys at launch. High values (> 0.3) suggest manipulated price action.
|
|
43
|
+
|
|
13
44
|
## Sub-commands
|
|
14
45
|
|
|
15
46
|
| Sub-command | Description |
|
|
16
47
|
|-------------|-------------|
|
|
17
48
|
| `market kline` | Token candlestick / OHLCV data and trading volume over a time range |
|
|
18
49
|
| `market trending` | Trending tokens ranked by swap activity — use `--interval` to specify the time window (e.g. `1m` for 1-minute hottest, `1h` for 1-hour trending) |
|
|
19
|
-
| `market trenches` | Newly launched launchpad
|
|
50
|
+
| `market trenches` | Newly launched launchpad platform tokens — **use this when the user asks for "new tokens", "just launched tokens", "latest tokens on pump.fun/letsbonk"**. Three categories: `new_creation` (just created), `near_completion` (bonding curve almost full), `completed` (graduated to open market / DEX) |
|
|
20
51
|
|
|
21
52
|
## Supported Chains
|
|
22
53
|
|
|
@@ -67,11 +98,11 @@ The response is an object with a `list` array. Each element in `list` is one can
|
|
|
67
98
|
|
|
68
99
|
| User says | `--interval` |
|
|
69
100
|
|-----------|-------------|
|
|
70
|
-
| "
|
|
71
|
-
| "
|
|
72
|
-
| "
|
|
73
|
-
| "
|
|
74
|
-
| "
|
|
101
|
+
| "1m trending" / "hottest right now" | `1m` |
|
|
102
|
+
| "5m" / "5 minute" | `5m` |
|
|
103
|
+
| "1h" / "1 hour" / no time specified (default) | `1h` |
|
|
104
|
+
| "6h" / "6 hour" | `6h` |
|
|
105
|
+
| "24h" / "today" / "daily" | `24h` |
|
|
75
106
|
|
|
76
107
|
| Option | Description |
|
|
77
108
|
|--------|-------------|
|
|
@@ -80,7 +111,7 @@ The response is an object with a `list` array. Each element in `list` is one can
|
|
|
80
111
|
| `--limit <n>` | Number of results (default 100, max 100) |
|
|
81
112
|
| `--order-by <field>` | Sort field: `default` / `swaps` / `marketcap` / `history_highest_market_cap` / `liquidity` / `volume` / `holder_count` / `smart_degen_count` / `renowned_count` / `gas_fee` / `price` / `change1m` / `change5m` / `change1h` / `creation_timestamp` |
|
|
82
113
|
| `--direction <asc\|desc>` | Sort direction (default `desc`) |
|
|
83
|
-
| `--filter <tag...>` | Repeatable filter tags (chain-specific).
|
|
114
|
+
| `--filter <tag...>` | Repeatable filter tags (chain-specific). **⚠️ SOL defaults: `renounced frozen`; BSC/Base defaults: `not_honeypot verified renounced`.** Omitting `--filter` is NOT "no filter" — chain defaults always apply. **sol** tags: `renounced` / `frozen` / `burn` / `token_burnt` / `has_social` / `not_social_dup` / `not_image_dup` / `dexscr_update_link` / `not_wash_trading` / `is_internal_market` / `is_out_market`. **evm** tags: `not_honeypot` / `verified` / `renounced` / `locked` / `token_burnt` / `has_social` / `not_social_dup` / `not_image_dup` / `dexscr_update_link` / `is_internal_market` / `is_out_market` |
|
|
84
115
|
| `--platform <name...>` | Repeatable platform filter (chain-specific). **sol**: `Pump.fun` / `pump_mayhem` / `pump_mayhem_agent` / `pump_agent` / `letsbonk` / `bonkers` / `bags` / `memoo` / `liquid` / `bankr` / `zora` / `surge` / `anoncoin` / `moonshot_app` / `wendotdev` / `heaven` / `sugar` / `token_mill` / `believe` / `trendsfun` / `trends_fun` / `jup_studio` / `Moonshot` / `boop` / `xstocks` / `ray_launchpad` / `meteora_virtual_curve` / `pool_ray` / `pool_meteora` / `pool_pump_amm` / `pool_orca`. **bsc**: `fourmeme` / `fourmeme_agent` / `bn_fourmeme` / `flap` / `clanker` / `lunafun` / `pool_uniswap` / `pool_pancake`. **base**: `clanker` / `bankr` / `flaunch` / `zora` / `zora_creator` / `baseapp` / `basememe` / `virtuals_v2` / `klik` |
|
|
85
116
|
|
|
86
117
|
## Usage Examples
|
|
@@ -314,50 +345,80 @@ The response is `data.rank` — an array of rank items. Each item represents one
|
|
|
314
345
|
|
|
315
346
|
## Workflow: Discover Trading Opportunities via Trending
|
|
316
347
|
|
|
317
|
-
|
|
348
|
+
Full workflow for discovering market opportunities: [`docs/workflow-market-opportunities.md`](../../docs/workflow-market-opportunities.md)
|
|
318
349
|
|
|
319
|
-
|
|
350
|
+
Steps: fetch trending (50 results, safe filters) → AI multi-factor analysis (smart money, volume, momentum, liquidity, maturity) → present top 5 table with rationale → offer deep dive or swap.
|
|
320
351
|
|
|
321
|
-
|
|
322
|
-
gmgn-cli market trending \
|
|
323
|
-
--chain <chain> --interval 1h \
|
|
324
|
-
--order-by volume --limit 50 \
|
|
325
|
-
--filter not_honeypot --filter has_social --raw
|
|
326
|
-
```
|
|
352
|
+
When results contain interesting tokens, proceed to full token due diligence: [`docs/workflow-token-research.md`](../../docs/workflow-token-research.md)
|
|
327
353
|
|
|
328
|
-
|
|
354
|
+
**For new / launchpad tokens** (`market trenches`): apply the structured early project screening workflow that includes security check and smart money entry detection — [`docs/workflow-early-project-screening.md`](../../docs/workflow-early-project-screening.md)
|
|
329
355
|
|
|
330
|
-
|
|
356
|
+
**For a daily market overview** (user asks "what's the market like today", "give me a daily brief", "what is smart money buying today"): combine `market trending` + `market trenches` with `gmgn-track smartmoney` — [`docs/workflow-daily-brief.md`](../../docs/workflow-daily-brief.md)
|
|
331
357
|
|
|
332
|
-
|
|
333
|
-
|--------|----------|--------|-------|
|
|
334
|
-
| Smart money interest | `smart_degen_count`, `renowned_count` | High | Key conviction indicator |
|
|
335
|
-
| Bluechip ownership | `bluechip_owner_percentage` | Medium | Quality of holder base |
|
|
336
|
-
| Real trading activity | `volume`, `swaps` | Medium | Distinguishes genuine interest from wash trading |
|
|
337
|
-
| Price momentum | `change1h`, `change5m` | Medium | Prefer positive, non-parabolic moves |
|
|
338
|
-
| Pool safety | `liquidity` | Medium | Low liquidity = high slippage risk |
|
|
339
|
-
| Token maturity | `creation_timestamp` | Low | Avoid tokens less than ~1h old unless other signals are very strong |
|
|
358
|
+
## Token Quality Filter Criteria
|
|
340
359
|
|
|
341
|
-
|
|
360
|
+
When evaluating tokens returned from `market trending` or `market trenches`, apply these criteria to quickly separate high-quality opportunities from noise. Do not present raw results without filtering.
|
|
342
361
|
|
|
343
|
-
###
|
|
362
|
+
### Pass / Watch / Skip Criteria
|
|
344
363
|
|
|
345
|
-
|
|
364
|
+
| Signal | 🟢 Pass | 🟡 Watch | 🔴 Skip |
|
|
365
|
+
|--------|---------|---------|---------|
|
|
366
|
+
| `smart_degen_count` | ≥ 3 | 1–2 | 0 |
|
|
367
|
+
| `rug_ratio` | < 0.1 | 0.1–0.3 | > 0.3 |
|
|
368
|
+
| `creator_token_status` | `creator_close` | — | `creator_hold` |
|
|
369
|
+
| `is_wash_trading` | `false` | — | `true` → skip immediately |
|
|
370
|
+
| `top_10_holder_rate` | < 0.20 | 0.20–0.50 | > 0.50 |
|
|
371
|
+
| `liquidity` | > $50k | $10k–$50k | < $10k |
|
|
372
|
+
| `has_social` (or any social field present) | yes | — | no (weak signal only) |
|
|
346
373
|
|
|
347
|
-
|
|
348
|
-
Top 5 Trending Tokens — SOL / 1h
|
|
374
|
+
**Quick disqualification rule:** If `rug_ratio > 0.3` OR `is_wash_trading = true` OR `is_honeypot = 1` → skip immediately, no further analysis needed.
|
|
349
375
|
|
|
350
|
-
|
|
351
|
-
1 | ... | ... | ... | ... | ... | Smart money accumulating + high volume
|
|
352
|
-
2 | ...
|
|
353
|
-
...
|
|
354
|
-
```
|
|
376
|
+
**Strong buy signal combination:** `smart_degen_count ≥ 3` + `rug_ratio < 0.2` + `creator_close` + `is_wash_trading = false` + `liquidity > $50k` → high-quality opportunity, proceed to full token research.
|
|
355
377
|
|
|
356
|
-
|
|
378
|
+
For full due diligence on any token surfaced here: [`docs/workflow-token-research.md`](../../docs/workflow-token-research.md)
|
|
357
379
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
380
|
+
## Token Lifecycle Stage
|
|
381
|
+
|
|
382
|
+
Use field combinations to determine what stage a token is in. This affects how signals should be interpreted.
|
|
383
|
+
|
|
384
|
+
### Stage 1 — Early (New Born)
|
|
385
|
+
|
|
386
|
+
**Indicators:**
|
|
387
|
+
- `creation_timestamp` < 1 hour ago
|
|
388
|
+
- `hot_level` low or just starting to rise
|
|
389
|
+
- `smart_degen_count = 0`, `renowned_count = 0`
|
|
390
|
+
|
|
391
|
+
**Interpretation:** Too early for smart money signals. No on-chain track record. High risk, high potential reward. **Wait for Stage 2 confirmation before acting.** Only the most risk-tolerant traders enter here.
|
|
392
|
+
|
|
393
|
+
### Stage 2 — Breakout
|
|
394
|
+
|
|
395
|
+
**Indicators:**
|
|
396
|
+
- `smart_degen_count ≥ 3` AND rising
|
|
397
|
+
- Volume surging (compare `swaps_1h` vs `swaps_24h / 24` — significantly higher)
|
|
398
|
+
- `price_change_percent1h > 20%`
|
|
399
|
+
- `creator_token_status = creator_hold` is OK at this stage (dev hasn't distributed yet)
|
|
400
|
+
|
|
401
|
+
**Interpretation:** Strongest entry signal. Smart money is accumulating. Verify security before acting. This window is often short — act on confirmation, not anticipation.
|
|
402
|
+
|
|
403
|
+
### Stage 3 — Distribution
|
|
404
|
+
|
|
405
|
+
**Indicators:**
|
|
406
|
+
- `creator_token_status = creator_close` (dev has sold their allocation)
|
|
407
|
+
- `renowned_count` buying (late social signal — KOLs often enter after smart money)
|
|
408
|
+
- `smart_degen_count` plateauing or declining
|
|
409
|
+
- Volume still high but momentum slowing
|
|
410
|
+
|
|
411
|
+
**Interpretation:** Late stage entry. Smart money may be exiting into retail/KOL demand. Higher risk for new entries. If already holding from Stage 2, evaluate exit levels.
|
|
412
|
+
|
|
413
|
+
### Stage 4 — Decline
|
|
414
|
+
|
|
415
|
+
**Indicators:**
|
|
416
|
+
- Volume declining across all windows
|
|
417
|
+
- `holder_count` declining
|
|
418
|
+
- `rat_trader_amount_rate` high (insider/sneak trading dominating)
|
|
419
|
+
- `smart_degen_count = 0` or clearly declining
|
|
420
|
+
|
|
421
|
+
**Interpretation:** Avoid new entries entirely. If still holding, consider exiting. The opportunity has likely passed.
|
|
361
422
|
|
|
362
423
|
## `market trenches` Parameters
|
|
363
424
|
|
|
@@ -376,9 +437,95 @@ For each token, offer:
|
|
|
376
437
|
| `--type` | No | Categories to query, repeatable: `new_creation` / `near_completion` / `completed` (default: all three) |
|
|
377
438
|
| `--launchpad-platform` | No | Launchpad platform filter, repeatable (default: all platforms for the chain) |
|
|
378
439
|
| `--limit` | No | Max results per category, max 80 (default: 80) |
|
|
440
|
+
| `--filter-preset` | No | Named server-side filter preset: `safe` / `smart-money` / `strict` |
|
|
441
|
+
| `--sort-by` | No | Client-side sort per category: `smart_degen_count` / `renowned_count` / `volume_24h` / `volume_1h` / `swaps_24h` / `swaps_1h` / `rug_ratio` / `holder_count` / `usd_market_cap` / `created_timestamp` |
|
|
442
|
+
| `--direction` | No | Sort direction: `asc` / `desc` (default: `desc`; `asc` for `rug_ratio`) |
|
|
443
|
+
| `--min-*` / `--max-*` | No | Server-side filter range flags — see Filter Fields Reference below |
|
|
444
|
+
|
|
445
|
+
### Filter Presets
|
|
446
|
+
|
|
447
|
+
Presets are applied server-side: the API filters tokens before returning results.
|
|
448
|
+
|
|
449
|
+
| Preset | Server-side filters applied |
|
|
450
|
+
|--------|----------------------------|
|
|
451
|
+
| `safe` | `max_rug_ratio=0.3` + `max_bundler_rate=0.3` + `max_insider_ratio=0.3` |
|
|
452
|
+
| `smart-money` | `min_smart_degen_count=1` |
|
|
453
|
+
| `strict` | `max_rug_ratio=0.3` + `max_bundler_rate=0.3` + `max_insider_ratio=0.3` + `min_smart_degen_count=1` + `min_volume_24h=1000` |
|
|
454
|
+
|
|
455
|
+
**Preset + explicit flag interaction:** Explicit filter flags always override preset values. For example, `--filter-preset safe --max-rug-ratio 0.1` applies the `safe` preset but overrides rug_ratio threshold to `0.1`.
|
|
456
|
+
|
|
457
|
+
**All filter flags are sent as part of the API request body (server-side)** — the server filters tokens before returning results. Use `--limit 80` (the default maximum) to maximise the pool.
|
|
379
458
|
|
|
380
459
|
Response fields: `data.new_creation`, `data.pump`, `data.completed` — each is an array of `RankItem` (same fields as `market trending` rank items). **Important: `data.pump` in the response corresponds to `--type near_completion` in the request. The API always returns this category under the key `pump`, not `near_completion`.**
|
|
381
460
|
|
|
461
|
+
### Server-Side Filter Fields
|
|
462
|
+
|
|
463
|
+
All filter flags are sent as part of the API request body — the server filters tokens before returning results. Flags follow the naming convention `--min-{field}` / `--max-{field}`.
|
|
464
|
+
|
|
465
|
+
| Flag pair | Type | Description |
|
|
466
|
+
|-----------|------|-------------|
|
|
467
|
+
| `--min-volume-24h` / `--max-volume-24h` | float | 24h trading volume (USD) |
|
|
468
|
+
| `--min-net-buy-24h` / `--max-net-buy-24h` | float | 24h net buy volume (USD) |
|
|
469
|
+
| `--min-swaps-24h` / `--max-swaps-24h` | int | 24h total swap count |
|
|
470
|
+
| `--min-buys-24h` / `--max-buys-24h` | int | 24h buy count |
|
|
471
|
+
| `--min-sells-24h` / `--max-sells-24h` | int | 24h sell count |
|
|
472
|
+
| `--min-visiting-count` / `--max-visiting-count` | int | Visitor count |
|
|
473
|
+
| `--min-progress` / `--max-progress` | float | Bonding curve progress (0–1) |
|
|
474
|
+
| `--min-marketcap` / `--max-marketcap` | float | Market cap (USD) |
|
|
475
|
+
| `--min-liquidity` / `--max-liquidity` | float | Liquidity (USD) |
|
|
476
|
+
| `--min-created` / `--max-created` | string | Token age (e.g. `1m` / `5m` / `1h` / `24h`) |
|
|
477
|
+
| `--min-holder-count` / `--max-holder-count` | int | Holder count |
|
|
478
|
+
| `--min-top-holder-rate` / `--max-top-holder-rate` | float | Top-10 holder concentration (0–1) |
|
|
479
|
+
| `--min-rug-ratio` / `--max-rug-ratio` | float | Rug pull risk score (0–1) |
|
|
480
|
+
| `--min-bundler-rate` / `--max-bundler-rate` | float | Bundle-bot trading ratio (0–1) |
|
|
481
|
+
| `--min-insider-ratio` / `--max-insider-ratio` | float | Insider trading ratio (0–1) |
|
|
482
|
+
| `--min-entrapment-ratio` / `--max-entrapment-ratio` | float | Entrapment/Phishing trading ratio (0–1) |
|
|
483
|
+
| `--min-private-vault-hold-rate` / `--max-private-vault-hold-rate` | float | Private vault holding ratio (0–1) |
|
|
484
|
+
| `--min-top70-sniper-hold-rate` / `--max-top70-sniper-hold-rate` | float | Top-70 sniper holding ratio (0–1) |
|
|
485
|
+
| `--min-bot-count` / `--max-bot-count` | int | Bot wallet count |
|
|
486
|
+
| `--min-bot-degen-rate` / `--max-bot-degen-rate` | float | Bot-degen wallet ratio (0–1) |
|
|
487
|
+
| `--min-fresh-wallet-rate` / `--max-fresh-wallet-rate` | float | Fresh wallet ratio (0–1) |
|
|
488
|
+
| `--min-total-fee` / `--max-total-fee` | float | Total fee |
|
|
489
|
+
| `--min-smart-degen-count` / `--max-smart-degen-count` | int | Smart-money holder count |
|
|
490
|
+
| `--min-renowned-count` / `--max-renowned-count` | int | KOL / renowned wallet count |
|
|
491
|
+
| `--min-creator-balance-rate` / `--max-creator-balance-rate` | float | Creator holding ratio (0–1) |
|
|
492
|
+
| `--min-creator-created-count` / `--max-creator-created-count` | int | Creator's total token creation count |
|
|
493
|
+
| `--min-creator-created-open-count` / `--max-creator-created-open-count` | int | Creator's graduated token count |
|
|
494
|
+
| `--min-creator-created-open-ratio` / `--max-creator-created-open-ratio` | float | Creator's graduation ratio (0–1) |
|
|
495
|
+
| `--min-x-follower` / `--max-x-follower` | int | Twitter / X follower count |
|
|
496
|
+
| `--min-twitter-rename-count` / `--max-twitter-rename-count` | int | Twitter rename count |
|
|
497
|
+
| `--min-tg-call-count` / `--max-tg-call-count` | int | Telegram call count |
|
|
498
|
+
|
|
499
|
+
### Trenches Filter Examples
|
|
500
|
+
|
|
501
|
+
```bash
|
|
502
|
+
# Apply the safe preset (server-side)
|
|
503
|
+
gmgn-cli market trenches --chain sol --type new_creation --filter-preset safe
|
|
504
|
+
|
|
505
|
+
# Require at least 1 smart money holder (server-side)
|
|
506
|
+
gmgn-cli market trenches --chain sol --type new_creation --min-smart-degen-count 1
|
|
507
|
+
|
|
508
|
+
# Safe preset + require smart money + sort by smart degen count (server-side filter, client-side sort)
|
|
509
|
+
gmgn-cli market trenches --chain sol --type new_creation \
|
|
510
|
+
--filter-preset safe --min-smart-degen-count 1 --sort-by smart_degen_count
|
|
511
|
+
|
|
512
|
+
# Strict preset — safe + smart money + min $1k volume (server-side)
|
|
513
|
+
gmgn-cli market trenches --chain sol --type new_creation --type near_completion \
|
|
514
|
+
--filter-preset strict --sort-by smart_degen_count
|
|
515
|
+
|
|
516
|
+
# Manual range filters (all sent server-side)
|
|
517
|
+
gmgn-cli market trenches --chain sol --type new_creation \
|
|
518
|
+
--max-rug-ratio 0.3 --max-bundler-rate 0.3 --max-insider-ratio 0.3 \
|
|
519
|
+
--min-smart-degen-count 1 --min-volume-24h 1000
|
|
520
|
+
|
|
521
|
+
# Filter by token age: only tokens created within the last 30 minutes
|
|
522
|
+
gmgn-cli market trenches --chain sol --type new_creation --max-created 30m
|
|
523
|
+
|
|
524
|
+
# Filter by market cap range
|
|
525
|
+
gmgn-cli market trenches --chain sol --type new_creation \
|
|
526
|
+
--min-marketcap 10000 --max-marketcap 500000
|
|
527
|
+
```
|
|
528
|
+
|
|
382
529
|
## `market trenches` Response Fields
|
|
383
530
|
|
|
384
531
|
**Basic Info**
|
|
@@ -463,6 +610,46 @@ Response fields: `data.new_creation`, `data.pump`, `data.completed` — each is
|
|
|
463
610
|
| `dexscr_trending_bar` | Whether paid for Dexscreener trending bar placement |
|
|
464
611
|
| `dexscr_boost_fee` | Amount paid for Dexscreener boost (0 = none) |
|
|
465
612
|
|
|
613
|
+
**After fetching trenches results, apply the Token Quality Filter Criteria section before presenting tokens to the user.** Do not dump raw results — filter first, then surface the strongest candidates.
|
|
614
|
+
|
|
615
|
+
### Trenches Filter Examples
|
|
616
|
+
|
|
617
|
+
```bash
|
|
618
|
+
# Quick safe screen — exclude rugs, wash trading, and bundlers
|
|
619
|
+
gmgn-cli market trenches --chain sol --type new_creation \
|
|
620
|
+
--filter-preset safe --raw
|
|
621
|
+
|
|
622
|
+
# Smart money screen — only tokens with smart money or KOL presence
|
|
623
|
+
gmgn-cli market trenches --chain sol \
|
|
624
|
+
--type new_creation --type near_completion \
|
|
625
|
+
--filter-preset smart-money \
|
|
626
|
+
--sort-by smart_degen_count --raw
|
|
627
|
+
|
|
628
|
+
# Strict screen — safe + smart money + minimum volume, sorted by smart degens
|
|
629
|
+
gmgn-cli market trenches --chain sol --type completed \
|
|
630
|
+
--filter-preset strict --sort-by smart_degen_count --raw
|
|
631
|
+
|
|
632
|
+
# Custom filter — no wash trading, rug_ratio <= 0.2, at least 1 smart degen
|
|
633
|
+
gmgn-cli market trenches --chain sol \
|
|
634
|
+
--type new_creation --type near_completion \
|
|
635
|
+
--exclude-wash-trading --max-rug-ratio 0.2 --min-smart-degen 1 \
|
|
636
|
+
--sort-by smart_degen_count --raw
|
|
637
|
+
|
|
638
|
+
# BSC — safe screen on new tokens from fourmeme
|
|
639
|
+
gmgn-cli market trenches --chain bsc --type new_creation \
|
|
640
|
+
--launchpad-platform fourmeme --launchpad-platform fourmeme_agent \
|
|
641
|
+
--filter-preset safe --sort-by volume_1h --raw
|
|
642
|
+
|
|
643
|
+
# Sort by rug_ratio ascending (safest first), no other filters
|
|
644
|
+
gmgn-cli market trenches --chain sol --type completed \
|
|
645
|
+
--sort-by rug_ratio --raw
|
|
646
|
+
|
|
647
|
+
# Find tokens with many holders and strong 1h swap activity
|
|
648
|
+
gmgn-cli market trenches --chain sol --type completed \
|
|
649
|
+
--min-holders 100 --min-swaps 50 \
|
|
650
|
+
--sort-by swaps_1h --raw
|
|
651
|
+
```
|
|
652
|
+
|
|
466
653
|
### Solana Trenches Examples
|
|
467
654
|
|
|
468
655
|
```bash
|
|
@@ -547,6 +734,49 @@ gmgn-cli market trenches --chain base --raw \
|
|
|
547
734
|
--limit 80
|
|
548
735
|
```
|
|
549
736
|
|
|
737
|
+
## Output Format
|
|
738
|
+
|
|
739
|
+
### `market kline` — Price Summary
|
|
740
|
+
|
|
741
|
+
After fetching candles, present a brief price analysis. Do not dump raw candle arrays.
|
|
742
|
+
|
|
743
|
+
```
|
|
744
|
+
{symbol} — {resolution} chart ({from} → {to})
|
|
745
|
+
Open: ${open of first candle} | Close: ${close of last candle} | Range: ${min low} – ${max high}
|
|
746
|
+
Total volume: ${sum of all volume fields} USD
|
|
747
|
+
Trend: [brief description — e.g. "steady uptrend", "sharp drop then recovery", "sideways"]
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
### `market trending` — Top Tokens Table
|
|
751
|
+
|
|
752
|
+
Present the top results (default: top 10, or as requested) as a table:
|
|
753
|
+
|
|
754
|
+
```
|
|
755
|
+
# | Symbol | Price | MCap | Volume ({interval}) | 1h Chg | SM | Liq | Platform | Signal
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
Where **Signal** = quality flag derived from the token's data:
|
|
759
|
+
- 🟢 Pass: `smart_degen_count ≥ 3` AND `rug_ratio < 0.2` AND `is_wash_trading = false`
|
|
760
|
+
- 🔴 Skip: `rug_ratio > 0.3` OR `is_wash_trading = true` OR `is_honeypot = 1`
|
|
761
|
+
- 🟡 Watch: everything else
|
|
762
|
+
|
|
763
|
+
Then give a one-line highlight for any standout tokens (e.g. "TOKEN1 has 12 smart money holders and +85% in 1h — 🟢 strong signal").
|
|
764
|
+
|
|
765
|
+
### `market trenches` — Grouped by Category
|
|
766
|
+
|
|
767
|
+
Present each category separately with a header:
|
|
768
|
+
|
|
769
|
+
```
|
|
770
|
+
🆕 New Creation ({count} tokens)
|
|
771
|
+
# | Symbol | Created | Liquidity | Swaps (1h) | Smart Degens | Social
|
|
772
|
+
|
|
773
|
+
⏳ Near Completion ({count} tokens)
|
|
774
|
+
# | Symbol | Market Cap | Swaps (1h) | Smart Degens | Social
|
|
775
|
+
|
|
776
|
+
✅ Graduated ({count} tokens)
|
|
777
|
+
# | Symbol | Market Cap | Volume (1h) | Smart Degens | Social
|
|
778
|
+
```
|
|
779
|
+
|
|
550
780
|
## Notes
|
|
551
781
|
|
|
552
782
|
- `market kline`: `--from` and `--to` are Unix timestamps in **seconds** — CLI converts to milliseconds automatically
|
|
@@ -2,14 +2,34 @@
|
|
|
2
2
|
name: gmgn-portfolio
|
|
3
3
|
description: Query GMGN wallet portfolio — API Key wallet info, holdings, transaction activity, trading stats, and token balance. Supports sol / bsc / base.
|
|
4
4
|
argument-hint: "<info|holdings|activity|stats|token-balance> [--chain <sol|bsc|base>] [--wallet <wallet_address>]"
|
|
5
|
+
metadata:
|
|
6
|
+
cliHelp: "gmgn-cli portfolio --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:
|
|
11
|
+
**⚠️ 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."**
|
|
10
12
|
|
|
11
13
|
Use the `gmgn-cli` tool to query wallet portfolio data based on the user's request.
|
|
12
14
|
|
|
15
|
+
**For full wallet analysis (holdings + stats + activity + verdict), follow [`docs/workflow-wallet-analysis.md`](../../docs/workflow-wallet-analysis.md)**
|
|
16
|
+
|
|
17
|
+
## Core Concepts
|
|
18
|
+
|
|
19
|
+
- **`realized_profit` vs `unrealized_profit`** — `realized_profit` = profit locked in from completed sells (cash in hand). `unrealized_profit` = paper gains on positions still held, calculated at current price. These are separate numbers — do not add them unless answering "total P&L including open positions."
|
|
20
|
+
|
|
21
|
+
- **`profit_change`** — A multiplier ratio, not a dollar amount. `1.5` = +150% return. `0` = break-even. `-0.5` = -50% loss. Computed as `total_profit / cost`. Do not display this as a raw decimal — convert to percentage for user-facing output.
|
|
22
|
+
|
|
23
|
+
- **`pnl`** — Profit/loss ratio from `portfolio stats`: `realized_profit / total_cost`. Same multiplier format as `profit_change`. A `pnl` of `2.0` means the wallet doubled its money on completed trades over the period.
|
|
24
|
+
|
|
25
|
+
- **`winrate`** — Ratio of profitable trades over the period (0–1). `0.6` = 60% of trades were profitable. Does not reflect the size of wins vs losses — a wallet can have high winrate but net negative if losses are large.
|
|
26
|
+
|
|
27
|
+
- **`cost` vs `usd_value`** — In holdings: `cost` is the historical amount spent buying this token (your cost basis); `usd_value` is the current market value of the position. The difference is unrealized P&L.
|
|
28
|
+
|
|
29
|
+
- **`history_bought_cost` vs `cost`** — `history_bought_cost` is the all-time cumulative spend on this token (including positions already sold). `cost` is the cost basis of the current open position only.
|
|
30
|
+
|
|
31
|
+
- **Pagination (`cursor`)** — Activity results are paginated. The response includes a `next` field; pass it as `--cursor` to fetch the next page. An empty or missing `next` means you are on the last page.
|
|
32
|
+
|
|
13
33
|
## Sub-commands
|
|
14
34
|
|
|
15
35
|
| Sub-command | Description |
|
|
@@ -81,11 +101,9 @@ gmgn-cli portfolio token-balance \
|
|
|
81
101
|
| `--cursor <cursor>` | Pagination cursor |
|
|
82
102
|
| `--order-by <field>` | Sort field: `usd_value` / `last_active_timestamp` / `realized_profit` / `unrealized_profit` / `total_profit` / `history_bought_cost` / `history_sold_income` (default `usd_value`) |
|
|
83
103
|
| `--direction <asc\|desc>` | Sort direction (default `desc`) |
|
|
84
|
-
| `--
|
|
85
|
-
| `--
|
|
86
|
-
| `--hide-
|
|
87
|
-
| `--hide-airdrop` | Hide airdrop positions |
|
|
88
|
-
| `--hide-closed` | Hide closed positions |
|
|
104
|
+
| `--hide-abnormal <bool>` | Hide abnormal positions: `true` / `false` (default: `false`) |
|
|
105
|
+
| `--hide-airdrop <bool>` | Hide airdrop positions: `true` / `false` (default: `true`) |
|
|
106
|
+
| `--hide-closed <bool>` | Hide closed positions: `true` / `false` (default: `true`) |
|
|
89
107
|
| `--hide-open` | Hide open positions |
|
|
90
108
|
|
|
91
109
|
## `portfolio activity` Options
|
|
@@ -105,6 +123,104 @@ The activity response includes a `next` field. Pass it to `--cursor` to fetch th
|
|
|
105
123
|
|--------|-------------|
|
|
106
124
|
| `--period <period>` | Stats period: `7d` / `30d` (default `7d`) |
|
|
107
125
|
|
|
126
|
+
## Response Field Reference
|
|
127
|
+
|
|
128
|
+
### `portfolio holdings` — Key Fields
|
|
129
|
+
|
|
130
|
+
The response has a `holdings` array. Each item is one token position.
|
|
131
|
+
|
|
132
|
+
| Field | Description |
|
|
133
|
+
|-------|-------------|
|
|
134
|
+
| `token.address` | Token contract address |
|
|
135
|
+
| `token.symbol` / `token.name` | Token ticker and full name |
|
|
136
|
+
| `token.price` | Current token price in USD |
|
|
137
|
+
| `balance` | Current token balance (human-readable units) |
|
|
138
|
+
| `usd_value` | Current USD value of this position |
|
|
139
|
+
| `cost` | Total amount spent buying this token (USD) |
|
|
140
|
+
| `realized_profit` | Profit from completed sells (USD) |
|
|
141
|
+
| `unrealized_profit` | Profit on current unsold holdings at current price (USD) |
|
|
142
|
+
| `total_profit` | `realized_profit + unrealized_profit` (USD) |
|
|
143
|
+
| `profit_change` | Total profit ratio = `total_profit / cost` (e.g. `1.5` = +150%) |
|
|
144
|
+
| `avg_cost` | Average buy price per token (USD) |
|
|
145
|
+
| `buy_tx_count` | Number of buy transactions |
|
|
146
|
+
| `sell_tx_count` | Number of sell transactions |
|
|
147
|
+
| `last_active_timestamp` | Unix timestamp of the most recent transaction |
|
|
148
|
+
| `history_bought_cost` | Total USD spent buying (all-time) |
|
|
149
|
+
| `history_sold_income` | Total USD received from selling (all-time) |
|
|
150
|
+
|
|
151
|
+
### `portfolio activity` — Key Fields
|
|
152
|
+
|
|
153
|
+
The response has a `activities` array and a `next` cursor field for pagination.
|
|
154
|
+
|
|
155
|
+
| Field | Description |
|
|
156
|
+
|-------|-------------|
|
|
157
|
+
| `transaction_hash` | On-chain transaction hash |
|
|
158
|
+
| `type` | Transaction type: `buy` / `sell` / `add` / `remove` / `transfer` |
|
|
159
|
+
| `token.address` | Token contract address |
|
|
160
|
+
| `token.symbol` | Token ticker |
|
|
161
|
+
| `token_amount` | Token quantity in this transaction |
|
|
162
|
+
| `cost_usd` | USD value of this transaction |
|
|
163
|
+
| `price` | Token price in USD at time of transaction |
|
|
164
|
+
| `timestamp` | Unix timestamp of the transaction |
|
|
165
|
+
| `next` | Pagination cursor — pass to `--cursor` to fetch the next page |
|
|
166
|
+
|
|
167
|
+
### `portfolio stats` — Key Fields
|
|
168
|
+
|
|
169
|
+
The response is an object (or array for batch). Key fields:
|
|
170
|
+
|
|
171
|
+
| Field | Description |
|
|
172
|
+
|-------|-------------|
|
|
173
|
+
| `realized_profit` | Total realized profit over the period (USD) |
|
|
174
|
+
| `unrealized_profit` | Total unrealized profit on open positions (USD) |
|
|
175
|
+
| `winrate` | Win rate — ratio of profitable trades (0–1) |
|
|
176
|
+
| `total_cost` | Total amount spent buying in the period (USD) |
|
|
177
|
+
| `buy_count` | Number of buy transactions |
|
|
178
|
+
| `sell_count` | Number of sell transactions |
|
|
179
|
+
| `pnl` | Profit/loss ratio = `realized_profit / total_cost` |
|
|
180
|
+
|
|
181
|
+
**Do NOT guess field names not listed here.** If a field appears in the response but is not in this table, do not interpret it without reading the raw output first.
|
|
182
|
+
|
|
183
|
+
## Output Format
|
|
184
|
+
|
|
185
|
+
**Do NOT dump raw JSON.** Always parse and present data in the structured formats below. Use `--raw` only when piping to `jq` or further processing.
|
|
186
|
+
|
|
187
|
+
### `portfolio holdings` — Holdings Table
|
|
188
|
+
|
|
189
|
+
Present a table sorted by `usd_value` (descending). Show total portfolio value at the top.
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
Wallet: {wallet} | Chain: {chain}
|
|
193
|
+
Total value: ~${sum of usd_value across all positions}
|
|
194
|
+
|
|
195
|
+
# | Token | Balance | USD Value | Total P&L | P&L% | Avg Cost | Buys / Sells
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Flag positions where `profit_change` is strongly negative (e.g. < -50%) or positive (e.g. > 200%) with a brief note.
|
|
199
|
+
|
|
200
|
+
### `portfolio activity` — Activity Feed
|
|
201
|
+
|
|
202
|
+
Present as a chronological list (newest first). Use human-readable timestamps.
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
{type} {token.symbol} | {token_amount} tokens | ${cost_usd} | {timestamp} | tx: {short hash}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Group by token if the user asks about a specific token.
|
|
209
|
+
|
|
210
|
+
### `portfolio stats` — Stats Summary
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
Wallet: {wallet} | Period: {period}
|
|
214
|
+
Realized P&L: ${realized_profit}
|
|
215
|
+
Unrealized P&L: ${unrealized_profit}
|
|
216
|
+
Win Rate: {winrate × 100}%
|
|
217
|
+
Total Spent: ${total_cost}
|
|
218
|
+
Buys / Sells: {buy_count} / {sell_count}
|
|
219
|
+
PnL Ratio: {pnl}x
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
For batch queries (multiple wallets), present one summary block per wallet.
|
|
223
|
+
|
|
108
224
|
## Notes
|
|
109
225
|
|
|
110
226
|
- All portfolio commands use normal auth (API Key only, no signature required)
|
|
@@ -112,3 +228,14 @@ The activity response includes a `next` field. Pass it to `--cursor` to fetch th
|
|
|
112
228
|
- Use `--raw` to get single-line JSON for further processing
|
|
113
229
|
- **Input validation** — Wallet and token addresses are validated against the expected chain format at runtime (sol: base58 32–44 chars; bsc/base/eth: `0x` + 40 hex digits). The CLI exits with an error on invalid input.
|
|
114
230
|
- For follow-wallet, KOL, and Smart Money trade records, use the `gmgn-track` skill (`track follow-wallet` / `track kol` / `track smartmoney`)
|
|
231
|
+
|
|
232
|
+
## Workflow
|
|
233
|
+
|
|
234
|
+
For full wallet analysis including trade history and follow-through on top holdings, see [`docs/workflow-wallet-analysis.md`](../../docs/workflow-wallet-analysis.md)
|
|
235
|
+
|
|
236
|
+
For in-depth trading style analysis, copy-trade ROI estimation, and smart money leaderboard comparison, see [`docs/workflow-smart-money-profile.md`](../../docs/workflow-smart-money-profile.md)
|
|
237
|
+
|
|
238
|
+
**When to use which:**
|
|
239
|
+
- User asks "is this wallet worth following" → [`docs/workflow-wallet-analysis.md`](../../docs/workflow-wallet-analysis.md)
|
|
240
|
+
- User asks "what's this wallet's trading style", "when does he take profit", "smart money profile", "if I copied this wallet what would my return be" → [`docs/workflow-smart-money-profile.md`](../../docs/workflow-smart-money-profile.md)
|
|
241
|
+
- User wants to compare multiple smart money wallets by winrate/PnL → [`docs/workflow-smart-money-profile.md`](../../docs/workflow-smart-money-profile.md) Step 5 (leaderboard)
|