fix(trenches): restore 5 incorrectly removed filter field pairs

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 <noreply@anthropic.com>
This commit is contained in:
gumponchain
2026-03-31 16:02:06 +08:00
committed by GMGN.AI
co-authored by Claude Sonnet 4.6
parent 3ca831a976
commit 5547e9fd30
2 changed files with 20 additions and 4 deletions
+8 -3
View File
@@ -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 (01) |
| `--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
+12 -1
View File
@@ -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<string, Record<string, number | string>> =
max_bundler_rate: 0.3,
max_insider_ratio: 0.3,
min_smart_degen_count: 1,
min_volume_24h: 1000,
},
};