From ed58e67180e8e6010254412ac53c082c3080b5c2 Mon Sep 17 00:00:00 2001 From: David Lau Date: Fri, 26 Jun 2026 21:15:22 +0800 Subject: [PATCH] =?UTF-8?q?docs(market):=20address=20PR=20review=20?= =?UTF-8?q?=E2=80=94=20ETH=20trenches=20docs=20+=20created-unit=20clarity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ETH trenches/trending (SKILL.md, cli-usage.md): - Add per-chain --launchpad-platform value tables incl. ETH for `market trenches` - Add ETH trenches usage examples (all / new_creation / completed) - Rename "Trending — ETH (No Platform Filter)" to "Trending — ETH by Launchpad Platform" and add --platform ETH examples (platform list is now supported) min_created/max_created units (market trending): - Clarify that the raw upstream rank interface accepts minutes only; the openapi-service does NOT forward this field — it evaluates the age window itself (cutoff = now - duration, native for m/h/d), so 6h/7d work via this CLI. - Note a bare number with no unit suffix is rejected. Update --help text and code comment accordingly. Co-Authored-By: Claude Opus 4.8 --- docs/cli-usage.md | 12 ++++++++-- skills/gmgn-market/SKILL.md | 47 +++++++++++++++++++++++++++++++++---- src/commands/market.ts | 10 +++++--- 3 files changed, 60 insertions(+), 9 deletions(-) diff --git a/docs/cli-usage.md b/docs/cli-usage.md index e56ded8..4ef168c 100644 --- a/docs/cli-usage.md +++ b/docs/cli-usage.md @@ -134,7 +134,7 @@ npx gmgn-cli market trending \ | `--filter` | No | Filter tag (repeatable): `has_social` / `not_risk` / `not_honeypot` / `verified` / `locked` / `renounced` / `distributed` / `frozen` / `burn` / `token_burnt` / `creator_hold` / `creator_close` / `creator_add_liquidity` / `creator_remove_liquidity` / `creator_sell` / `creator_buy` / `not_wash_trading` / `not_social_dup` / `not_image_dup` / `is_internal_market` / `is_out_market`. The gmgn web client also sends aliases `social_not_duplicate` / `img_not_duplicate` / `is_burnt` / `launching` / `migrated`, which are accepted but only the canonical tags change behavior. | | `--platform` | No | Platform filter (repeatable). Omit (or pass an empty list) to include **all** platforms. Available values depend on chain — see below. | | `--min-` / `--max-` | No | Numeric range filters (inclusive). Supported metrics: `volume` / `liquidity` / `marketcap` / `history-highest-marketcap` / `swaps` / `holder-count` / `gas-fee` / `renowned-count` / `smart-degen-count` / `bot-degen-count` / `visiting-count` / `price-change-percent` / `insider-rate` / `bundler-rate` / `entrapment-ratio` / `top10-holder-rate` / `top70-sniper-hold-rate` / `dev-team-hold-rate`. Unknown metrics are ignored by the service. | -| `--min-created` / `--max-created` | No | Token-age window, duration string (`1m` / `6h` / `7d`). `--min-created` is a minimum age (excludes younger tokens); `--max-created` a maximum age (excludes older tokens). | +| `--min-created` / `--max-created` | No | Token-age window, duration string with a `m` (minutes) / `h` (hours) / `d` (days) suffix, e.g. `30m` / `6h` / `7d`. `--min-created` is a minimum age (excludes younger tokens); `--max-created` a maximum age (excludes older tokens). The raw upstream rank interface accepts minutes only; the openapi-service does not forward this field — it evaluates the age window itself (cutoff = now − duration, native for `m`/`h`/`d`), so `6h`/`7d` work here. A bare number with no unit suffix is not accepted. | **`sol` platforms:** `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` @@ -296,9 +296,17 @@ npx gmgn-cli market trenches --chain [--type ] [--launchpad-pla |--------|----------|-------------| | `--chain` | Yes | `sol` / `bsc` / `base` / `eth` | | `--type` | No | Categories to query, repeatable: `new_creation` / `near_completion` / `completed` (default: all three) | -| `--launchpad-platform` | No | Launchpad platform filter, repeatable (default: all platforms for the chain) | +| `--launchpad-platform` | No | Launchpad platform filter, repeatable (default: all platforms for the chain). Values depend on chain — see below. | | `--limit` | No | Max results per category, max 80 (default: 80) | +**`sol` platforms:** `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` / `ray_launchpad` / `meteora_virtual_curve` / `xstocks` + +**`bsc` platforms:** `fourmeme` / `fourmeme_agent` / `bn_fourmeme` / `four_xmode_agent` / `cubepeg` / `likwid` / `goplus_creator` / `goplus_skills` / `openfour` / `flap` / `flap_stocks` / `flap_aioracle` / `clanker` / `lunafun` + +**`base` platforms:** `clanker` / `bankr` / `flaunch` / `zora` / `zora_creator` / `baseapp` / `basememe` / `virtuals_v2` / `klik` + +**`eth` platforms:** `trench` / `clanker` / `klik` / `livo` / `stroid` / `pool_uniswap_v2` / `pool_uniswap_v3` / `printr` + **Response:** `data.new_creation`, `data.pump`, `data.completed` — each is an array of `RankItem` (same structure as `market trending` rank items). **Note: `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`.** --- diff --git a/skills/gmgn-market/SKILL.md b/skills/gmgn-market/SKILL.md index acb0b94..89b04cb 100644 --- a/skills/gmgn-market/SKILL.md +++ b/skills/gmgn-market/SKILL.md @@ -170,7 +170,7 @@ Optional `--min-*` / `--max-*` flags apply server-side numeric range filtering ( | `--min-top10-holder-rate` / `--max-top10-holder-rate` | Top-10 holder concentration (0–1) | | `--min-top70-sniper-hold-rate` / `--max-top70-sniper-hold-rate` | Top-70 sniper holding ratio (0–1) | | `--min-dev-team-hold-rate` / `--max-dev-team-hold-rate` | Dev-team holding ratio (0–1); `--min-dev-team-hold-rate` also excludes creator-close tokens | -| `--min-created` / `--max-created` | Token age window, duration string `1m` / `6h` / `7d`. `--min-created` is a minimum age (excludes younger tokens); `--max-created` a maximum age (excludes older tokens) | +| `--min-created` / `--max-created` | Token age window, duration string with a `m` (minutes) / `h` (hours) / `d` (days) suffix, e.g. `30m` / `6h` / `7d`. `--min-created` is a minimum age (excludes younger tokens); `--max-created` a maximum age (excludes older tokens). **Note:** the raw upstream rank interface accepts minutes only; the openapi-service does not forward this field — it evaluates the age window itself (cutoff = now − duration, computed natively for `m`/`h`/`d`), so `6h` / `7d` work here. Always include a unit suffix — a bare number is **not** accepted. | ## Usage Examples @@ -284,15 +284,23 @@ gmgn-cli market trending \ --order-by volume --limit 20 --raw ``` -### Trending — ETH (No Platform Filter) +### Trending — ETH by Launchpad Platform ```bash -# ETH 1h trending — all tokens, sorted by volume +# ETH 1h trending — all platforms, sorted by volume gmgn-cli market trending --chain eth --interval 1h --order-by volume --limit 20 -# ETH 1h trending — with safety filters +# ETH 1h trending — specific platforms only gmgn-cli market trending \ --chain eth --interval 1h \ + --platform trench --platform clanker --platform klik \ + --order-by volume --limit 50 --raw + +# ETH 1h trending — all ETH platforms with safety filters +gmgn-cli market trending \ + --chain eth --interval 1h \ + --platform trench --platform clanker --platform klik --platform livo --platform stroid \ + --platform pool_uniswap_v2 --platform pool_uniswap_v3 --platform printr \ --filter not_honeypot --filter verified \ --order-by volume --limit 20 --raw @@ -553,6 +561,15 @@ Use field combinations to determine what stage a token is in. This affects how s | `--direction` | No | Sort direction: `asc` / `desc` (default: `desc`; `asc` for `rug_ratio`) | | `--min-*` / `--max-*` | No | Server-side filter range flags — see Filter Fields Reference below | +**`--launchpad-platform` values by chain** (omit `--launchpad-platform` to use all of the chain's platforms): + +| Chain | Platforms | +|-------|-----------| +| `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` / `ray_launchpad` / `meteora_virtual_curve` / `xstocks` | +| `bsc` | `fourmeme` / `fourmeme_agent` / `bn_fourmeme` / `four_xmode_agent` / `cubepeg` / `likwid` / `goplus_creator` / `goplus_skills` / `openfour` / `flap` / `flap_stocks` / `flap_aioracle` / `clanker` / `lunafun` | +| `base` | `clanker` / `bankr` / `flaunch` / `zora` / `zora_creator` / `baseapp` / `basememe` / `virtuals_v2` / `klik` | +| `eth` | `trench` / `clanker` / `klik` / `livo` / `stroid` / `pool_uniswap_v2` / `pool_uniswap_v3` / `printr` | + ### Filter Presets Presets are applied server-side: the API filters tokens before returning results. @@ -853,6 +870,28 @@ gmgn-cli market trenches --chain base --raw \ --limit 80 ``` +### ETH Trenches Examples + +```bash +# All three categories at once +gmgn-cli market trenches --chain eth --raw \ + --type new_creation --type near_completion --type completed \ + --launchpad-platform trench --launchpad-platform clanker --launchpad-platform klik --launchpad-platform livo --launchpad-platform stroid --launchpad-platform pool_uniswap_v2 --launchpad-platform pool_uniswap_v3 --launchpad-platform printr \ + --limit 80 + +# New creation only +gmgn-cli market trenches --chain eth --raw \ + --type new_creation \ + --launchpad-platform trench --launchpad-platform clanker --launchpad-platform klik --launchpad-platform livo --launchpad-platform stroid --launchpad-platform pool_uniswap_v2 --launchpad-platform pool_uniswap_v3 --launchpad-platform printr \ + --limit 80 + +# Completed (open market) only +gmgn-cli market trenches --chain eth --raw \ + --type completed \ + --launchpad-platform trench --launchpad-platform clanker --launchpad-platform klik --launchpad-platform livo --launchpad-platform stroid --launchpad-platform pool_uniswap_v2 --launchpad-platform pool_uniswap_v3 --launchpad-platform printr \ + --limit 80 +``` + ## Output Format ### `market kline` — Price Summary diff --git a/src/commands/market.ts b/src/commands/market.ts index db05106..9e404ab 100644 --- a/src/commands/market.ts +++ b/src/commands/market.ts @@ -293,8 +293,12 @@ const TRENCHES_FILTER_FIELDS: TrenchesFilterField[] = [ // Server-side numeric range filters for `market trending` (/v1/market/rank). // Passed through as min_/max_ query params; the service applies the // metrics it understands and ignores the rest. min_created/max_created are token-age -// windows expressed as duration strings (e.g. 1m / 6h / 7d) — note these use m/h/d, +// windows expressed as duration strings (e.g. 30m / 6h / 7d) — note these use m/h/d, // NOT the s/m form used by trenches; min_created is a minimum age, max_created a maximum. +// The raw upstream rank interface accepts minutes only; the openapi-service does not +// forward this field — it evaluates the age window itself (cutoff = now - duration, +// native for m/h/d), so h/d are valid through this CLI. Passed through verbatim +// (string); a bare number with no unit suffix is rejected. const RANK_RANGE_FIELDS: TrenchesFilterField[] = [ { api: "min_volume", type: "float", desc: "Min trading volume (USD)" }, { api: "max_volume", type: "float", desc: "Max trading volume (USD)" }, @@ -332,8 +336,8 @@ const RANK_RANGE_FIELDS: TrenchesFilterField[] = [ { api: "max_top70_sniper_hold_rate", type: "float", desc: "Max top-70 sniper holding ratio (0–1)" }, { api: "min_dev_team_hold_rate", type: "float", desc: "Min dev-team holding ratio (0–1); also excludes creator-close tokens" }, { api: "max_dev_team_hold_rate", type: "float", desc: "Max dev-team holding ratio (0–1)" }, - { api: "min_created", type: "string", desc: "Min token age (minimum age), duration string e.g. 1m / 6h / 7d" }, - { api: "max_created", type: "string", desc: "Max token age (maximum age), duration string e.g. 600m / 24h" }, + { api: "min_created", type: "string", desc: "Min token age (minimum age). Duration with unit suffix m/h/d, e.g. 30m / 6h / 7d (h/d evaluated server-side; raw upstream takes minutes only). A bare number with no unit is rejected." }, + { api: "max_created", type: "string", desc: "Max token age (maximum age). Duration with unit suffix m/h/d, e.g. 600m / 24h (h/d evaluated server-side; raw upstream takes minutes only). A bare number with no unit is rejected." }, ]; // Named filter presets using actual server-side API field names