Compare commits

...

15 Commits

Author SHA1 Message Date
GMGN.AI 256957db97 1.5.6 2026-07-31 00:49:39 +08:00
deepfeature dfabbc0823 Merge pull request #189 from gina888666/fix/arc-stable-trenches-launchpad
fix(market/cli): add arc/stable default launchpad platforms for trenches
2026-07-31 00:46:11 +08:00
gina888666 4814139cec fix(trenches): add arc/stable default launchpad platforms
Arc and stable chains were missing from TRENCHES_PLATFORMS, causing
trenches queries to return empty results when --launchpad-platform
was not explicitly specified.

Arc: dyorfun_v3, dyorswap, trench, onmifun, sharcfun, klik
Stable: dyorfun_v3, dyorswap, trench

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-30 21:15:35 +08:00
gina888666 1b6efd8d9c fix(market): update arc/stable launchpad platform lists to complete set
arc: dyorfun_v3 / dyorswap / trench / onmifun / sharcfun / klik (6 platforms)
stable: dyorfun_v3 / dyorswap / trench (3 platforms)

Verified by real API calls across new_creation, near_completion, completed.
Matches platforms shown on gmgn.ai website for both chains.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-30 21:09:56 +08:00
gina888666 e7625e321a revert: remove arc/stable explicit platform warning
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-30 20:52:29 +08:00
gina888666 840dfdc948 fix(market): warn that arc/stable trenches require explicit --launchpad-platform
Without this warning, an agent omitting --launchpad-platform on arc/stable
gets empty results for all categories (no server-side default exists for
these chains, unlike sol/bsc/base/eth).

Add a blockquote warning above the platform table and mark arc/stable rows
as "must be specified explicitly" so agents always pass the platforms.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-30 20:52:00 +08:00
gina888666 bc5427c8c7 fix(market): add arc/stable launchpad platforms for trenches command
- Add `arc` (dyorfun_v3, dyorswap) and `stable` (dyorswap) to the
  --launchpad-platform table; without these, omitting --launchpad-platform
  on arc/stable returns empty results for all three categories
- Add Arc Trenches Examples and Stable Trenches Examples sections with
  all-three-categories, new_creation, near_completion, and completed
  examples, following the same pattern as Solana/BSC/Base/ETH

Verified by real API calls: passing --launchpad-platform dyorfun_v3 or
dyorswap on arc/stable returns correct data; omitting it returns {}.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-30 20:44:45 +08:00
GMGN.AI 16056462f2 1.5.5 2026-07-30 19:15:10 +08:00
GMGN.AI f097758fe4 Merge pull request #188 from GMGNAI/feat-add-chain-arc-stable
feat(chains): add arc and stable across all commands and docs
2026-07-30 19:13:56 +08:00
David Lau 0056fa7d6a feat(chains): add arc and stable across all commands and docs
Add EVM chains arc and stable everywhere robinhood is supported:
- src/validate.ts: add arc + stable to VALID_CHAINS and EVM address check
- src/commands/{token,market,portfolio,swap,track}.ts: extend --chain
  option help and the market-signal chain gate
- src/client/OpenApiClient.ts: HotSearchesParam chain comment
- Sync SKILL.md files, Readme.md, Readme.zh.md, docs/cli-usage.md;
  update the default hot-search set wording from 6-chain to 7-chain

Cooking/create_token remains sol/bsc/base/robinhood only (no launchpad
on arc or stable), matching the openapi service.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-29 20:22:02 +08:00
davidsx dfea6e8fae Merge pull request #187 from gina888666/fix/robinhood-chain-detection 2026-07-27 20:39:12 +08:00
gina888666 56648c5286 fix(holder-analysis): add robinhood to known chains to skip auto-detection
When CHAIN is explicitly set to 'robinhood', the auto-detection logic
previously treated it as unknown and fell back to probing bsc/eth/base,
returning empty data and forcing slow inline workarounds.

Adding a KNOWN_CHAINS tuple that includes 'robinhood' (and 'sol') causes
the script to skip the probe entirely and query the specified chain directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-27 20:30:10 +08:00
GMGN.AI 7205bf20d5 1.5.4 2026-07-23 12:34:41 +08:00
GMGN.AI 90d938ec09 Merge pull request #185 from GMGNAI/docs-signal-type-1-21
docs(market): extend signal_type range to 21 and name new types
2026-07-23 12:34:02 +08:00
David Lau fa556acb93 docs(market): extend signal_type range to 21 and name new types
Backend now accepts signal_type 1-21. Add types 19 (PlatformCallV2),
20 (KOLBuy), 21 (BankerClaims) to the signal-types tables and update the
1-18 -> 1-21 range references.

