Compare commits

...

20 Commits

Author SHA1 Message Date
GMGN.AI aa74d04839 1.4.7 2026-06-24 16:23:07 +08:00
GMGN.AI 6461d2f8df chore: ignore local Claude Code dev configs 2026-06-24 16:22:55 +08:00
GMGN.AI 22d2ad25d5 Merge pull request #167 from GMGNAI/feat-quote-exist-auth
docs(order-quote): order quote now uses normal auth, no private key needed
2026-06-24 16:21:20 +08:00
David Lau 25f4207351 fix(order-quote): switch quoteOrder to exist auth and update CLI help text
- OpenApiClient.quoteOrder now calls authExistRequest instead of authSignedRequest
- Remove all GMGN_PRIVATE_KEY references from the quote command description and options

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 16:13:37 +08:00
David Lau d0ca1b40ce docs(order-quote): order quote now uses normal auth, no private key needed
quote endpoint downgraded to exist auth (API Key only); from_address
no longer needs to match the key's bound wallet. Update all auth
references in cli-usage.md, SKILL.md, and CLAUDE.md.
2026-06-22 16:55:51 +08:00
GMGN.AI 4e54086137 1.4.6 2026-06-18 11:59:38 +08:00
GMGN.AI fcd14effbf Merge pull request #165 from GumpOnchain/feat/add-bsc-launchpad-platforms
feat(bsc): add new BSC launchpad platforms
2026-06-18 11:57:14 +08:00
gumponchain d34315ce98 fix(bsc): update --platform hint text with new BSC launchpad names
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 11:52:04 +08:00
gumponchain b6c4ff50f2 feat(bsc): add new BSC launchpad platforms
Add cubepeg, likwid, goplus_creator, goplus_skills, openfour after
four_xmode_agent; add flap_stocks and flap_aioracle after flap.
Updates both TRENCHES_PLATFORMS defaults and SKILL.md examples.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 11:47:18 +08:00
GMGN.AI e6dfca48d8 1.4.5 2026-06-16 11:19:13 +08:00
deepfeature 362d180910 Merge pull request #161 from GMGNAI/feat/add-user-agent-header
feat(client): send User-Agent header on all API requests
2026-06-16 11:13:35 +08:00
deepfeature d5c43eed51 feat(client): send User-Agent header on all API requests
Add a `User-Agent: gmgn-cli/<version>` header (version read from
package.json) to both authExistRequest and authSignedRequest, so
upstream can identify CLI traffic and gateways that reject empty/default
UAs do not block requests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 11:12:10 +08:00
GMGN.AI 968013ebce Merge pull request #160 from nova-0328/feat/cooking
docs(cooking): clarify Flap fee-share schema and add real-world examples
2026-06-12 15:04:24 +08:00
prodev-nova 3d11f8c6d6 docs(cooking): clarify Flap fee-share schema and add real-world examples
- Correct mkt_bps: it's the tax-recipient share (X handle in gift mode or
  split_conf addresses in split mode), not a generic "marketing" fund
- Make twitter_account / split_conf conditional-required based on recipient_type
  instead of always required
- Add two end-to-end Flap examples (split mode → BSC address, gift mode → X handle)
- Merge "Full worked examples" into the Usage Examples section

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 14:54:11 +08:00
GMGN.AI f15e8271f9 1.4.4 2026-06-11 12:07:35 +08:00
GMGN.AI eda0ac9f52 Merge pull request #158 from GMGNAI/feat-add-follow-tokens-command
Feat add follow tokens command
2026-06-11 11:53:40 +08:00
davidsx b940c66c00 Merge pull request #156 from prodev-nova/feat/cooking
fix(cooking): remove deprecated --interval-seconds flag
2026-06-05 21:18:04 +08:00
prodev-nova 1964e927cd fix(cooking): remove deprecated --interval-seconds flag
The interval_seconds param is no longer used. Removed from the CLI
option, params assembly, CreateTokenParams, SKILL.md and cli-usage.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 21:03:23 +08:00
David Lau 0f3d550736 feat(track): add follow-token-groups subcommand
Adds `track follow-token-groups` command that calls
GET /v1/user/follow_token_groups to retrieve a wallet's token follow
group names (id, name, rank) for a given chain.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 17:08:44 +08:00
David Lau dd41e38755 feat(track): add follow-tokens subcommand
Adds gmgn-cli track follow-tokens to query a wallet's followed token
list on a given chain via GET /v1/user/follow_tokens.

- Add getFollowTokens() to OpenApiClient (authExist)
- Add track follow-tokens command with --chain, --wallet (required),
  --group-id, --interval, --order-by, --direction, --limit, --cursor,
  --search optional flags
- Update SKILL.md: sub-commands table, rate limit table (weight 3),
  usage examples, options table, response fields
