From 5547e9fd303970e17aa41d4fa9fb0c132f4fdbc1 Mon Sep 17 00:00:00 2001 From: gumponchain Date: Tue, 31 Mar 2026 15:20:36 +0800 Subject: [PATCH] fix(trenches): restore 5 incorrectly removed filter field pairs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous validation used millisecond timestamps causing 401 errors, which jq parsed as 0 and were mistaken for "field ignored" results. Re-validated with correct second-precision timestamps — all 30 pairs confirmed working. Only min/max_x_follower remains removed (truly ignored). Restored fields (10 flags, 5 pairs): - min/max_volume_24h - min/max_net_buy_24h - min/max_swaps_24h - min/max_buys_24h - min/max_sells_24h Also restored min_volume_24h=1000 in the strict filter preset. Co-Authored-By: Claude Sonnet 4.6 --- skills/gmgn-market/SKILL.md | 11 ++++++++--- src/commands/market.ts | 13 ++++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/skills/gmgn-market/SKILL.md b/skills/gmgn-market/SKILL.md index 59a7036..ced6360 100644 --- a/skills/gmgn-market/SKILL.md +++ b/skills/gmgn-market/SKILL.md @@ -450,7 +450,7 @@ Presets are applied server-side: the API filters tokens before returning results |--------|----------------------------| | `safe` | `max_rug_ratio=0.3` + `max_bundler_rate=0.3` + `max_insider_ratio=0.3` | | `smart-money` | `min_smart_degen_count=1` | -| `strict` | `max_rug_ratio=0.3` + `max_bundler_rate=0.3` + `max_insider_ratio=0.3` + `min_smart_degen_count=1` | +| `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` | **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`. @@ -464,6 +464,11 @@ All filter flags are sent as part of the API request body — the server filters | Flag pair | Type | Description | |-----------|------|-------------| +| `--min-volume-24h` / `--max-volume-24h` | float | 24h trading volume (USD) | +| `--min-net-buy-24h` / `--max-net-buy-24h` | float | 24h net buy volume (USD) | +| `--min-swaps-24h` / `--max-swaps-24h` | int | 24h total swap count | +| `--min-buys-24h` / `--max-buys-24h` | int | 24h buy count | +| `--min-sells-24h` / `--max-sells-24h` | int | 24h sell count | | `--min-visiting-count` / `--max-visiting-count` | int | Visitor count | | `--min-progress` / `--max-progress` | float | Bonding curve progress (0–1) | | `--min-marketcap` / `--max-marketcap` | float | Market cap (USD) | @@ -503,14 +508,14 @@ gmgn-cli market trenches --chain sol --type new_creation --min-smart-degen-count gmgn-cli market trenches --chain sol --type new_creation \ --filter-preset safe --min-smart-degen-count 1 --sort-by smart_degen_count -# Strict preset — safe + smart money (server-side) +# Strict preset — safe + smart money + min $1k volume (server-side) gmgn-cli market trenches --chain sol --type new_creation --type near_completion \ --filter-preset strict --sort-by smart_degen_count # Manual range filters (all sent server-side) gmgn-cli market trenches --chain sol --type new_creation \ --max-rug-ratio 0.3 --max-bundler-rate 0.3 --max-insider-ratio 0.3 \ - --min-smart-degen-count 1 + --min-smart-degen-count 1 --min-volume-24h 1000 # Filter by token age: only tokens created within the last 30 minutes gmgn-cli market trenches --chain sol --type new_creation --max-created 30m diff --git a/src/commands/market.ts b/src/commands/market.ts index e12f8a4..9e066f7 100644 --- a/src/commands/market.ts +++ b/src/commands/market.ts @@ -130,7 +130,17 @@ interface TrenchesFilterField { // All server-side filter fields for market trenches // API field names map to CLI flags by replacing _ with - (e.g. min_volume_24h → --min-volume-24h) const TRENCHES_FILTER_FIELDS: TrenchesFilterField[] = [ - // Visitor count (24h trading volume / swap counts are not supported by the API) + // Trading activity (24h) + { api: "min_volume_24h", type: "float", desc: "Min 24h trading volume (USD)" }, + { api: "max_volume_24h", type: "float", desc: "Max 24h trading volume (USD)" }, + { api: "min_net_buy_24h", type: "float", desc: "Min 24h net buy volume (USD)" }, + { api: "max_net_buy_24h", type: "float", desc: "Max 24h net buy volume (USD)" }, + { api: "min_swaps_24h", type: "int", desc: "Min 24h total swap count" }, + { api: "max_swaps_24h", type: "int", desc: "Max 24h total swap count" }, + { api: "min_buys_24h", type: "int", desc: "Min 24h buy count" }, + { api: "max_buys_24h", type: "int", desc: "Max 24h buy count" }, + { api: "min_sells_24h", type: "int", desc: "Min 24h sell count" }, + { api: "max_sells_24h", type: "int", desc: "Max 24h sell count" }, { api: "min_visiting_count", type: "int", desc: "Min visitor count" }, { api: "max_visiting_count", type: "int", desc: "Max visitor count" }, // Market & liquidity @@ -205,6 +215,7 @@ const TRENCHES_FILTER_PRESETS: Record> = max_bundler_rate: 0.3, max_insider_ratio: 0.3, min_smart_degen_count: 1, + min_volume_24h: 1000, }, };