- src/commands/market.ts: --signal-type help text 1-18 -> 1-21
- docs/cli-usage.md: param note + signal-types table rows 19/20/21
- skills/gmgn-market/SKILL.md: param note, response-field note, signal-types table

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 12:23:36 +08:00
20 changed files with 198 additions and 110 deletions
+4 -4
View File
@@ -729,10 +729,10 @@ gmgn-cli cooking \
| Commands | Chains | Chain Currencies |
|----------|--------|-----------------|
| token / market / portfolio / track | `sol` / `bsc` / `base` / `eth` / `robinhood` | — |
| swap / order | `sol` / `bsc` / `base` / `eth` / `robinhood` | sol: SOL, USDC · bsc: BNB, USDC · base: ETH, USDC · eth: ETH |
| gas-price | `sol` / `bsc` / `base` / `eth` / `robinhood` | — |
| track kol / track smartmoney · market signal | `sol` / `bsc` / `base` / `eth` / `robinhood` (kol/smartmoney) · `sol` / `bsc` / `robinhood` (signal) | — |
| token / market / portfolio / track | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` | — |
| swap / order | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` | sol: SOL, USDC · bsc: BNB, USDC · base: ETH, USDC · eth: ETH |
| gas-price | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` | — |
| track kol / track smartmoney · market signal | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` (kol/smartmoney) · `sol` / `bsc` / `robinhood` / `arc` / `stable` (signal) | — |
| cooking create | `sol` / `bsc` / `base` / `robinhood` | — |
---
+4 -4
View File
@@ -753,10 +753,10 @@ gmgn-cli cooking \
| 接口类型 | 支持的链 | 链原生货币 |
|----------|----------|-----------|
| token / market / portfolio / track | `sol` / `bsc` / `base` / `eth` / `robinhood` | — |
| swap / order | `sol` / `bsc` / `base` / `eth` / `robinhood` | sol: SOL、USDC · bsc: BNB、USDC · base: ETH、USDC · eth: ETH |
| gas-price | `sol` / `bsc` / `base` / `eth` / `robinhood` | — |
| track kol / track smartmoney · market signal | `sol` / `bsc` / `base` / `eth` / `robinhood`kol/smartmoney)· `sol` / `bsc` / `robinhood`signal | — |
| token / market / portfolio / track | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` | — |
| swap / order | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` | sol: SOL、USDC · bsc: BNB、USDC · base: ETH、USDC · eth: ETH |
| gas-price | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` | — |
| track kol / track smartmoney · market signal | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable`kol/smartmoney)· `sol` / `bsc` / `robinhood` / `arc` / `stable`signal | — |
| cooking create | `sol` / `bsc` / `base` / `robinhood` | — |
---
+21 -18
View File
@@ -126,7 +126,7 @@ npx gmgn-cli market trending \
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--interval` | Yes | `1m` / `5m` / `1h` / `6h` / `24h` |
| `--limit` | No | Number of results (default 100, max 100) |
| `--order-by` | No | Sort field: `volume` / `swaps` / `liquidity` / `marketcap` / `holders` / `price` / `change` / `change1m` / `change5m` / `change1h` / `renowned_count` / `smart_degen_count` / `bluechip_owner_percentage` / `rank` / `creation_timestamp` / `square_mentions` / `history_highest_market_cap` / `gas_fee` |
@@ -294,7 +294,7 @@ npx gmgn-cli market trenches --chain <chain> [--type <type...>] [--launchpad-pla
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--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). Values depend on chain — see below. |
| `--limit` | No | Max results per category, max 80 (default: 80) |
@@ -325,8 +325,8 @@ gmgn-cli market signal --chain sol --groups '<json_array>' [--raw]
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `robinhood` |
| `--signal-type` | No | Signal type(s), repeatable (118, default: all). See Signal Types below. |
| `--chain` | Yes | `sol` / `bsc` / `robinhood` / `arc` / `stable` |
| `--signal-type` | No | Signal type(s), repeatable (121, default: all). See Signal Types below. |
| `--mc-min` | No | Min market cap at trigger time (USD) |
| `--mc-max` | No | Max market cap at trigger time (USD) |
| `--trigger-mc-min` | No | Min market cap at signal trigger moment (USD) |
@@ -359,6 +359,9 @@ gmgn-cli market signal --chain sol --groups '<json_array>' [--raw]
| 16 | SignalTypeMultiLargeBuy | Multiple large buys |
| 17 | SignalTypeBagsClaims | Bags Claim |
| 18 | SignalTypePumpClaims | Pump Claim |
| 19 | SignalTypePlatformCallV2 | Platform call (V2) |
| 20 | SignalTypeKOLBuy | KOL buy |
| 21 | SignalTypeBankerClaims | Banker Claim (Base chain Banker platform claim fee) |
---
@@ -367,7 +370,7 @@ gmgn-cli market signal --chain sol --groups '<json_array>' [--raw]
Query the hot-search ranking — the most-searched tokens, ranked by `visiting_count` (search heat). Cross-chain top-500; one request can cover several chains at once. API Key auth only.
```bash
# Default 5-chain set (sol/bsc/base/eth/robinhood, each 24h):
# Default 7-chain set (sol/bsc/base/eth/robinhood/arc/stable, each 24h):
gmgn-cli market hot-searches [--raw]
# Specific chain(s) and interval:
@@ -379,7 +382,7 @@ gmgn-cli market hot-searches --params '<json_array>' [--raw]
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | No | Repeatable: `sol` / `bsc` / `base` / `eth` / `robinhood`. Omit for the default 5-chain set. |
| `--chain` | No | Repeatable: `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable`. Omit for the default 7-chain set. |
| `--interval` | No | `1m` / `5m` / `1h` / `6h` / `24h` (default `24h`). Applies to every `--chain`. |
| `--limit` | No | Max results per chain (default `500`). |
| `--filter` | No | Repeatable **boolean** filter tags (downstream `filter.filters`). sol defaults: `renounced` / `frozen`; EVM defaults: `not_honeypot` / `verified` / `renounced`. Recognised tags: `renounced` / `frozen` (sol) / `is_burnt` / `token_burnt` / `not_wash_trading` / `not_honeypot` (EVM) / `verified` (EVM) / `locked` (EVM) / `has_social` / `distribed` / `not_risk` / `img_not_duplicate` / `social_not_duplicate` / `creator_hold` / `creator_close` / `dexscr_update_link` / `launching` / `migrated` / `hide_b20` (base) / `hide_non_b20` (base). Unknown tags are silent no-ops. |
@@ -408,7 +411,7 @@ gmgn-cli track follow-tokens \
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--wallet` | Yes | Wallet address |
| `--group-id` | No | `all_group` (all tokens), `default`, or a user-defined group ID |
| `--interval` | No | Time interval for price change stats: `1m` / `5m` / `1h` / `6h` / `24h` |
@@ -433,7 +436,7 @@ gmgn-cli track follow-token-groups \
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--wallet` | Yes | Wallet address |
---
@@ -476,7 +479,7 @@ gmgn-cli track kol [--chain <chain>] [--limit <n>] [--side <side>] [--raw]
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | No | `sol` / `bsc` / `base` / `eth` / `robinhood` (default `sol`) |
| `--chain` | No | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` (default `sol`) |
| `--limit` | No | Page size (1200, default 100) |
| `--side` | No | Filter by trade direction: `buy` / `sell` (client-side filter) |
@@ -492,7 +495,7 @@ gmgn-cli track smartmoney [--chain <chain>] [--limit <n>] [--side <side>] [--raw
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | No | `sol` / `bsc` / `base` / `eth` / `robinhood` (default `sol`) |
| `--chain` | No | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` (default `sol`) |
| `--limit` | No | Page size (1200, default 100) |
| `--side` | No | Filter by trade direction: `buy` / `sell` (client-side filter) |
@@ -562,7 +565,7 @@ npx gmgn-cli swap \
| Option | Required | Chain | Description |
|--------|----------|-------|-------------|
| `--chain` | Yes | all | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | all | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--from` | Yes | all | Wallet address (must match the wallet bound to the API Key) |
| `--input-token` | Yes | all | Input token contract address |
| `--output-token` | Yes | all | Output token contract address |
@@ -579,7 +582,7 @@ npx gmgn-cli swap \
| `--auto-fee` | No | `eth` | **Only with `--condition-orders`.** GMGN automatically selects the optimal fee. |
| `--max-fee-per-gas` | No | `bsc` / `base` / `eth` | EIP-1559 max fee per gas |
| `--max-priority-fee-per-gas` | No | `bsc` / `base` / `eth` | EIP-1559 max priority fee per gas |
| `--condition-orders` | No | all | JSON array of take-profit/stop-loss conditions attached after a successful swap (see example below) |
| `--condition-orders` | No | sol / bsc / base / eth / robinhood | JSON array of take-profit/stop-loss conditions attached after a successful swap (see example below). **Not supported on `arc` / `stable`.** |
| `--sell-ratio-type` | No | all | **Only with `--condition-orders`.** Sell ratio base: `buy_amount` (default) / `hold_amount` |
**`--condition-orders` example** (100% sell at 2× price, 100% sell at 50% price):
@@ -639,7 +642,7 @@ gmgn-cli multi-swap \
| Option | Required | Chain | Description |
|--------|----------|-------|-------------|
| `--chain` | Yes | all | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | all | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--accounts` | Yes | all | Comma-separated wallet addresses (1100, all bound to API Key) |
| `--input-token` | Yes | all | Input token contract address |
| `--output-token` | Yes | all | Output token contract address |
@@ -656,7 +659,7 @@ gmgn-cli multi-swap \
| `--auto-fee` | No | `eth` | **Only with `--condition-orders`.** GMGN automatically selects the optimal fee. |
| `--max-fee-per-gas` | No | `bsc` / `base` / `eth` | EIP-1559 max fee per gas |
| `--max-priority-fee-per-gas` | No | `bsc` / `base` / `eth` | EIP-1559 max priority fee per gas |
| `--condition-orders` | No | all | JSON array of take-profit/stop-loss conditions, attached to each successful wallet's swap (best-effort) |
| `--condition-orders` | No | sol / bsc / base / eth / robinhood | JSON array of take-profit/stop-loss conditions, attached to each successful wallet's swap (best-effort). **Not supported on `arc` / `stable`.** |
| `--sell-ratio-type` | No | all | **Only with `--condition-orders`.** Sell ratio base: `buy_amount` (default) / `hold_amount` |
**Response fields (data):** Array of per-wallet results:
@@ -682,7 +685,7 @@ npx gmgn-cli order get --chain <chain> --order-id <order_id> [--raw]
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--order-id` | Yes | Order ID (returned by the `swap` command) |
**Response fields (data):** Same structure as the `swap` response above.
@@ -717,11 +720,11 @@ gmgn-cli order strategy create \
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--from` | Yes | Wallet address (must match API Key binding) |
| `--base-token` | Yes | Base token contract address |
| `--quote-token` | Yes | Quote token contract address |
| `--order-type` | Yes | Order type: `limit_order` / `smart_trade` |
| `--order-type` | Yes | Order type: `limit_order` / `smart_trade`. **`arc` / `stable` support `limit_order` only** — `smart_trade` returns a 400. |
| `--sub-order-type` | Yes | `limit_order`: `buy_low` / `buy_high` / `stop_loss` / `take_profit`; `smart_trade` with condition_orders: `mix_trade` |
| `--check-price` | No* | Trigger check price — required for `limit_order`; omit for `smart_trade` (trigger is in the `buy_low` condition order) |
| `--open-price` | No | Open price of the position |
@@ -731,7 +734,7 @@ gmgn-cli order strategy create \
| `--expire-in` | No | Order expiry in seconds |
| `--sell-ratio-type` | No | `buy_amount` (default) / `hold_amount` |
| `--quote-investment` | No | Quote token investment amount (`smart_trade`) |
| `--condition-orders` | No | JSON array of condition sub-orders for `smart_trade`. Must include one `buy_low` entry (with `check_price` lower than `open_price`) plus at least one TP/SL entry |
| `--condition-orders` | No | JSON array of condition sub-orders for `smart_trade`. Must include one `buy_low` entry (with `check_price` lower than `open_price`) plus at least one TP/SL entry. **Not supported on `arc` / `stable`** (`smart_trade` is rejected there). |
| `--slippage` | No | Slippage tolerance as an integer 0100, e.g. `30` = 30% |
| `--auto-slippage` | No | Enable automatic slippage |
| `--priority-fee` | No | Priority fee in SOL (**required for SOL chain**) |
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "gmgn-cli",
"version": "1.5.3",
"version": "1.5.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "gmgn-cli",
"version": "1.5.3",
"version": "1.5.6",
"license": "MIT",
"dependencies": {
"commander": "^12.1.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "gmgn-cli",
"version": "1.5.3",
"version": "1.5.6",
"description": "GMGN OpenAPI CLI — call GMGN market, token, portfolio and swap APIs from the command line",
"type": "module",
"bin": {
+2 -2
View File
@@ -1,7 +1,7 @@
---
name: gmgn-holder-analysis
description: Token holder chip analysis — deep analysis of holder structure including chip distribution, entry cost, whale/dev/KOL behavior, risk wallets (rat traders, bundlers, snipers), related wallets, smart money signals, and an AI rating based purely on token structure. Use when user asks about holder analysis, 筹码分析, 持仓分析, chip structure, who is holding, or whether a token is safe to buy based on its holder composition.
argument-hint: "--chain <sol|bsc|base|eth|robinhood> --address <token_address>"
argument-hint: "--chain <sol|bsc|base|eth|robinhood|arc|stable> --address <token_address>"
metadata:
cliHelp: "gmgn-cli token holders --help && gmgn-cli portfolio created-tokens --help"
---
@@ -797,7 +797,7 @@ Entry timing pressure (批次浮盈/出货) does **NOT** affect the overall rati
## Supported Chains
`sol`, `bsc`, `base`, `eth`, `robinhood`
`sol`, `bsc`, `base`, `eth`, `robinhood`, `arc`, `stable`
## Notes
+2 -1
View File
@@ -8,7 +8,8 @@ CHAIN = sys.argv[2]
LANG = sys.argv[3] if len(sys.argv) > 3 else 'zh'
# EVM 地址自动探测链(0x... 且 chain 传入 'auto' 或未明确指定时)
if CHAIN == 'auto' or (TOKEN_ADDR.startswith('0x') and CHAIN not in ('bsc','eth','base')):
KNOWN_CHAINS = ('bsc', 'eth', 'base', 'sol', 'robinhood', 'arc', 'stable')
if CHAIN == 'auto' or (TOKEN_ADDR.startswith('0x') and CHAIN not in KNOWN_CHAINS):
for _c in ('bsc', 'eth', 'base'):
_r = subprocess.run(['gmgn-cli', 'token', 'holders', '--chain', _c,
'--address', TOKEN_ADDR, '--limit', '5', '--raw'],
+74 -13
View File
@@ -1,7 +1,7 @@
---
name: gmgn-market
description: Get crypto and meme token price charts (K-line, candlestick, OHLCV), trending meme coin rankings by volume, newly launched tokens on launchpads (pump.fun, fourmeme, letsbonk, Raydium, etc.), and the hot-search ranking (most-searched tokens) via GMGN API on Solana, BSC, Base, or Ethereum. Use when user asks for price chart, trending tokens, what's pumping, hot coins, most searched tokens, new launches, token signals, or wants to discover early-stage opportunities.
argument-hint: "kline --chain <sol|bsc|base|eth|robinhood> --address <token_address> --resolution <30s|1m|5m|15m|1h|4h|1d> [--from <unix_ts>] [--to <unix_ts>] | trending --chain <sol|bsc|base|eth|robinhood> --interval <1m|5m|1h|6h|24h> | trenches --chain <sol|bsc|base|eth|robinhood> | signal --chain <sol|bsc|robinhood> | hot-searches [--chain <sol|bsc|base|eth|robinhood...>] [--interval <1m|5m|1h|6h|24h>]"
argument-hint: "kline --chain <sol|bsc|base|eth|robinhood|arc|stable> --address <token_address> --resolution <30s|1m|5m|15m|1h|4h|1d> [--from <unix_ts>] [--to <unix_ts>] | trending --chain <sol|bsc|base|eth|robinhood|arc|stable> --interval <1m|5m|1h|6h|24h> | trenches --chain <sol|bsc|base|eth|robinhood|arc|stable> | signal --chain <sol|bsc|robinhood> | hot-searches [--chain <sol|bsc|base|eth|robinhood...>] [--interval <1m|5m|1h|6h|24h>]"
metadata:
cliHelp: "gmgn-cli market --help"
---
@@ -50,12 +50,12 @@ Use the `gmgn-cli` tool to query K-line data for a token, browse trending tokens
| `market kline` | Token candlestick / OHLCV data and trading volume over a time range |
| `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) |
| `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) |
| `market signal` | Real-time token signal feed — price spikes, smart money buys, large buys, Dex ads, CTO events, and more. Results sorted by `trigger_at` descending. **sol / bsc / robinhood only. Max 50 results per group.** |
| `market signal` | Real-time token signal feed — price spikes, smart money buys, large buys, Dex ads, CTO events, and more. Results sorted by `trigger_at` descending. **sol / bsc / robinhood / arc / stable only. Max 50 results per group.** |
| `market hot-searches` | Hot-search ranking — the most-searched tokens, ranked by `visiting_count` (search heat). **Use this when the user asks "what tokens are people searching for", "most searched tokens", "hot search list", "热搜榜".** Supports multiple chains in a single request. |
## Supported Chains
`sol` / `bsc` / `base` / `eth` / `robinhood` (kline / trending / trenches; signal: `sol` / `bsc` / `robinhood`; hot-searches: `sol` / `bsc` / `base` / `eth` / `robinhood`)
`sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` (kline / trending / trenches; signal: `sol` / `bsc` / `robinhood` / `arc` / `stable`; hot-searches: `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable`)
## Prerequisites
@@ -85,7 +85,7 @@ When a request returns `429`:
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--address` | Yes | Token contract address |
| `--resolution` | Yes | Candlestick resolution: `30s` / `1m` / `5m` / `15m` / `1h` / `4h` / `1d` |
| `--from` | No | Start time (Unix seconds) |
@@ -128,7 +128,7 @@ The response is an object with a `list` array. Each element in `list` is one can
| Option | Description |
|--------|-------------|
| `--chain` | Required. `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Required. `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--interval` | Required. `1m` / `5m` / `1h` / `6h` / `24h` (default `1h`) |
| `--limit <n>` | Number of results (default 100, max 100) |
| `--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` |
@@ -542,7 +542,7 @@ Use field combinations to determine what stage a token is in. This affects how s
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--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) |
| `--limit` | No | Max results per category, max 80 (default: 80) |
@@ -559,6 +559,8 @@ Use field combinations to determine what stage a token is in. This affects how s
| `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` |
| `arc` | `dyorfun_v3` / `dyorswap` / `trench` / `onmifun` / `sharcfun` / `klik` |
| `stable` | `dyorfun_v3` / `dyorswap` / `trench` |
### Filter Presets
@@ -882,6 +884,62 @@ gmgn-cli market trenches --chain eth --raw \
--limit 80
```
### Arc Trenches Examples
```bash
# All three categories at once
gmgn-cli market trenches --chain arc --raw \
--type new_creation --type near_completion --type completed \
--launchpad-platform dyorfun_v3 --launchpad-platform dyorswap --launchpad-platform trench --launchpad-platform onmifun --launchpad-platform sharcfun --launchpad-platform klik \
--limit 80
# New creation only
gmgn-cli market trenches --chain arc --raw \
--type new_creation \
--launchpad-platform dyorfun_v3 --launchpad-platform dyorswap --launchpad-platform trench --launchpad-platform onmifun --launchpad-platform sharcfun --launchpad-platform klik \
--limit 80
# Near completion only
gmgn-cli market trenches --chain arc --raw \
--type near_completion \
--launchpad-platform dyorfun_v3 --launchpad-platform dyorswap --launchpad-platform trench --launchpad-platform onmifun --launchpad-platform sharcfun --launchpad-platform klik \
--limit 80
# Completed (open market) only
gmgn-cli market trenches --chain arc --raw \
--type completed \
--launchpad-platform dyorfun_v3 --launchpad-platform dyorswap --launchpad-platform trench --launchpad-platform onmifun --launchpad-platform sharcfun --launchpad-platform klik \
--limit 80
```
### Stable Trenches Examples
```bash
# All three categories at once
gmgn-cli market trenches --chain stable --raw \
--type new_creation --type near_completion --type completed \
--launchpad-platform dyorfun_v3 --launchpad-platform dyorswap --launchpad-platform trench \
--limit 80
# New creation only
gmgn-cli market trenches --chain stable --raw \
--type new_creation \
--launchpad-platform dyorfun_v3 --launchpad-platform dyorswap --launchpad-platform trench \
--limit 80
# Near completion only
gmgn-cli market trenches --chain stable --raw \
--type near_completion \
--launchpad-platform dyorfun_v3 --launchpad-platform dyorswap --launchpad-platform trench \
--limit 80
# Completed (open market) only
gmgn-cli market trenches --chain stable --raw \
--type completed \
--launchpad-platform dyorfun_v3 --launchpad-platform dyorswap --launchpad-platform trench \
--limit 80
```
## Output Format
### `market kline` — Price Summary
@@ -927,7 +985,7 @@ Present each category separately with a header:
## `market signal` Parameters
Chains: `sol` / `bsc` / `robinhood` only. **Maximum 50 results per group** — use multiple groups via `--groups` to cover different signal types in a single request.
Chains: `sol` / `bsc` / `robinhood` / `arc` / `stable` only. **Maximum 50 results per group** — use multiple groups via `--groups` to cover different signal types in a single request.
**Single-group (individual flags):**
@@ -936,7 +994,7 @@ Do **not** pass signal types **14, 15, or 16** in `signal_type` / `--signal-type
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` |
| `--signal-type` | No | Signal type(s), repeatable (118, default: all). See Signal Types below. |
| `--signal-type` | No | Signal type(s), repeatable (121, default: all). See Signal Types below. |
| `--mc-min` | No | Min market cap at trigger time (USD) |
| `--mc-max` | No | Max market cap at trigger time (USD) |
| `--trigger-mc-min` | No | Min market cap at signal trigger moment (USD) |
@@ -977,6 +1035,9 @@ gmgn-cli market signal --chain sol \
| 16 | SignalTypeMultiLargeBuy | Multiple large buys |
| 17 | SignalTypeBagsClaims | Bags Claim |
| 18 | SignalTypePumpClaims | Pump Claim |
| 19 | SignalTypePlatformCallV2 | Platform call (V2) |
| 20 | SignalTypeKOLBuy | KOL buy |
| 21 | SignalTypeBankerClaims | Banker Claim (Base chain Banker platform claim fee) |
### `market signal` Response Fields
@@ -986,7 +1047,7 @@ Each item in the response array is one signal event:
|-------|------|-------------|
| `id` | string | Signal event ID |
| `token_address` | string | Token contract address |
| `signal_type` | number | Signal type (118, see Signal Types above) |
| `signal_type` | number | Signal type (121, see Signal Types above) |
| `trigger_at` | number | Unix timestamp (seconds) when the signal was triggered |
| `trigger_mc` | number | Market cap at signal trigger time (USD) |
| `first_trigger_mc` | number | Market cap at the very first trigger for this token (USD) |
@@ -1037,7 +1098,7 @@ Returns the hot-search ranking — the tokens people are searching for most righ
| Option | Description |
|--------|-------------|
| `--chain <chain...>` | Repeatable. `sol` / `bsc` / `base` / `eth` / `robinhood`. **Omit to query the default 5-chain set** (sol / bsc / base / eth / robinhood, each at `24h` with chain-appropriate safety filters). |
| `--chain <chain...>` | Repeatable. `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable`. **Omit to query the default 7-chain set** (sol / bsc / base / eth / robinhood / arc / stable, each at `24h` with chain-appropriate safety filters). |
| `--interval <interval>` | `1m` / `5m` / `1h` / `6h` / `24h` (default `24h`). Applies to every `--chain` provided. |
| `--limit <n>` | Max results per chain (default `500`). |
| `--filter <tag...>` | Repeatable **boolean** filter tags (the downstream `filter.filters` array). **⚠️ SOL defaults: `renounced frozen`; EVM defaults: `not_honeypot verified renounced`.** Omitting `--filter` is NOT "no filter" — the server applies chain defaults. See the Filter Tags table below for the exact vocabulary. |
@@ -1103,7 +1164,7 @@ Numeric bounds use the **same rank-style metric names as `market trending`**. Th
**Notes on behaviour:**
- `--chain all` is **not** valid. To aggregate across chains, pass `--chain` multiple times (or omit `--chain` for the default 5-chain set).
- `--chain all` is **not** valid. To aggregate across chains, pass `--chain` multiple times (or omit `--chain` for the default 7-chain set).
- When you pass `--chain` but omit `--filter`, the **server** applies the chain-appropriate default filters — so each chain is filtered even without an explicit `--filter`.
- Different chains return different counts: a chain's token count depends on how many of its tokens made the global top-500 (sol is usually the largest).
@@ -1139,7 +1200,7 @@ See the [`market trending` Response Fields](#market-trending-response-fields) se
### `market hot-searches` Usage Examples
```bash
# Default 5-chain hot-search ranking (sol/bsc/base/eth/robinhood, each 24h)
# Default 7-chain hot-search ranking (sol/bsc/base/eth/robinhood/arc/stable, each 24h)
gmgn-cli market hot-searches --raw
# SOL only, 24h hot-search list
@@ -1182,7 +1243,7 @@ Present per chain, ranked by `visiting_count` (search heat):
- `market kline`: `--from` and `--to` are Unix timestamps in **seconds** — CLI converts to milliseconds automatically
- `market trending`: `--filter` and `--platform` are repeatable flags
- `market hot-searches`: `--chain` and `--filter` are repeatable flags; omit `--chain` to query the default 5-chain set. `--min-*`/`--max-*` range flags reuse the same metric names as `market trending` and are translated server-side per `--interval`
- `market hot-searches`: `--chain` and `--filter` are repeatable flags; omit `--chain` to query the default 7-chain set. `--min-*`/`--max-*` range flags reuse the same metric names as `market trending` and are translated server-side per `--interval`
- All commands use exist auth (API Key only, no signature)
- If the user doesn't provide kline timestamps, calculate them from the current time based on their desired time range
- Use `--raw` to get single-line JSON for further processing
+2 -2
View File
@@ -1,7 +1,7 @@
---
name: gmgn-portfolio
description: Analyze any crypto wallet by address — holdings, realized/unrealized P&L, win rate, trading history, performance stats, specific token balance, and tokens created by a developer wallet (with ATH market cap and DEX graduation status) via GMGN API on Solana, BSC, Base, or Ethereum. Use when user asks about a wallet's holdings, P&L, win rate, what tokens a dev has launched, the highest ATH token a dev ever created, or wants a wallet report to decide whether to copy-trade or follow.
argument-hint: "<info|holdings|activity|stats|token-balance|created-tokens> [--chain <sol|bsc|base|eth|robinhood>] [--wallet <wallet_address>]"
argument-hint: "<info|holdings|activity|stats|token-balance|created-tokens> [--chain <sol|bsc|base|eth|robinhood|arc|stable>] [--wallet <wallet_address>]"
metadata:
cliHelp: "gmgn-cli portfolio --help"
---
@@ -45,7 +45,7 @@ Use the `gmgn-cli` tool to query wallet portfolio data based on the user's reque
## Supported Chains
`sol` / `bsc` / `base` / `eth` / `robinhood`
`sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable`
## Prerequisites
+11 -11
View File
@@ -68,7 +68,7 @@ This is a hard, code-level barrier — do not attempt to work around it.
## Supported Chains
`sol` / `bsc` / `base` / `eth` / `robinhood`
`sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable`
## Chain Currencies
@@ -164,7 +164,7 @@ gmgn-cli swap \
| Parameter | Required | Chain | Description |
|-----------|----------|-------|-------------|
| `--chain` | Yes | all | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | all | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--from` | Yes | all | Wallet address (must match API Key binding) |
| `--input-token` | Yes | all | Input token contract address |
| `--output-token` | Yes | all | Output token contract address |
@@ -181,7 +181,7 @@ gmgn-cli swap \
| `--auto-fee` | No | `eth` | **Only with `--condition-orders`.** GMGN automatically selects the optimal fee. |
| `--max-fee-per-gas <n>` | No | `bsc` / `base` / `eth` | EIP-1559 max fee per gas. Clamped per chain minimums. Defaults to `--gas-price` if omitted (BASE/ETH). |
| `--max-priority-fee-per-gas <n>` | No | `bsc` / `base` / `eth` | EIP-1559 max priority fee per gas. Clamped per chain minimums; capped to `--max-fee-per-gas`. |
| `--condition-orders <json>` | No | all | JSON array of condition sub-orders (take-profit / stop-loss) to attach after a successful swap. **Max 10 sub-orders.** Strategy creation is best-effort: if the swap succeeds but strategy creation fails, the swap result is still returned. See ConditionOrder fields below. |
| `--condition-orders <json>` | No | sol / bsc / base / eth / robinhood | JSON array of condition sub-orders (take-profit / stop-loss) to attach after a successful swap. **Max 10 sub-orders.** Strategy creation is best-effort: if the swap succeeds but strategy creation fails, the swap result is still returned. **Not supported on `arc` / `stable`.** See ConditionOrder fields below. |
| `--sell-ratio-type <type>` | No | all | **Only with `--condition-orders`.** Sell ratio basis: `buy_amount` (default) — sells a fixed token amount stored at strategy creation time; `hold_amount` — sells a fixed percentage of the position held at trigger time |
| `--yes` | No | all | Skip the interactive confirmation prompt. **Rejected unless `GMGN_ALLOW_AUTOMATED_TRADES=1` is set in the environment.** Do not use this to bypass human confirmation. |
@@ -383,7 +383,7 @@ gmgn-cli multi-swap \
| Parameter | Required | Chain | Description |
|-----------|----------|-------|-------------|
| `--chain` | Yes | all | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | all | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--accounts` | Yes | all | Comma-separated wallet addresses (1100, all must be bound to the API Key) |
| `--input-token` | Yes | all | Input token contract address |
| `--output-token` | Yes | all | Output token contract address |
@@ -400,7 +400,7 @@ gmgn-cli multi-swap \
| `--auto-fee` | No | `eth` | **Only with `--condition-orders`.** GMGN automatically selects the optimal fee. |
| `--max-fee-per-gas <amount>` | No | `bsc` / `base` / `eth` | EIP-1559 max fee per gas. Clamped per chain minimums. Defaults to `--gas-price` if omitted (BASE/ETH). |
| `--max-priority-fee-per-gas <amount>` | No | `bsc` / `base` / `eth` | EIP-1559 max priority fee per gas. Clamped per chain minimums; capped to `--max-fee-per-gas`. |
| `--condition-orders <json>` | No | all | JSON array of condition sub-orders (take-profit / stop-loss) attached to each successful wallet's swap. Same structure as `swap --condition-orders`. Strategy creation is best-effort per wallet. |
| `--condition-orders <json>` | No | sol / bsc / base / eth / robinhood | JSON array of condition sub-orders (take-profit / stop-loss) attached to each successful wallet's swap. Same structure as `swap --condition-orders`. Strategy creation is best-effort per wallet. **Not supported on `arc` / `stable`.** |
| `--sell-ratio-type <type>` | No | all | **Only with `--condition-orders`.** Sell ratio base: `buy_amount` (default) / `hold_amount`. |
| `--yes` | No | all | Skip the interactive confirmation prompt. **Rejected unless `GMGN_ALLOW_AUTOMATED_TRADES=1` is set in the environment.** |
@@ -551,11 +551,11 @@ gmgn-cli order strategy create \
| Parameter | Required | Chain | Description |
|-----------|----------|-------|-------------|
| `--chain` | Yes | all | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | all | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--from` | Yes | all | Wallet address (must match API Key binding) |
| `--base-token` | Yes | all | Base token contract address |
| `--quote-token` | Yes | all | Quote token contract address |
| `--order-type` | Yes | all | Order type: `limit_order` / `smart_trade` |
| `--order-type` | Yes | all | Order type: `limit_order` / `smart_trade`. **`arc` / `stable` support `limit_order` only** — `smart_trade` returns a 400. |
| `--sub-order-type` | Yes | all | `limit_order`: `buy_low` / `buy_high` / `stop_loss` / `take_profit`; `smart_trade` with condition_orders: `mix_trade` |
| `--check-price` | No* | all | Trigger price — required for `limit_order`; omit for `smart_trade` (trigger is in the `buy_low` condition order) |
| `--open-price` | No | all | Open price of the position |
@@ -577,7 +577,7 @@ gmgn-cli order strategy create \
| `--max-fee-per-gas` | No | `bsc` / `base` / `eth` | EIP-1559 max fee per gas. Clamped per chain minimums. |
| `--max-priority-fee-per-gas` | No | `bsc` / `base` / `eth` | EIP-1559 max priority fee per gas. Clamped per chain minimums; capped to `--max-fee-per-gas`. |
| `--anti-mev` | No | sol / bsc / eth | Enable anti-MEV protection. Not supported on `base`. |
| `--condition-orders` | No | all | JSON array of condition sub-orders for `smart_trade`. Must include one `buy_low` entry (with `check_price` lower than `open_price`) plus at least one TP/SL entry. |
| `--condition-orders` | No | sol / bsc / base / eth / robinhood | JSON array of condition sub-orders for `smart_trade`. Must include one `buy_low` entry (with `check_price` lower than `open_price`) plus at least one TP/SL entry. **Not supported on `arc` / `stable`** (`smart_trade` is rejected there). |
| `--yes` | No | all | Skip the interactive confirmation prompt. **Rejected unless `GMGN_ALLOW_AUTOMATED_TRADES=1` is set in the environment.** |
### `order strategy create` Response Fields
@@ -609,7 +609,7 @@ gmgn-cli order strategy list --chain sol --group-tag STMix --base-token <token_a
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--type` | No | `open` (default) / `history` |
| `--from` | No | Filter by wallet address |
| `--group-tag` | Yes | Filter by order group: `LimitOrder` (limit orders only) / `STMix` (mixed strategy orders: take-profit, stop-loss, trailing take-profit, trailing stop-loss) |
@@ -633,7 +633,7 @@ gmgn-cli order strategy list --chain sol --group-tag STMix --base-token <token_a
| `auto_slippage` | bool | Whether auto slippage is enabled |
| `base_decimal` | int | Base token decimal places |
| `base_token` | string | Base token contract address |
| `chain` | string | Chain: `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `chain` | string | Chain: `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `close_amount` | string | Token amount sold on close; empty when order is open |
| `close_price` | string | Token price at close; empty when order is open |
| `close_sell_model` | string | Sell model used on close; empty when order is open |
@@ -747,7 +747,7 @@ gmgn-cli order strategy cancel \
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--from` | Yes | Wallet address (must match API Key binding) |
| `--order-id` | Yes | Order ID to cancel |
| `--order-type` | No | Order type: `limit_order` (limit order) / `smart_trade` (mixed strategy order: take-profit, stop-loss, trailing take-profit, trailing stop-loss) |
+5 -5
View File
@@ -1,7 +1,7 @@
---
name: gmgn-token
description: Research any crypto or meme token by address — real-time price, market cap, liquidity, holder list, trader list, top Smart Money and KOL positions, security audit (honeypot, rug pull risk, dev wallet, renounced status), social links (Twitter/X, website) via GMGN API on Solana, BSC, Base, or Ethereum. Use when user asks about a token's price, safety, holders, traders, smart money exposure, or wants due diligence before buying.
argument-hint: "<sub-command> --chain <sol|bsc|base|eth|robinhood> --address <token_address>"
argument-hint: "<sub-command> --chain <sol|bsc|base|eth|robinhood|arc|stable> --address <token_address>"
metadata:
cliHelp: "gmgn-cli token --help"
---
@@ -21,7 +21,7 @@ Use the `gmgn-cli` tool to query token information based on the user's request.
## Core Concepts
- **Token address** — The on-chain contract address that uniquely identifies a token on its chain. Required for all token sub-commands. Format: base58 (SOL) or `0x...` hex (BSC/Base).
- **Chain** — The blockchain network: `sol` = Solana, `bsc` = BNB Smart Chain, `base` = Base (Coinbase L2), `eth` = Ethereum mainnet, `robinhood` = Robinhood chain.
- **Chain** — The blockchain network: `sol` = Solana, `bsc` = BNB Smart Chain, `base` = Base (Coinbase L2), `eth` = Ethereum mainnet, `robinhood` = Robinhood chain, `arc` = Arc chain, `stable` = Stable chain.
- **Market cap** — Not returned directly by `token info`. Calculate as `price.price × circulating_supply` (`price` is a nested object; use `price.price` for the current USD price string).
- **Liquidity** — USD value of token reserves in the main trading pool. Low liquidity (< $10k) means high price impact / slippage when buying or selling.
- **Holder** — A wallet that currently holds the token. `token holders` returns wallets ranked by current balance.
@@ -46,7 +46,7 @@ Use the `gmgn-cli` tool to query token information based on the user's request.
## Supported Chains
`sol` / `bsc` / `base` / `eth` / `robinhood`
`sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable`
## Prerequisites
@@ -76,7 +76,7 @@ When a request returns `429`:
| Parameter | Required | Description |
|-----------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--address` | Yes | Token contract address |
| `--raw` | No | Output raw single-line JSON (for piping or further processing) |
@@ -84,7 +84,7 @@ When a request returns `429`:
| Parameter | Required | Default | Description |
|-----------|----------|---------|-------------|
| `--chain` | Yes | — | `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Yes | — | `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--address` | Yes | — | Token contract address |
| `--limit` | No | `20` | Number of results, max `100` |
| `--order-by` | No | `amount_percentage` | Sort field — see table below |
+5 -5
View File
@@ -1,7 +1,7 @@
---
name: gmgn-track
description: Get real-time crypto buy/sell activity from Smart Money wallets, KOL influencer wallets, and personally followed wallets via GMGN API — alpha signals, whale tracking, meme token copy-trading ideas on Solana, BSC, Base, or Ethereum. Also query which tokens a wallet has followed (bookmarked) on GMGN. Use when user asks what smart money or KOLs are buying, wants whale alerts, on-chain alpha, copy-trade signals, or wants to check a wallet's followed tokens. (For a specific wallet address's portfolio, use gmgn-portfolio.)
argument-hint: "<follow-tokens|follow-wallet|kol|smartmoney> --chain <sol|bsc|base|eth|robinhood> [--wallet <wallet_address>]"
argument-hint: "<follow-tokens|follow-wallet|kol|smartmoney> --chain <sol|bsc|base|eth|robinhood|arc|stable> [--wallet <wallet_address>]"
metadata:
cliHelp: "gmgn-cli track --help"
---
@@ -59,7 +59,7 @@ Use the `gmgn-cli` tool to query on-chain tracking data based on the user's requ
## Supported Chains
`sol` / `bsc` / `base` / `eth` / `robinhood`
`sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable`
## Prerequisites
@@ -130,7 +130,7 @@ gmgn-cli track smartmoney --chain sol --side sell --limit 10 --raw
| Option | Description |
|--------|-------------|
| `--chain` | Required. `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Required. `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--wallet <address>` | Required. Wallet address to query |
| `--group-id <id>` | Filter by group: `all_group` (all tokens across groups), `default` (default group), or a user-defined group ID |
| `--interval <interval>` | Time interval for price change stats (e.g. `1m`, `5m`, `1h`, `6h`, `24h`) |
@@ -172,7 +172,7 @@ Each item in `followings` contains:
| Option | Description |
|--------|-------------|
| `--chain` | Required. `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Required. `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--wallet <address>` | Required. Wallet address to query |
## `track follow-token-groups` Response Fields
@@ -190,7 +190,7 @@ Each item in `followings` contains:
| Option | Description |
|--------|-------------|
| `--chain` | Required. `sol` / `bsc` / `base` / `eth` / `robinhood` |
| `--chain` | Required. `sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable` |
| `--wallet <address>` | Filter by wallet address |
| `--limit <n>` | Page size (1100, default 10) |
| `--side <side>` | Trade direction: `buy` / `sell` |
+2 -2
View File
@@ -1,7 +1,7 @@
---
name: gmgn-wallet-score
description: Score any wallet address across three angles — profitability (a real track-record score: is this trader actually good?), copy-tradeability (can YOU actually capture what it makes, plus a latency/slippage/gas backtest), and Dev reputation (if it's mostly a token launcher, how trustworthy are its launches) — plus trading-style tags, all computed deterministically from GMGN portfolio data. Use when the user asks about a wallet's profitability ("这个钱包盈利能力怎么样", "钱包战绩怎么样", "is this wallet profitable"), copy-trade worthiness ("is this wallet worth following", "跟单评分", "钱包评分", "值不值得跟单", "if I copy this wallet what's my real return"), or token-launch/Dev reputation ("这个钱包发盘情况怎么样", "是不是发币方钱包", "dev 信誉怎么样", "is this a token-creator wallet"), or gives a wallet address and wants any of these judgments.
argument-hint: "--chain <sol|bsc|base|eth|robinhood> --wallet <wallet_address> [--latency <seconds>] [--slippage <pct>] [--gas <usd>] [--sample <n>]"
argument-hint: "--chain <sol|bsc|base|eth|robinhood|arc|stable> --wallet <wallet_address> [--latency <seconds>] [--slippage <pct>] [--gas <usd>] [--sample <n>]"
metadata:
cliHelp: "gmgn-cli portfolio stats --help && gmgn-cli portfolio activity --help && gmgn-cli portfolio created-tokens --help && gmgn-cli token security --help"
---
@@ -506,7 +506,7 @@ Fields the script reads, confirmed against `portfolio stats` / `portfolio activi
## Supported Chains
`sol` / `bsc` / `base` / `eth` / `robinhood`
`sol` / `bsc` / `base` / `eth` / `robinhood` / `arc` / `stable`
## Prerequisites
+7 -1
View File
@@ -187,7 +187,7 @@ export interface TokenSignalGroup {
export interface HotSearchesParam {
label?: string;
interval: string; // "1m" | "5m" | "1h" | "6h" | "24h"
chain: string; // "sol" | "bsc" | "base" | "eth" | "robinhood"
chain: string; // "sol" | "bsc" | "base" | "eth" | "robinhood" | "arc" | "stable"
filters?: string[];
limit?: number;
[key: string]: string[] | number | string | undefined;
@@ -846,6 +846,12 @@ const TRENCHES_PLATFORMS: Record<string, string[]> = {
"noxa", "virtuals_v2", "bankr", "dyorswap",
"pool_uniswap_v2", "pool_uniswap_v3", "pool_uniswap_v4",
],
arc: [
"dyorfun_v3", "dyorswap", "trench", "onmifun", "sharcfun", "klik",
],
stable: [
"dyorfun_v3", "dyorswap", "trench",
],
};
const TRENCHES_QUOTE_ADDRESS_TYPES: Record<string, number[]> = {
+8 -8
View File
@@ -26,7 +26,7 @@ export function registerMarketCommands(program: Command): void {
market
.command("kline")
.description("Get token K-line (candlestick) data")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--address <address>", "Token contract address")
.requiredOption("--resolution <resolution>", "Candlestick resolution: 30s / 1m / 5m / 15m / 1h / 4h / 1d")
.option("--from <timestamp>", "Start time (Unix seconds)", parseInt)
@@ -51,7 +51,7 @@ export function registerMarketCommands(program: Command): void {
const trendingCmd = market
.command("trending")
.description("Get trending token swap data")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--interval <interval>", "Time interval: 1m / 5m / 1h / 6h / 24h")
.option("--limit <n>", "Number of results (default 100, max 100)", parseInt)
.option("--order-by <field>", "Sort field: default / volume / swaps / marketcap / holder_count / price / change1h / ... (see docs for full list)")
@@ -96,7 +96,7 @@ export function registerMarketCommands(program: Command): void {
const trenchesCmd = market
.command("trenches")
.description("Get Trenches token data (new creation, near completion, completed)")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.option("--type <type...>", "Categories to query, repeatable: new_creation / near_completion / completed (default: all three)")
.option("--launchpad-platform <platform...>", "Launchpad platform filter, repeatable (default: all platforms for the chain)")
.option("--limit <n>", "Max results per category, max 80 (default: 80)", parseInt)
@@ -157,8 +157,8 @@ export function registerMarketCommands(program: Command): void {
market
.command("signal")
.description("Query token signals (price spikes, smart money buys, large buys, etc.) — max 50 results per group")
.requiredOption("--chain <chain>", "Chain: sol / bsc / robinhood")
.option("--signal-type <n...>", "Signal type(s), repeatable: 118 (default: all types)", (v: string, acc: number[]) => { acc.push(parseInt(v, 10)); return acc; }, [] as number[])
.requiredOption("--chain <chain>", "Chain: sol / bsc / robinhood / arc / stable")
.option("--signal-type <n...>", "Signal type(s), repeatable: 121 (default: all types)", (v: string, acc: number[]) => { acc.push(parseInt(v, 10)); return acc; }, [] as number[])
.option("--mc-min <usd>", "Min market cap at trigger time (USD)", parseFloat)
.option("--mc-max <usd>", "Max market cap at trigger time (USD)", parseFloat)
.option("--trigger-mc-min <usd>", "Min market cap at signal trigger (USD)", parseFloat)
@@ -171,8 +171,8 @@ export function registerMarketCommands(program: Command): void {
.option("--raw", "Output raw JSON")
.action(async (opts: Record<string, unknown>) => {
validateChain(opts["chain"] as string);
if (!["sol", "bsc", "robinhood"].includes(opts["chain"] as string)) {
console.error(`[gmgn-cli] market signal only supports sol, bsc and robinhood, got "${opts["chain"]}"`);
if (!["sol", "bsc", "robinhood", "arc", "stable"].includes(opts["chain"] as string)) {
console.error(`[gmgn-cli] market signal only supports sol, bsc, robinhood, arc and stable, got "${opts["chain"]}"`);
process.exit(1);
}
@@ -207,7 +207,7 @@ export function registerMarketCommands(program: Command): void {
const hotSearchesCmd = market
.command("hot-searches")
.description("Get the hot-search ranking (most-searched tokens) for one or more chains")
.option("--chain <chain...>", "Chain(s), repeatable: sol / bsc / base / eth / robinhood (default: all default chains)")
.option("--chain <chain...>", "Chain(s), repeatable: sol / bsc / base / eth / robinhood / arc / stable (default: all default chains)")
.option("--interval <interval>", "Time window: 1m / 5m / 1h / 6h / 24h (default 24h)", "24h")
.option("--limit <n>", "Max results per chain (default 500)", parseInt)
.option("--filter <tag...>", "Boolean filter tags, repeatable. sol defaults: renounced / frozen; EVM defaults: not_honeypot / verified / renounced")
+5 -5
View File
@@ -10,7 +10,7 @@ export function registerPortfolioCommands(program: Command): void {
portfolio
.command("holdings")
.description("Get wallet token holdings")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--wallet <address>", "Wallet address")
.option("--limit <n>", "Page size (default 20, max 50)", parseInt, 20)
.option("--cursor <cursor>", "Pagination cursor")
@@ -46,7 +46,7 @@ export function registerPortfolioCommands(program: Command): void {
portfolio
.command("activity")
.description("Get wallet transaction activity")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--wallet <address>", "Wallet address")
.option("--token <address>", "Filter by token contract address")
.option("--limit <n>", "Page size", parseInt)
@@ -71,7 +71,7 @@ export function registerPortfolioCommands(program: Command): void {
portfolio
.command("stats")
.description("Get wallet trading statistics (supports multiple wallets)")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--wallet <address...>", "Wallet address(es), repeatable")
.option("--period <period>", "Stats period: 7d / 30d", "7d")
.option("--raw", "Output raw JSON")
@@ -96,7 +96,7 @@ export function registerPortfolioCommands(program: Command): void {
portfolio
.command("token-balance")
.description("Get wallet token balance for a single token")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--wallet <address>", "Wallet address")
.requiredOption("--token <address>", "Token contract address")
.option("--raw", "Output raw JSON")
@@ -112,7 +112,7 @@ export function registerPortfolioCommands(program: Command): void {
portfolio
.command("created-tokens")
.description("Get tokens created by a developer wallet")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--wallet <address>", "Developer wallet address")
.option("--order-by <field>", "Sort field: market_cap / token_ath_mc")
.option("--direction <dir>", "Sort direction: asc / desc")
+19 -14
View File
@@ -3,13 +3,13 @@ import { OpenApiClient, SwapParams, MultiSwapParams, StrategyCreateParams, Strat
import { getConfig } from "../config.js";
import { exitOnError, printResult } from "../output.js";
import { confirmTrade } from "../confirm.js";
import { validateAddress, validateChain, validatePercent, validatePositiveInt } from "../validate.js";
import { validateAddress, validateChain, validateConditionOrdersSupported, validatePercent, validatePositiveInt } from "../validate.js";
export function registerSwapCommands(program: Command): void {
program
.command("swap")
.description("Submit a token swap")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--from <address>", "Wallet address (must match API Key binding)")
.requiredOption("--input-token <address>", "Input token contract address")
.requiredOption("--output-token <address>", "Output token contract address")
@@ -26,7 +26,7 @@ export function registerSwapCommands(program: Command): void {
.option("--auto-fee", "Auto fee mode (eth only); delegates fee selection to trading bot for condition_orders strategy")
.option("--max-fee-per-gas <amount>", "EIP-1559 max fee per gas (BSC / BASE / ETH)")
.option("--max-priority-fee-per-gas <amount>", "EIP-1559 max priority fee per gas (BSC / BASE / ETH)")
.option("--condition-orders <json>", 'JSON array of take-profit/stop-loss conditions, e.g. \'[{"order_type":"profit_stop","side":"sell","price_scale":"150","sell_ratio":"100"}]\'; trace types: \'[{"order_type":"profit_stop_trace","side":"sell","price_scale":"150","sell_ratio":"100","drawdown_rate":"50"}]\'')
.option("--condition-orders <json>", 'JSON array of take-profit/stop-loss conditions, e.g. \'[{"order_type":"profit_stop","side":"sell","price_scale":"150","sell_ratio":"100"}]\'; trace types: \'[{"order_type":"profit_stop_trace","side":"sell","price_scale":"150","sell_ratio":"100","drawdown_rate":"50"}]\'; not supported on arc / stable')
.option("--sell-ratio-type <type>", "Sell ratio base: buy_amount (default) / hold_amount; only used with --condition-orders")
.option("--yes", "Skip the interactive confirmation prompt (requires GMGN_ALLOW_AUTOMATED_TRADES=1)")
.option("--raw", "Output raw JSON")
@@ -61,6 +61,7 @@ export function registerSwapCommands(program: Command): void {
if (opts.maxFeePerGas) params.max_fee_per_gas = opts.maxFeePerGas;
if (opts.maxPriorityFeePerGas) params.max_priority_fee_per_gas = opts.maxPriorityFeePerGas;
if (opts.conditionOrders) {
validateConditionOrdersSupported(opts.chain, "swap");
try {
params.condition_orders = JSON.parse(opts.conditionOrders);
} catch {
@@ -92,7 +93,7 @@ export function registerSwapCommands(program: Command): void {
program
.command("multi-swap")
.description("Submit token swaps across multiple wallets concurrently (up to 100 wallets)")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--accounts <addresses>", "Comma-separated wallet addresses (all must be bound to the API Key)")
.requiredOption("--input-token <address>", "Input token contract address")
.requiredOption("--output-token <address>", "Output token contract address")
@@ -109,7 +110,7 @@ export function registerSwapCommands(program: Command): void {
.option("--auto-fee", "Auto fee mode (eth only); delegates fee selection to trading bot for condition_orders strategy")
.option("--max-fee-per-gas <amount>", "EIP-1559 max fee per gas (BSC / BASE / ETH)")
.option("--max-priority-fee-per-gas <amount>", "EIP-1559 max priority fee per gas (BSC / BASE / ETH)")
.option("--condition-orders <json>", "JSON array of take-profit/stop-loss conditions attached to each successful wallet's swap")
.option("--condition-orders <json>", "JSON array of take-profit/stop-loss conditions attached to each successful wallet's swap; not supported on arc / stable")
.option("--sell-ratio-type <type>", "Sell ratio base: buy_amount (default) / hold_amount; only used with --condition-orders")
.option("--yes", "Skip the interactive confirmation prompt (requires GMGN_ALLOW_AUTOMATED_TRADES=1)")
.option("--raw", "Output raw JSON")
@@ -153,6 +154,7 @@ export function registerSwapCommands(program: Command): void {
if (opts.maxFeePerGas) params.max_fee_per_gas = opts.maxFeePerGas;
if (opts.maxPriorityFeePerGas) params.max_priority_fee_per_gas = opts.maxPriorityFeePerGas;
if (opts.conditionOrders) {
validateConditionOrdersSupported(opts.chain, "multi_swap");
try { params.condition_orders = JSON.parse(opts.conditionOrders); }
catch { console.error("[gmgn-cli] --condition-orders must be valid JSON"); process.exit(1); }
}
@@ -179,7 +181,7 @@ export function registerSwapCommands(program: Command): void {
order
.command("quote")
.description("Get a swap quote without submitting a transaction (exist auth — GMGN_API_KEY only, no private key needed)")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--from <address>", "Wallet address")
.requiredOption("--input-token <address>", "Input token contract address")
.requiredOption("--output-token <address>", "Output token contract address")
@@ -202,7 +204,7 @@ export function registerSwapCommands(program: Command): void {
order
.command("get")
.description("Query order status (requires private key)")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--order-id <id>", "Order ID")
.option("--raw", "Output raw JSON")
.action(async (opts) => {
@@ -214,8 +216,8 @@ export function registerSwapCommands(program: Command): void {
program
.command("gas-price")
.description("Query recommended gas price tiers for any chain (exist auth — API Key only; eth / bsc / base / sol / robinhood)")
.requiredOption("--chain <chain>", "Chain: eth / bsc / base / sol / robinhood")
.description("Query recommended gas price tiers for any chain (exist auth — API Key only; eth / bsc / base / sol / robinhood / arc / stable)")
.requiredOption("--chain <chain>", "Chain: eth / bsc / base / sol / robinhood / arc / stable")
.option("--raw", "Output raw JSON")
.action(async (opts) => {
const client = new OpenApiClient(getConfig(false));
@@ -228,11 +230,11 @@ export function registerSwapCommands(program: Command): void {
strategy
.command("create")
.description("Create a limit/strategy order (requires private key)")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--from <address>", "Wallet address (must match API Key binding)")
.requiredOption("--base-token <address>", "Base token contract address")
.requiredOption("--quote-token <address>", "Quote token contract address")
.requiredOption("--order-type <type>", "Order type: limit_order / smart_trade")
.requiredOption("--order-type <type>", "Order type: limit_order / smart_trade (arc / stable support limit_order only)")
.requiredOption("--sub-order-type <type>", "Sub-order type: buy_low / buy_high / stop_loss / take_profit (limit_order); mix_trade (smart_trade with condition_orders)")
.option("--check-price <price>", "Trigger check price (required for limit_order; omit for smart_trade)")
.option("--open-price <price>", "Open price of the position")
@@ -252,7 +254,7 @@ export function registerSwapCommands(program: Command): void {
.option("--max-fee-per-gas <amount>", "EIP-1559 max fee per gas (BSC / BASE / ETH)")
.option("--max-priority-fee-per-gas <amount>", "EIP-1559 max priority fee per gas (BSC / BASE / ETH)")
.option("--anti-mev", "Enable anti-MEV protection")
.option("--condition-orders <json>", "JSON array of condition sub-orders for smart_trade (must include a buy_low entry + TP/SL entries)")
.option("--condition-orders <json>", "JSON array of condition sub-orders for smart_trade (must include a buy_low entry + TP/SL entries); smart_trade not supported on arc / stable")
.option("--sell-param <json>", "JSON object of sell-side trade params used when a TP/SL condition fires (required for smart_trade)")
.option("--buy-param <json>", "JSON object of buy-side trade params override for smart_trade")
.option("--yes", "Skip the interactive confirmation prompt (requires GMGN_ALLOW_AUTOMATED_TRADES=1)")
@@ -267,6 +269,9 @@ export function registerSwapCommands(program: Command): void {
process.exit(1);
}
validateChain(opts.chain);
if (opts.orderType === "smart_trade") {
validateConditionOrdersSupported(opts.chain, "strategy create (smart_trade)");
}
const params: StrategyCreateParams = {
chain: opts.chain,
from_address: opts.from,
@@ -325,7 +330,7 @@ export function registerSwapCommands(program: Command): void {
strategy
.command("list")
.description("List strategy orders (requires private key)")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.option("--type <type>", "open (default) / history")
.option("--from <address>", "Filter by wallet address")
.option("--group-tag <tag>", "Filter by group: LimitOrder / STMix")
@@ -350,7 +355,7 @@ export function registerSwapCommands(program: Command): void {
strategy
.command("cancel")
.description("Cancel a strategy order (requires private key)")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--from <address>", "Wallet address (must match API Key binding)")
.requiredOption("--order-id <id>", "Order ID to cancel")
.option("--order-type <type>", "Order type: limit_order / smart_trade")
+5 -5
View File
@@ -10,7 +10,7 @@ export function registerTokenCommands(program: Command): void {
token
.command("info")
.description("Get token basic information and realtime price")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--address <address>", "Token contract address")
.option("--raw", "Output raw JSON")
.action(async (opts) => {
@@ -24,7 +24,7 @@ export function registerTokenCommands(program: Command): void {
token
.command("security")
.description("Get token security metrics")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--address <address>", "Token contract address")
.option("--raw", "Output raw JSON")
.action(async (opts) => {
@@ -38,7 +38,7 @@ export function registerTokenCommands(program: Command): void {
token
.command("pool")
.description("Get token liquidity pool information")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--address <address>", "Token contract address")
.option("--raw", "Output raw JSON")
.action(async (opts) => {
@@ -52,7 +52,7 @@ export function registerTokenCommands(program: Command): void {
token
.command("holders")
.description("Get top token holders")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--address <address>", "Token contract address")
.option("--limit <n>", "Number of results (default 20, max 100)", parseInt)
.option("--order-by <field>", "Sort field: amount_percentage / profit / unrealized_profit / buy_volume_cur / sell_volume_cur", "amount_percentage")
@@ -75,7 +75,7 @@ export function registerTokenCommands(program: Command): void {
token
.command("traders")
.description("Get top token traders")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--address <address>", "Token contract address")
.option("--limit <n>", "Number of results (default 20, max 100)", parseInt)
.option("--order-by <field>", "Sort field: amount_percentage / profit / unrealized_profit / buy_volume_cur / sell_volume_cur", "amount_percentage")
+5 -5
View File
@@ -10,7 +10,7 @@ export function registerTrackCommands(program: Command): void {
track
.command("follow-tokens")
.description("Get the followed token list for a wallet on a given chain")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--wallet <address>", "Wallet address")
.option("--group-id <id>", "Filter by group: all_group (all), default, or a user-defined group ID")
.option("--interval <interval>", "Time interval for price change stats (e.g. 1m, 5m, 1h, 6h, 24h)")
@@ -38,7 +38,7 @@ export function registerTrackCommands(program: Command): void {
track
.command("follow-token-groups")
.description("Get the follow token group names for a wallet on a given chain")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.requiredOption("--wallet <address>", "Wallet address")
.option("--raw", "Output raw JSON")
.action(async (opts) => {
@@ -51,7 +51,7 @@ export function registerTrackCommands(program: Command): void {
track
.command("follow-wallet")
.description("Get follow-wallet trade records")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.option("--wallet <address>", "Filter by wallet address")
.option("--limit <n>", "Page size (1100, default 10)", parseInt)
.option("--side <side>", "Trade direction filter: buy / sell")
@@ -76,7 +76,7 @@ export function registerTrackCommands(program: Command): void {
track
.command("kol")
.description("Get KOL trade records")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.option("--limit <n>", "Page size (1200, default 100)", parseInt)
.option("--side <side>", "Filter by trade direction: buy / sell (client-side filter)")
.option("--raw", "Output raw JSON")
@@ -93,7 +93,7 @@ export function registerTrackCommands(program: Command): void {
track
.command("smartmoney")
.description("Get Smart Money trade records")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth / robinhood / arc / stable")
.option("--limit <n>", "Page size (1200, default 100)", parseInt)
.option("--side <side>", "Filter by trade direction: buy / sell (client-side filter)")
.option("--raw", "Output raw JSON")
+14 -2
View File
@@ -1,4 +1,4 @@
const VALID_CHAINS = new Set(["sol", "bsc", "base", "eth", "robinhood" /*, "monad" */]);
const VALID_CHAINS = new Set(["sol", "bsc", "base", "eth", "robinhood", "arc", "stable" /*, "monad" */]);
const SOL_ADDRESS_RE = /^[1-9A-HJ-NP-Za-km-z]{32,44}$/;
const EVM_ADDRESS_RE = /^0x[0-9a-fA-F]{40}$/;
const POSITIVE_INT_RE = /^\d+$/;
@@ -13,7 +13,7 @@ export function validateChain(chain: string): void {
}
export function validateAddress(address: string, chain: string, label: string): void {
const isEvm = chain === "bsc" || chain === "base" || chain === "eth" || chain === "robinhood" /* || chain === "monad" */;
const isEvm = chain === "bsc" || chain === "base" || chain === "eth" || chain === "robinhood" || chain === "arc" || chain === "stable" /* || chain === "monad" */;
const valid = isEvm ? EVM_ADDRESS_RE.test(address) : SOL_ADDRESS_RE.test(address);
if (!valid) {
console.error(
@@ -32,6 +32,18 @@ export function validatePositiveInt(value: string, label: string): void {
}
}
// Chains that do not support condition orders / smart_trade strategies.
const NO_CONDITION_ORDER_CHAINS = new Set(["arc", "stable"]);
export function validateConditionOrdersSupported(chain: string, feature: string): void {
if (NO_CONDITION_ORDER_CHAINS.has(chain)) {
console.error(
`[gmgn-cli] condition orders are not supported on chain "${chain}" (${feature}). Use a plain swap or limit_order instead.`
);
process.exit(1);
}
}
export function validatePercent(value: number): void {
if (value <= 0 || value > 100) {
console.error(