- Update docs/cli-usage.md and Readme.md / Readme.zh.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 18:37:43 +08:00
16 changed files with 294 additions and 50 deletions
+5
View File
@@ -18,3 +18,8 @@ dist
# Internal / testing (not for public release)
testing/
# Local Claude Code configs (dev environment only)
.claude/
.agents/
skills-lock.json
+2 -2
View File
@@ -93,8 +93,8 @@ EOF
| Mode | Commands | Requirements |
|------|----------|--------------|
| Normal | token / market / portfolio (except holdings) / track kol / track smartmoney | `GMGN_API_KEY` only, no signature |
| Critical | swap / order / portfolio holdings / track follow-wallet | `GMGN_API_KEY` + `GMGN_PRIVATE_KEY` — CLI handles signing automatically |
| Normal | token / market / portfolio (except holdings) / track kol / track smartmoney / **order quote** | `GMGN_API_KEY` only, no signature |
| Critical | swap / order (except order quote) / portfolio holdings / track follow-wallet | `GMGN_API_KEY` + `GMGN_PRIVATE_KEY` — CLI handles signing automatically |
## SKILL.md Authoring Rules
+3
View File
@@ -505,6 +505,9 @@ gmgn-cli portfolio created-tokens --chain sol --wallet <addr>
### Track
```bash
# Followed token map for a wallet
gmgn-cli track follow-tokens --chain sol --wallet <wallet_address>
# Follow-wallet trade records
gmgn-cli track follow-wallet --chain sol
gmgn-cli track follow-wallet --chain sol --limit 20 --min-amount-usd 1000
+3
View File
@@ -529,6 +529,9 @@ gmgn-cli portfolio created-tokens --chain sol --wallet <addr>
### Track
```bash
# 查询钱包收藏的代币列表
gmgn-cli track follow-tokens --chain sol --wallet <wallet_address>
# 追踪关注钱包的交易动态
gmgn-cli track follow-wallet --chain sol
gmgn-cli track follow-wallet --chain sol --limit 20 --min-amount-usd 1000
+52 -5
View File
@@ -349,6 +349,54 @@ gmgn-cli market signal --chain sol --groups '<json_array>' [--raw]
---
## track follow-tokens
Query the followed token list for a wallet. Returns a paginated list of tokens the wallet has bookmarked on GMGN, with full market data. API Key auth only.
```bash
gmgn-cli track follow-tokens \
--chain <chain> \
--wallet <wallet_address> \
[--group-id <id>] \
[--order-by <field>] \
[--direction <asc|desc>] \
[--limit <n>] \
[--cursor <cursor>] \
[--raw]
```
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` |
| `--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` |
| `--order-by` | No | `created_at` / `swaps` / `volume` / `market_cap` / `liquidity` / `price` / `open_timestamp` |
| `--direction` | No | Sort direction: `asc` / `desc` |
| `--limit` | No | Page size |
| `--cursor` | No | Pagination cursor from previous response |
| `--search` | No | Search by token name or address |
---
## track follow-token-groups
Query the follow token group names for a wallet. Returns the groups a wallet uses to organise its followed tokens on GMGN. API Key auth only.
```bash
gmgn-cli track follow-token-groups \
--chain <chain> \
--wallet <wallet_address> \
[--raw]
```
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` |
| `--wallet` | Yes | Wallet address |
---
## portfolio follow-wallet
Query follow-wallet trade records. Returns trades from wallets you personally follow on the GMGN platform. The follow list is resolved automatically from the GMGN user account bound to the API Key — `--wallet` is optional. Signed auth (API Key + private key signature).
@@ -411,7 +459,7 @@ gmgn-cli track smartmoney [--chain <chain>] [--limit <n>] [--side <side>] [--raw
## order quote
Get a swap quote without submitting a transaction. All supported quote chains use signed auth and require `GMGN_PRIVATE_KEY`.
Get a swap quote without submitting a transaction. Uses normal auth — only `GMGN_API_KEY` is required, no `GMGN_PRIVATE_KEY` needed.
```bash
npx gmgn-cli order quote \
@@ -426,8 +474,8 @@ npx gmgn-cli order quote \
| Option | Required | Description |
|--------|----------|-------------|
| `--chain` | Yes | `sol` / `bsc` / `base` (all require `GMGN_PRIVATE_KEY` for quote) |
| `--from` | Yes | Wallet address (must match API Key binding) |
| `--chain` | Yes | `sol` / `bsc` / `base` |
| `--from` | Yes | Wallet address |
| `--input-token` | Yes | Input token contract address |
| `--output-token` | Yes | Output token contract address |
| `--amount` | Yes | Input amount (smallest unit) |
@@ -749,7 +797,7 @@ gmgn-cli cooking create \
[--fourmeme-rate-conf <json>] \
[--bags-fee-share-list <json>] \
[--bonk-model <model>] \
[--buy-wallets <json>] [--snip-buy-wallets <json>] [--interval-seconds <n>] \
[--buy-wallets <json>] [--snip-buy-wallets <json>] \
[--buy-trade-config <json>] [--sell-trade-config <json>] [--sell-configs <json>] \
[--raw]
```
@@ -795,7 +843,6 @@ gmgn-cli cooking create \
| `--bonk-model` | No | Bonk model identifier (**bonk DEX only**) |
| `--buy-wallets` | No | Multi-wallet buy config as JSON array: `[{"from_address":"<addr>","buy_amt":"<n>"}]` |
| `--snip-buy-wallets` | No | Snipe-buy wallet config as JSON array: `[{"from_address":"<addr>","buy_amt":"<n>"}]` |
| `--interval-seconds` | No | Interval between multi-wallet buys in seconds |
| `--buy-trade-config` | No | Buy-side trade config for CondMarket orders as JSON (TradeParam) |
| `--sell-trade-config` | No | Sell-side trade config for auto-sell / pending_sell as JSON (TradeParam) |
| `--sell-configs` | No | Auto-sell strategy list as JSON array (CookingSellConfig[]): `[{"sell_type":"delay_sell","delay_sec":<n>,"sell_ratio":"0.5","wallet_addresses":["<addr>"]}]` |
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "gmgn-cli",
"version": "1.4.3",
"version": "1.4.7",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "gmgn-cli",
"version": "1.4.3",
"version": "1.4.7",
"license": "MIT",
"dependencies": {
"commander": "^12.1.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "gmgn-cli",
"version": "1.4.3",
"version": "1.4.7",
"description": "GMGN OpenAPI CLI — call GMGN market, token, portfolio and swap APIs from the command line",
"type": "module",
"bin": {
+57 -12
View File
@@ -180,7 +180,6 @@ gmgn-cli cooking stats [--raw]
| `--bonk-model` | No | Bonk model identifier (**bonk DEX only**) |
| `--buy-wallets` | No | Multi-wallet buy config as JSON array: `[{"from_address":"<addr>","buy_amt":"<n>"}]` |
| `--snip-buy-wallets` | No | Snipe-buy wallet config as JSON array: `[{"from_address":"<addr>","buy_amt":"<n>"}]` |
| `--interval-seconds` | No | Interval between multi-wallet buys in seconds |
| `--buy-trade-config` | No | Buy-side trade config for CondMarket orders as JSON (TradeParam) — see Advanced API Fields |
| `--sell-trade-config` | No | Sell-side trade config for auto-sell / pending_sell as JSON (TradeParam) — see Advanced API Fields |
| `--sell-configs` | No | Auto-sell strategy list as JSON array (CookingSellConfig[]) — see Auto-Sell Configuration |
@@ -263,23 +262,25 @@ Example: `--pump-fee-share-list '[{"provider":"twitter","username":"handle","bas
| Field | Type | Required | Description |
|---|---|---|---|
| `beneficiary` | string | Yes | Fee recipient address |
| `tax_rate` | int | Conditional | V5 unified tax rate in bps, e.g. 5% → `500` |
| `buy_tax_rate` | int | Conditional | V6 separate buy tax rate in bps |
| `buy_tax_rate` | int | Conditional | V6 separate buy tax rate in bps, e.g. 1% → `100`. Use together with `sell_tax_rate`. |
| `sell_tax_rate` | int | Conditional | V6 separate sell tax rate in bps |
| `mkt_bps` | int | Yes | Marketing / donation fund share |
| `tax_rate` | int | Conditional | V5 unified tax rate in bps, e.g. 5% → `500`. Use instead of `buy_tax_rate` + `sell_tax_rate`. |
| `mkt_bps` | int | Yes | **Tax recipient share** — the slice of the collected tax routed to the recipient(s): the X handle when `recipient_type = gift`, or the `split_conf` addresses when `recipient_type = split`. This is NOT a generic "marketing" fund. |
| `deflation_bps` | int | Yes | Burn (supply-reduction) share |
| `dividend_bps` | int | Yes | Dividend (holder-reward) share |
| `lp_bps` | int | Yes | Liquidity share |
| `recipient_type` | string | Yes | `gift` (route the recipient share to an X handle) / `split` (route it to specific addresses) |
| `twitter_account` | string | Conditional | X / Twitter handle that receives the recipient share — **required when `recipient_type = gift`**; leave `""` when `split`. |
| `split_conf` | array | Conditional | Recipient address split list — **required when `recipient_type = split`**; leave `[]` when `gift`. |
| `minimum_share_balance` | int | Yes | Min holding to qualify for dividends — minimum **10000** tokens |
| `recipient_type` | string | Yes | `split` (proportional) / `gift` |
| `twitter_account` | string | Yes | Twitter username |
| `split_conf` | array | Yes | Split list — see below |
| `beneficiary` | string | No | Legacy single fee-recipient address. Omit when using `recipient_type` + `twitter_account` / `split_conf`. |
`split_conf` entries: `{ "recipient": "<address>", "bps": <n> }` — all `bps` must sum to **10000**.
> - **Tax distribution:** whenever the tax rate > 0, `mkt_bps + deflation_bps + dividend_bps + lp_bps` must sum to **10000**. `mkt_bps` is the recipient's cut; the other three are burn / dividend / liquidity.
> - **Recipient routing:** set `recipient_type = gift` + `twitter_account` to send the recipient cut to an X handle, OR `recipient_type = split` + `split_conf` to send it to one or more addresses. Fill only the field that matches the chosen mode; leave the other empty (`""` / `[]`).
> - Use `tax_rate` for V5 (unified rate); use `buy_tax_rate` + `sell_tax_rate` for V6 (separate rates).
> - When the tax rate > 0: `mkt_bps + deflation_bps + dividend_bps + lp_bps` must sum to **10000**. When `lp_bps > 0`: `minimum_share_balance` must be > 0.
> - When `lp_bps > 0`: `minimum_share_balance` must be > 0.
### FourMeme (`--dex fourmeme`)
@@ -373,6 +374,8 @@ Token creation is **asynchronous**. If the initial `cooking create` response sho
## Usage Examples
Examples run shortest-first: basic single-launch commands, then full end-to-end configurations. Every JSON flag below is a valid payload shape — copy and adapt.
```bash
# Get token creation statistics per launchpad
gmgn-cli cooking stats
@@ -426,9 +429,7 @@ gmgn-cli cooking create \
--sell-configs '[{"sell_type":"delay_sell","delay_sec":60,"sell_ratio":"0.5","wallet_addresses":["<wallet_address>"]}]'
```
### Full worked examples
These mirror real launch configurations end-to-end. Copy and adapt — every JSON flag below is a valid payload shape.
These mirror real launch configurations end-to-end.
**Pump.fun (SOL) — Bundle + Sniper + Auto-Sell + Agent Auto Buyback**
@@ -477,6 +478,50 @@ gmgn-cli cooking create \
- `--gas-price 1000000000` is wei (1 Gwei).
- In `--fourmeme-rate-conf`, `recipient_rate + burn_rate + divide_rate + liquidity_rate` must sum to **100**.
**Flap (BSC) — `split` mode: route the recipient cut to a BSC address**
```bash
gmgn-cli cooking create \
--chain bsc \
--dex flap \
--from 0x1f8d977b6843e1bbcb306c4a3664c9fb0277979d \
--name "refer" \
--symbol refer \
--buy-amt 2 \
--image-url https://gmgn.ai/external-res-va/11ad7747dcefcfaae87d3f53a4d7330d_v2l.webp \
--website https://www.refercoins.bond/ \
--twitter https://x.com/referdotfun \
--dev-gas 50000000 \
--auto-slippage \
--flap-rate-conf '{"buy_tax_rate":100,"sell_tax_rate":100,"mkt_bps":10000,"deflation_bps":0,"dividend_bps":0,"lp_bps":0,"minimum_share_balance":10000,"recipient_type":"split","twitter_account":"","split_conf":[{"recipient":"0x1f8d977b6843e1bbcb306c4a3664c9fb0277979d","bps":10000}]}'
```
- `recipient_type: split` → the recipient cut goes to `split_conf` addresses; `twitter_account` is left `""`.
- `mkt_bps:10000` means the **entire** tax (1% buy / 1% sell) goes to the recipient — `deflation_bps + dividend_bps + lp_bps` are all `0`, and the four still sum to **10000**.
- `split_conf` has one address taking all `10000` bps (100%). Multiple addresses are allowed as long as their `bps` sum to `10000`.
**Flap (BSC) — `gift` mode: route the recipient cut to an X handle, split the rest across burn / dividend / LP**
```bash
gmgn-cli cooking create \
--chain bsc \
--dex flap \
--from 0x1f8d977b6843e1bbcb306c4a3664c9fb0277979d \
--name "refer" \
--symbol refer \
--buy-amt 2 \
--image-url https://gmgn.ai/external-res-va/11ad7747dcefcfaae87d3f53a4d7330d_v2l.webp \
--website https://www.refercoins.bond/ \
--twitter https://x.com/referdotfun \
--dev-gas 50000000 \
--auto-slippage \
--flap-rate-conf '{"buy_tax_rate":100,"sell_tax_rate":100,"mkt_bps":5000,"deflation_bps":2700,"dividend_bps":1800,"lp_bps":500,"minimum_share_balance":10000,"recipient_type":"gift","twitter_account":"handleName","split_conf":[]}'
```
- `recipient_type: gift` → the recipient cut goes to the `twitter_account` X handle; `split_conf` is left `[]`.
- Tax distribution: `mkt_bps:5000` (50% to the handle) + `deflation_bps:2700` (27% burn) + `dividend_bps:1800` (18% dividend) + `lp_bps:500` (5% LP) = **10000**.
- `lp_bps > 0`, so `minimum_share_balance` must be > 0 (`10000` here).
## Output Format
### Pre-create Confirmation
+21 -11
View File
@@ -86,11 +86,9 @@ When a request returns `429`:
```
Tell the user: *"This is your Ed25519 public key. Go to **https://gmgn.ai/ai**, paste it into the API key creation form, then send me the API Key value shown on the page."*
2. Wait for the user's API key, then configure:
2. Wait for the user's API key, then save it with `gmgn-cli config` (creates `~/.config/gmgn/.env` and sets `chmod 600` automatically — do not hand-edit the file):
```bash
mkdir -p ~/.config/gmgn
echo 'GMGN_API_KEY=<key_from_user>' > ~/.config/gmgn/.env
chmod 600 ~/.config/gmgn/.env
gmgn-cli config set-key <key_from_user>
```
## `market kline` Parameters
@@ -146,7 +144,7 @@ The response is an object with a `list` array. Each element in `list` is one can
| `--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` |
| `--direction <asc\|desc>` | Sort direction (default `desc`) |
| `--filter <tag...>` | Repeatable filter tags (chain-specific). **⚠️ SOL defaults: `renounced frozen`; BSC/Base/ETH defaults: `not_honeypot verified renounced`.** Omitting `--filter` is NOT "no filter" — chain defaults always apply. **sol** tags: `renounced` / `frozen` / `burn` / `token_burnt` / `has_social` / `not_social_dup` / `not_image_dup` / `dexscr_update_link` / `not_wash_trading` / `is_internal_market` / `is_out_market`. **evm** tags: `not_honeypot` / `verified` / `renounced` / `locked` / `token_burnt` / `has_social` / `not_social_dup` / `not_image_dup` / `dexscr_update_link` / `is_internal_market` / `is_out_market` |
| `--platform <name...>` | Repeatable platform filter (chain-specific). **sol**: `Pump.fun` / `pump_mayhem` / `pump_mayhem_agent` / `pump_agent` / `letsbonk` / `bonkers` / `bags` / `memoo` / `liquid` / `bankr` / `zora` / `surge` / `anoncoin` / `moonshot_app` / `wendotdev` / `heaven` / `sugar` / `token_mill` / `believe` / `trendsfun` / `trends_fun` / `jup_studio` / `Moonshot` / `boop` / `xstocks` / `ray_launchpad` / `meteora_virtual_curve` / `pool_ray` / `pool_meteora` / `pool_pump_amm` / `pool_orca`. **bsc**: `fourmeme` / `fourmeme_agent` / `bn_fourmeme` / `flap` / `clanker` / `lunafun` / `pool_uniswap` / `pool_pancake`. **base**: `clanker` / `bankr` / `flaunch` / `zora` / `zora_creator` / `baseapp` / `basememe` / `virtuals_v2` / `klik`. **eth**: no platform filter (omit `--platform` for ETH) |
| `--platform <name...>` | Repeatable platform filter (chain-specific). **sol**: `Pump.fun` / `pump_mayhem` / `pump_mayhem_agent` / `pump_agent` / `letsbonk` / `bonkers` / `bags` / `memoo` / `liquid` / `bankr` / `zora` / `surge` / `anoncoin` / `moonshot_app` / `wendotdev` / `heaven` / `sugar` / `token_mill` / `believe` / `trendsfun` / `trends_fun` / `jup_studio` / `Moonshot` / `boop` / `xstocks` / `ray_launchpad` / `meteora_virtual_curve` / `pool_ray` / `pool_meteora` / `pool_pump_amm` / `pool_orca`. **bsc**: `fourmeme` / `fourmeme_agent` / `bn_fourmeme` / `four_xmode_agent` / `cubepeg` / `likwid` / `goplus_creator` / `goplus_skills` / `openfour` / `flap` / `flap_stocks` / `flap_aioracle` / `clanker` / `lunafun` / `pool_uniswap` / `pool_pancake`. **base**: `clanker` / `bankr` / `flaunch` / `zora` / `zora_creator` / `baseapp` / `basememe` / `virtuals_v2` / `klik`. **eth**: no platform filter (omit `--platform` for ETH) |
## Usage Examples
@@ -242,16 +240,20 @@ gmgn-cli market trending \
--platform fourmeme --platform four_xmode_agent \
--order-by volume --limit 50 --raw
# BSC 5m hottest — fourmeme family, sorted by volume
# BSC 5m hottest — all BSC launchpads, sorted by volume
gmgn-cli market trending \
--chain bsc --interval 5m \
--platform fourmeme --platform fourmeme_agent --platform bn_fourmeme --platform four_xmode_agent \
--platform cubepeg --platform likwid --platform goplus_creator --platform goplus_skills --platform openfour \
--platform flap --platform flap_stocks --platform flap_aioracle --platform clanker --platform lunafun \
--order-by volume --limit 50 --raw
# BSC 1h trending — fourmeme with safety filters
# BSC 1h trending — all BSC launchpads with safety filters
gmgn-cli market trending \
--chain bsc --interval 1h \
--platform fourmeme --platform fourmeme_agent --platform bn_fourmeme --platform four_xmode_agent \
--platform cubepeg --platform likwid --platform goplus_creator --platform goplus_skills --platform openfour \
--platform flap --platform flap_stocks --platform flap_aioracle --platform clanker --platform lunafun \
--filter not_honeypot --filter verified \
--order-by volume --limit 20 --raw
```
@@ -745,25 +747,33 @@ gmgn-cli market trenches --chain sol --raw \
# All three categories at once
gmgn-cli market trenches --chain bsc --raw \
--type new_creation --type near_completion --type completed \
--launchpad-platform fourmeme --launchpad-platform fourmeme_agent --launchpad-platform bn_fourmeme --launchpad-platform four_xmode_agent --launchpad-platform flap --launchpad-platform clanker --launchpad-platform lunafun \
--launchpad-platform fourmeme --launchpad-platform fourmeme_agent --launchpad-platform bn_fourmeme --launchpad-platform four_xmode_agent \
--launchpad-platform cubepeg --launchpad-platform likwid --launchpad-platform goplus_creator --launchpad-platform goplus_skills --launchpad-platform openfour \
--launchpad-platform flap --launchpad-platform flap_stocks --launchpad-platform flap_aioracle --launchpad-platform clanker --launchpad-platform lunafun \
--limit 80
# New creation only
gmgn-cli market trenches --chain bsc --raw \
--type new_creation \
--launchpad-platform fourmeme --launchpad-platform fourmeme_agent --launchpad-platform bn_fourmeme --launchpad-platform four_xmode_agent --launchpad-platform flap --launchpad-platform clanker --launchpad-platform lunafun \
--launchpad-platform fourmeme --launchpad-platform fourmeme_agent --launchpad-platform bn_fourmeme --launchpad-platform four_xmode_agent \
--launchpad-platform cubepeg --launchpad-platform likwid --launchpad-platform goplus_creator --launchpad-platform goplus_skills --launchpad-platform openfour \
--launchpad-platform flap --launchpad-platform flap_stocks --launchpad-platform flap_aioracle --launchpad-platform clanker --launchpad-platform lunafun \
--limit 80
# Near completion only
gmgn-cli market trenches --chain bsc --raw \
--type near_completion \
--launchpad-platform fourmeme --launchpad-platform fourmeme_agent --launchpad-platform bn_fourmeme --launchpad-platform four_xmode_agent --launchpad-platform flap --launchpad-platform clanker --launchpad-platform lunafun \
--launchpad-platform fourmeme --launchpad-platform fourmeme_agent --launchpad-platform bn_fourmeme --launchpad-platform four_xmode_agent \
--launchpad-platform cubepeg --launchpad-platform likwid --launchpad-platform goplus_creator --launchpad-platform goplus_skills --launchpad-platform openfour \
--launchpad-platform flap --launchpad-platform flap_stocks --launchpad-platform flap_aioracle --launchpad-platform clanker --launchpad-platform lunafun \
--limit 80
# Completed (open market) only
gmgn-cli market trenches --chain bsc --raw \
--type completed \
--launchpad-platform fourmeme --launchpad-platform fourmeme_agent --launchpad-platform bn_fourmeme --launchpad-platform four_xmode_agent --launchpad-platform flap --launchpad-platform clanker --launchpad-platform lunafun \
--launchpad-platform fourmeme --launchpad-platform fourmeme_agent --launchpad-platform bn_fourmeme --launchpad-platform four_xmode_agent \
--launchpad-platform cubepeg --launchpad-platform likwid --launchpad-platform goplus_creator --launchpad-platform goplus_skills --launchpad-platform openfour \
--launchpad-platform flap --launchpad-platform flap_stocks --launchpad-platform flap_aioracle --launchpad-platform clanker --launchpad-platform lunafun \
--limit 80
```
+5 -5
View File
@@ -12,7 +12,7 @@ metadata:
**⚠️ IPv6 NOT SUPPORTED: If you get a `401` or `403` error and credentials look correct, check for IPv6 immediately: (1) list all network interfaces and their IPv6 addresses — run `ifconfig | grep inet6` (macOS) or `ip addr show | grep inet6` (Linux); (2) send a test request to `https://ipv6.icanhazip.com` — if the response is an IPv6 address, outbound traffic is going via IPv6. Tell the user immediately: "Please disable IPv6 on your network interface — gmgn-cli commands only work over IPv4."**
Use the `gmgn-cli` tool to submit a token swap or query an existing order. `GMGN_API_KEY` is always required. `GMGN_PRIVATE_KEY` is required for critical-auth commands such as `swap` and all `order` subcommands, including `order quote`.
Use the `gmgn-cli` tool to submit a token swap or query an existing order. `GMGN_API_KEY` is always required. `GMGN_PRIVATE_KEY` is required for critical-auth commands such as `swap` and `order` subcommands — except `order quote`, which only requires `GMGN_API_KEY`.
## Core Concepts
@@ -26,7 +26,7 @@ Use the `gmgn-cli` tool to submit a token swap or query an existing order. `GMGN
- **Anti-MEV** — MEV (Miner/Maximal Extractable Value) refers to frontrunning and sandwich attacks where bots exploit pending transactions. `--anti-mev` routes the transaction through protected channels to reduce this risk. **Recommended: always enable.** Default: on. **Not supported on `base` chain.**
- **Signed auth** — `swap` and all `order` subcommands require both `GMGN_API_KEY` and `GMGN_PRIVATE_KEY`. The private key never leaves the machine — the CLI uses it only for local signing and sends only the resulting signature.
- **Signed auth** — `swap` and most `order` subcommands require both `GMGN_API_KEY` and `GMGN_PRIVATE_KEY`. The private key never leaves the machine — the CLI uses it only for local signing and sends only the resulting signature. Exception: `order quote` only requires `GMGN_API_KEY`.
- **`order_id` / `status`** — After submitting a swap, the response includes an `order_id`. Use `order get --order-id` to poll for final status. Possible values: `pending``processed``confirmed` (success) or `failed` / `expired`. Do not report success until status is `confirmed`.
@@ -47,7 +47,7 @@ Use the `gmgn-cli` tool to submit a token swap or query an existing order. `GMGN
|-------------|-------------|
| `swap` | Submit a token swap |
| `multi-swap` | Submit token swaps across multiple wallets concurrently (up to 100) |
| `order quote` | Get a swap quote (no transaction submitted; requires signed auth) |
| `order quote` | Get a swap quote (no transaction submitted; exist auth — API Key only, no private key needed) |
| `order get` | Query order status |
| `gas-price` | Query recommended gas price (low / average / high tiers) for any chain; exist auth (API Key only) |
| `order strategy create` | Create a limit/strategy order (requires private key) |
@@ -74,7 +74,7 @@ Currency tokens are the base/native assets of each chain. They are used to buy o
## Prerequisites
`GMGN_API_KEY` must be configured in `~/.config/gmgn/.env`. `GMGN_PRIVATE_KEY` is additionally required for `swap` and all `order` subcommands. The private key must correspond to the wallet bound to the API Key.
`GMGN_API_KEY` must be configured in `~/.config/gmgn/.env`. `GMGN_PRIVATE_KEY` is additionally required for `swap` and `order` subcommands other than `order quote`. The private key must correspond to the wallet bound to the API Key.
- `gmgn-cli` installed globally — if missing, run: `npm install -g gmgn-cli`
@@ -433,7 +433,7 @@ The response `data` is an array — one element per wallet:
## `order quote` Usage
Get an estimated output amount before submitting a swap. All supported quote chains use signed auth and require `GMGN_PRIVATE_KEY`.
Get an estimated output amount before submitting a swap. Uses normal auth — only `GMGN_API_KEY` required, no `GMGN_PRIVATE_KEY` needed.
```bash
gmgn-cli order quote \
+80 -3
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. Use when user asks what smart money or KOLs are buying, wants whale alerts, on-chain alpha, or copy-trade signals. (For a specific wallet address, use gmgn-portfolio.)
argument-hint: "<follow-wallet|kol|smartmoney> --chain <sol|bsc|base|eth> [--wallet <wallet_address>]"
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> [--wallet <wallet_address>]"
metadata:
cliHelp: "gmgn-cli track --help"
---
@@ -49,6 +49,8 @@ Use the `gmgn-cli` tool to query on-chain tracking data based on the user's requ
| Sub-command | Description |
|-------------|-------------|
| `track follow-tokens` | Followed token list for a wallet — which tokens a wallet has bookmarked on GMGN, with full market data |
| `track follow-token-groups` | Follow token group names for a wallet — the group names and IDs the wallet uses to organise followed tokens |
| `track follow-wallet` | Trade records from wallets the user personally follows on GMGN |
| `track kol` | Real-time trades from KOL / influencer wallets tagged by GMGN |
| `track smartmoney` | Real-time trades from smart money / whale wallets tagged by GMGN |
@@ -61,7 +63,7 @@ Use the `gmgn-cli` tool to query on-chain tracking data based on the user's requ
- `gmgn-cli` installed globally — if missing, run: `npm install -g gmgn-cli`
- `GMGN_API_KEY` configured in `~/.config/gmgn/.env` — required for all sub-commands
- `GMGN_PRIVATE_KEY` — required for `track follow-wallet` only (signed auth); not needed for `kol` or `smartmoney`
- `GMGN_PRIVATE_KEY` — required for `track follow-wallet` only (signed auth); not needed for `follow-tokens`, `kol`, or `smartmoney`
## Rate Limit Handling
@@ -69,6 +71,8 @@ All tracking routes used by this skill go through GMGN's leaky-bucket limiter wi
| Command | Route | Weight |
|---------|-------|--------|
| `track follow-tokens` | `GET /v1/user/follow_tokens` | 3 |
| `track follow-token-groups` | `GET /v1/user/follow_token_groups` | 1 |
| `track follow-wallet` | `GET /v1/trade/follow_wallet` | 3 |
| `track kol` | `GET /v1/user/kol` | 1 |
| `track smartmoney` | `GET /v1/user/smartmoney` | 1 |
@@ -101,6 +105,18 @@ When a request returns `429`:
## Usage Examples
```bash
# Followed token list for a wallet on SOL
gmgn-cli track follow-tokens --chain sol --wallet <wallet_address>
# Followed token list on BSC, raw JSON output
gmgn-cli track follow-tokens --chain bsc --wallet <wallet_address> --raw
# Follow token group names for a wallet on SOL
gmgn-cli track follow-token-groups --chain sol --wallet <wallet_address>
# Follow token group names, raw JSON output
gmgn-cli track follow-token-groups --chain sol --wallet <wallet_address> --raw
# Follow-wallet trades (all wallets you follow)
gmgn-cli track follow-wallet --chain sol
@@ -126,6 +142,66 @@ gmgn-cli track smartmoney --limit 10 --raw
gmgn-cli track smartmoney --chain sol --side sell --limit 10 --raw
```
## `track follow-tokens` Options
| Option | Description |
|--------|-------------|
| `--chain` | Required. `sol` / `bsc` / `base` / `eth` |
| `--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`) |
| `--order-by <field>` | Sort field: `created_at` / `swaps` / `volume` / `market_cap` / `liquidity` / `price` / `open_timestamp` |
| `--direction <dir>` | Required when `--order-by` is set. `asc` / `desc` |
| `--limit <n>` | Page size |
| `--cursor <cursor>` | Pagination cursor from previous response |
| `--search <text>` | Search by token name or address |
## `track follow-tokens` Response Fields
Top-level fields:
| Field | Description |
|-------|-------------|
| `cursor` | Opaque cursor for fetching the next page |
| `all_following` | Total number of followed tokens |
| `is_recommend` | Whether results include recommended tokens |
| `followings` | Array of followed token objects |
Each item in `followings` contains:
| Field | Description |
|-------|-------------|
| `address` | Token contract address |
| `symbol` | Token ticker symbol |
| `name` | Token name |
| `chain` | Chain the token is on |
| `price` | Current token price |
| `price_change_percent` | Price change percentage |
| `volume` | Trading volume |
| `liquidity` | Pool liquidity |
| `market_cap` | Market cap |
| `swaps` | Total swaps |
| `group_ids` | Follow groups this token belongs to |
| `open_timestamp` | Unix timestamp when trading opened |
## `track follow-token-groups` Options
| Option | Description |
|--------|-------------|
| `--chain` | Required. `sol` / `bsc` / `base` / `eth` |
| `--wallet <address>` | Required. Wallet address to query |
## `track follow-token-groups` Response Fields
`data` is an array. Each item contains:
| Field | Description |
|-------|-------------|
| `chain` | Chain the group is on |
| `group_id` | Group identifier (e.g. `default`, or a user-defined ID) |
| `group_name` | Human-readable group name |
| `rank` | Display order / sort rank |
## `track follow-wallet` Options
| Option | Description |
@@ -311,6 +387,7 @@ To research any token surfaced by smart money activity, follow [`docs/workflow-t
## Notes
- `track follow-tokens` uses exist auth (API Key only); `--wallet` is required
- `track follow-wallet` uses signed auth (API Key + private key signature); `track kol` and `track smartmoney` use exist auth (API Key only)
- `track follow-wallet` returns trades from wallets followed on the GMGN platform; the follow list is resolved automatically from the GMGN user account bound to the API Key — `--wallet` is optional
- Use `--raw` to get single-line JSON for further processing
+18 -3
View File
@@ -6,11 +6,16 @@
* Signed (swap and order routes): X-APIKEY + timestamp + client_id + X-Signature (private key signature)
*/
import { createRequire } from "node:module";
import { buildAuthQuery, buildMessage, detectAlgorithm, sign } from "./signer.js";
const RATE_LIMIT_RETRY_BUFFER_MS = 1000;
const DEFAULT_RATE_LIMIT_AUTO_RETRY_MAX_WAIT_MS = 5000;
const { version: CLI_VERSION } = createRequire(import.meta.url)("../../package.json") as { version: string };
const USER_AGENT = `gmgn-cli/${CLI_VERSION}`;
interface PreparedRequest {
method: string;
subPath: string;
@@ -314,7 +319,6 @@ export interface CreateTokenParams {
// Multi-wallet buy
buy_wallets?: BuyWalletInfo[];
snip_buy_wallets?: BuyWalletInfo[];
interval_seconds?: number;
}
export class OpenApiClient {
@@ -436,6 +440,14 @@ export class OpenApiClient {
return this.authSignedRequest("GET", "/v1/trade/follow_wallet", { chain, ...extra }, null);
}
async getFollowTokens(chain: string, walletAddress: string, extra: Record<string, string | number> = {}): Promise<unknown> {
return this.authExistRequest("GET", "/v1/user/follow_tokens", { chain, wallet_address: walletAddress, ...extra });
}
async getFollowGroupNames(chain: string, walletAddress: string): Promise<unknown> {
return this.authExistRequest("GET", "/v1/user/follow_token_groups", { chain, wallet_address: walletAddress });
}
async getKol(chain?: string, limit?: number): Promise<unknown> {
const query: Record<string, string | number> = {};
if (chain) query["chain"] = chain;
@@ -463,7 +475,7 @@ export class OpenApiClient {
slippage: number
): Promise<unknown> {
const query = { chain, from_address, input_token, output_token, input_amount, slippage };
return this.authSignedRequest("GET", "/v1/trade/quote", query, null);
return this.authExistRequest("GET", "/v1/trade/quote", query);
}
// ---- Swap endpoints (signed auth) ----
@@ -523,6 +535,7 @@ export class OpenApiClient {
const headers: Record<string, string> = {
"X-APIKEY": this.apiKey,
"Content-Type": "application/json",
"User-Agent": USER_AGENT,
};
const bodyStr = body !== null ? JSON.stringify(body) : null;
return {
@@ -558,6 +571,7 @@ export class OpenApiClient {
"X-APIKEY": this.apiKey,
"X-Signature": signature,
"Content-Type": "application/json",
"User-Agent": USER_AGENT,
};
return {
method,
@@ -799,7 +813,8 @@ const TRENCHES_PLATFORMS: Record<string, string[]> = {
],
bsc: [
"fourmeme", "fourmeme_agent", "bn_fourmeme", "four_xmode_agent",
"flap", "clanker", "lunafun",
"cubepeg", "likwid", "goplus_creator", "goplus_skills", "openfour",
"flap", "flap_stocks", "flap_aioracle", "clanker", "lunafun",
],
base: [
"clanker", "bankr", "flaunch", "zora", "zora_creator",
-2
View File
@@ -66,7 +66,6 @@ export function registerCookingCommands(program: Command): void {
// Multi-wallet buy
.option("--buy-wallets <json>", "Multi-wallet buy config as JSON array [{from_address, buy_amt}]")
.option("--snip-buy-wallets <json>", "Snipe-buy wallet config as JSON array [{from_address, buy_amt}]")
.option("--interval-seconds <n>", "Interval between multi-wallet buys in seconds", parseInt)
// CondMarket execution config + auto-sell (JSON)
.option("--buy-trade-config <json>", "Buy-side trade config for CondMarket orders as JSON (TradeParam)")
.option("--sell-trade-config <json>", "Sell-side trade config for auto-sell / pending_sell as JSON (TradeParam)")
@@ -124,7 +123,6 @@ export function registerCookingCommands(program: Command): void {
if (opts.bonkModel) params.bonk_model = opts.bonkModel;
if (opts.buyWallets) params.buy_wallets = JSON.parse(opts.buyWallets);
if (opts.snipBuyWallets) params.snip_buy_wallets = JSON.parse(opts.snipBuyWallets);
if (opts.intervalSeconds != null) params.interval_seconds = opts.intervalSeconds;
if (opts.buyTradeConfig) params.buy_trade_config = JSON.parse(opts.buyTradeConfig);
if (opts.sellTradeConfig) params.sell_trade_config = JSON.parse(opts.sellTradeConfig);
if (opts.sellConfigs) params.sell_configs = JSON.parse(opts.sellConfigs);
+1 -1
View File
@@ -57,7 +57,7 @@ export function registerMarketCommands(program: Command): void {
.option("--order-by <field>", "Sort field: default / volume / swaps / marketcap / holder_count / price / change1h / ... (see docs for full list)")
.option("--direction <dir>", "Sort direction: asc / desc")
.option("--filter <tag...>", "Filter tags, repeatable. sol: renounced / frozen / has_social / not_wash_trading / ... evm: not_honeypot / verified / renounced / locked / ... (see docs for full list)")
.option("--platform <name...>", "Platform filter, repeatable. sol: Pump.fun / letsbonk / moonshot_app / ... bsc: fourmeme / flap / clanker / ... base: clanker / flaunch / zora / ... (see docs for full list)")
.option("--platform <name...>", "Platform filter, repeatable. sol: Pump.fun / letsbonk / moonshot_app / ... bsc: fourmeme / four_xmode_agent / cubepeg / likwid / goplus_creator / goplus_skills / openfour / flap / flap_stocks / flap_aioracle / clanker / ... base: clanker / flaunch / zora / ... (see docs for full list)")
.option("--raw", "Output raw JSON")
.action(async (opts) => {
validateChain(opts.chain);
+3 -3
View File
@@ -149,9 +149,9 @@ export function registerSwapCommands(program: Command): void {
order
.command("quote")
.description("Get a swap quote without submitting a transaction (signed auth — requires GMGN_PRIVATE_KEY)")
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth (requires GMGN_PRIVATE_KEY)")
.requiredOption("--from <address>", "Wallet address (must match API Key binding)")
.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")
.requiredOption("--from <address>", "Wallet address")
.requiredOption("--input-token <address>", "Input token contract address")
.requiredOption("--output-token <address>", "Output token contract address")
.requiredOption("--amount <amount>", "Input amount (smallest unit)")
+41
View File
@@ -7,6 +7,47 @@ import { validateChain } from "../validate.js";
export function registerTrackCommands(program: Command): void {
const track = program.command("track").description("On-chain tracking commands: follow-wallet trades, KOL trades, Smart Money trades");
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")
.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)")
.option("--order-by <field>", "Sort field: created_at / swaps / volume / market_cap / liquidity / price / open_timestamp")
.option("--direction <dir>", "Sort direction: asc / desc")
.option("--limit <n>", "Page size", parseInt)
.option("--cursor <cursor>", "Pagination cursor")
.option("--search <text>", "Search by token name or address")
.option("--raw", "Output raw JSON")
.action(async (opts) => {
validateChain(opts.chain);
const extra: Record<string, string | number> = {};
if (opts.groupId) extra["group_id"] = opts.groupId;
if (opts.interval) extra["interval"] = opts.interval;
if (opts.orderBy) extra["order_by"] = opts.orderBy;
if (opts.direction) extra["direction"] = opts.direction;
if (opts.limit != null) extra["limit"] = opts.limit;
if (opts.cursor) extra["cursor"] = opts.cursor;
if (opts.search) extra["search_text"] = opts.search;
const client = new OpenApiClient(getConfig());
const data = await client.getFollowTokens(opts.chain, opts.wallet, extra).catch(exitOnError);
printResult(data, opts.raw);
});
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")
.requiredOption("--wallet <address>", "Wallet address")
.option("--raw", "Output raw JSON")
.action(async (opts) => {
validateChain(opts.chain);
const client = new OpenApiClient(getConfig());
const data = await client.getFollowGroupNames(opts.chain, opts.wallet).catch(exitOnError);
printResult(data, opts.raw);
});
track
.command("follow-wallet")
.description("Get follow-wallet trade records")