Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

gmgn-cooking — Claude Code skill: token launches

Creates crypto tokens on launchpads through gmgn-cli and retrieves launch statistics. Use it when working with Pump.fun, FourMeme, Bonk, and related platforms.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add GMGNAI/gmgn-skills --skill gmgn-cooking -a claude-code
Open on GitHub

What gmgn-cooking does

This skill creates meme coins and crypto tokens through gmgn-cli, and it can retrieve launch statistics grouped by platform. It supports sol, bsc, base, and robinhood, with fixed --dex identifiers for each launchpad.

Before creation, the skill checks the gmgn-cli configuration. Statistics need GMGN_API_KEY; cooking create also needs GMGN_PRIVATE_KEY in ~/.config/gmgn/.env, matching the wallet bound to the API key. Supply a logo through either --image or --image-url. An initial buy requires --slippage or --auto-slippage.

Creation sends a real irreversible blockchain transaction and spends the initial buy amount. That is a reason to verify --buy-amt before confirmation, because it uses full native-token units. The skill polls the order with gmgn-cli order get and reads the resulting contract address from report.output_token.

What it helps with

  • create a token on a supported launchpad
  • retrieve launch counts by platform
  • check gmgn-cli configuration before an operation
  • provide a token logo by URL or base64
  • track a token creation order until confirmation

Example prompts for the agent

  • “Create a token on `sol` using `pump`, and ask me to confirm the initial buy amount first.”
  • “Get launchpad creation statistics with `cooking stats`.”
  • “Create a token on `bsc` with `fourmeme` and use a logo through `--image-url`.”

How to install gmgn-cooking

1Skills CLI (Vercel)

npx skills add GMGNAI/gmgn-skills --skill gmgn-cooking -a claude-code

2Manually: put the files in place

~/.claude/skills/gmgn-cooking/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gmgn-cooking/

From the same set5

The whole set →

Similar

trader-regime ruvnet The skill asks neural-trader which market regime is running and suggests a strategy type to match. Handy before a backtest or a signal. Claude Code CX Codex Cursor +1 731installs plaid-fintech sickn33 Provides integration patterns for the Plaid API, covering Link tokens, ACH Auth, transaction sync, balance checks, and webhook handling. Claude Code CX Codex Cursor +1 956installs quant-analyst sickn33 A quant skill for the agent: financial models, strategy backtests and risk metrics, built on pandas, numpy and scipy. Claude Code CX Codex Cursor +1 942installs cost-summary ruvnet Extracts a single-shot cost snapshot across models, tiers, and sessions in JSON or markdown. Useful for scripts, bots, and budget tracking. Claude Code CX Codex Cursor +1 683installs cost-conversation ruvnet Groups LLM spending by session, displaying start time, message count, top model, and total cost. Helps evaluate long or expensive conversations. Claude Code CX Codex Cursor +1 682installs cost-export ruvnet Exports cost telemetry into Prometheus textfile or webhook JSON formats for external dashboards like Grafana or Datadog. Claude Code CX Codex Cursor +1 681installs churn-prevention coreyhaines31 A Claude Code skill for subscription churn: an exit survey at cancellation, an offer matched to the stated reason, and recovery of failed payments. Claude Code CX Codex Cursor +1 120,600installs revops coreyhaines31 This skill helps design RevOps workflows for lead stages, scoring, routing, and marketing-to-sales handoffs. Use it when CRM processes need clear rules. Claude Code CX Codex Cursor +1 113,000installs

Questions about gmgn-cooking

How do I install gmgn-cooking in Claude Code?

In Claude Code, run npx skills add GMGNAI/gmgn-skills --skill gmgn-cooking -a claude-code, then run npx skills add GMGNAI/gmgn-skills --skill gmgn-cooking -a claude-code again. The skill file is located at ~/.claude/skills/gmgn-cooking/SKILL.md.

What does gmgn-cooking do?

It creates tokens on supported crypto launchpads through gmgn-cli and retrieves token-creation statistics by platform. Token creation uses a bonding curve launch flow.

What is required to create a token?

You need GMGN_API_KEY and GMGN_PRIVATE_KEY in ~/.config/gmgn/.env. The private key must match the wallet bound to the API key; statistics require only GMGN_API_KEY.

Source text

SKILL.md · MIT
---
name: gmgn-cooking
description: "[FINANCIAL EXECUTION] Create and launch meme coins and crypto tokens on launchpads (Pump.fun, FourMeme, Bonk, BAGS, Flap, Klik, Clanker, etc.) via bonding curve fair launch, or query token creation stats by launchpad via GMGN API. Use when user asks to create a token, launch a meme coin, cook a coin, deploy on a launchpad, or check launchpad creation stats on Solana, BSC, or Base."
argument-hint: "stats | [create --chain <chain> --dex <dex> --from <addr> --name <name> --symbol <sym> --buy-amt <n> (--image <base64> | --image-url <url>)]"
metadata:
  cliHelp: "gmgn-cli cooking --help"
---

**BEFORE RUNNING ANY COMMAND: Run `gmgn-cli config --check`. If exit code is 0, proceed normally. If exit code is 1, (1) run `gmgn-cli config` and show the output to the user; (2) once the user sends the API Key, run `gmgn-cli config --apply <KEY>` to complete configuration and verification, then show the output to the user. If `--check` returns an error (unknown option or command not found), tell the user to run `npm install -g gmgn-cli` to update, then retry.**

**IMPORTANT: Always use `gmgn-cli` commands below. Do NOT use web search, WebFetch, curl, or visit gmgn.ai — all token creation operations must go through the CLI. The CLI handles signing and submission automatically.**

**IMPORTANT: Do NOT guess field names or values. When a field's meaning is unclear, look it up in the Response Fields sections below before using it.**

**⚠️ 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 create a token on a launchpad platform or query token creation statistics per launchpad. **Requires private key** (`GMGN_PRIVATE_KEY` in `.env`) for `cooking create`.

## Core Concepts

- **Bonding curve** — Most launchpad platforms (Pump.fun, FourMeme, Flap, etc.) launch tokens on an internal bonding curve. The token price rises as buyers enter. Once the threshold is reached, the token "graduates" to an open DEX (e.g. Raydium on SOL, PancakeSwap on BSC). Token creation happens on the bonding curve — not the open market.

- **`--buy-amt` is in human units** — `--buy-amt` is expressed in full native token units, not smallest unit. `0.01` = 0.01 SOL. `0.05` = 0.05 BNB. Always confirm the human-readable amount with the user before executing.

- **`--dex` identifiers** — Each launchpad has a fixed identifier passed to `--dex`. These are not free-form names — use only the identifiers listed in the Supported Launchpads table. Never guess a `--dex` value not in that table.

- **Image input** — Token logo can be provided as base64-encoded data (`--image`, max 2MB decoded) or a publicly accessible URL (`--image-url`). Provide one or the other — not both. If the user gives a file path, read and base64-encode it before passing to `--image`. If they give a URL, use `--image-url` directly.

- **Status polling via `order get`** — `cooking create` is asynchronous. The immediate response may show `pending`. Poll with `gmgn-cli order get --chain <chain> --order-id <order_id>` until `confirmed`. The new token's contract address is in the `report.output_token` field of the `order get` response, not in the initial create response.

- **Signed auth** — `cooking create` requires both `GMGN_API_KEY` and `GMGN_PRIVATE_KEY`. The private key never leaves the machine — the CLI uses it only for local signing. `cooking stats` uses exist auth (API Key only).

- **Slippage** — The initial buy is executed as part of the same transaction as token creation. Slippage applies to that buy. Use `--slippage` (integer 0–100, e.g. `30` = 30%) or `--auto-slippage`. One of the two is required when `--buy-amt` is set.

## Financial Risk Notice

**This skill executes REAL, IRREVERSIBLE blockchain transactions.**

- Every `cooking create` command deploys an on-chain token contract and spends real funds (initial buy amount).
- Token deployments cannot be undone once confirmed on-chain.
- Only use this skill with funds you are willing to spend. Initial buy amounts are non-refundable.

## Sub-commands

| Sub-command | Description |
|-------------|-------------|
| `cooking stats` | Get token creation count statistics grouped by launchpad platform (exist auth) |
| `cooking create` | Deploy a new token on a launchpad platform (signed auth) |

## Supported Chains

`sol` / `bsc` / `base` / `robinhood`

## Supported Launchpads by Chain

| Chain       | `--dex` values         | Raise token (`--raised-token`) |
| ----------- | ---------------------- | ------------------------------ |
| `sol`       | `pump`, `bonk`, `bags` | `pump`: `""` (SOL) or `USDC`; `bonk`: `""` (SOL) or `USD1`; `bags`: `""` (SOL only) |
| `bsc`       | `fourmeme`, `flap`     | `fourmeme`: `""` (BNB), `USD1`, `USDT`; `flap`: `""` (BNB only) |
| `base`      | `klik`, `clanker`      | `""` only (quote token fixed to WETH) |
| `robinhood` | `trench`, `pons`       | `""` only (native token) |

When the user names a platform colloquially (e.g. "pump.fun", "four.meme"), map it to the correct `--dex` identifier from this table before running the command.

**Anti-MEV** (`--anti-mev`) is only supported on `sol`. Passing it on `bsc` or `base` will return a 400 error.

### Quote Token conversion (when `--raised-token` is set)

`--buy-amt` is **always in native token units** (SOL / BNB / ETH), even when raising with a quote token like USDC / USD1 / USDT. If the user states the amount in the quote token, convert it to native yourself before passing it:

```
buy_amt_in_native = quote_amount × quote_price / native_price
```

This conversion applies to **`--buy-amt`, and the `buy_amt` field inside `--buy-wallets` and `--snip-buy-wallets`**. It does **not** apply to `--sell-configs` (`check_price` there is always a USD market cap, not a token amount). Round to the chain's native decimals. When `--raised-token` is empty/native, no conversion is needed.

## Prerequisites

- `cooking stats`: Only `GMGN_API_KEY` required
- `cooking create`: Both `GMGN_API_KEY` and `GMGN_PRIVATE_KEY` must be configured in `~/.config/gmgn/.env`. 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`

**IMPORTANT — Credential lookup order:** `gmgn-cli` loads `~/.config/gmgn/.env` first, then overlays any `.env` found in the **current working directory** (project-level overrides global). If credentials appear missing or wrong, check whether a `.env` in the workspace directory is shadowing the global config:
```bash
ls -la .env 2>/dev/null && echo "WARNING: local .env is overriding ~/.config/gmgn/.env"
```
If a local `.env` exists but lacks `GMGN_API_KEY` / `GMGN_PRIVATE_KEY`, either add them to that file or remove it so the global config is used.

## Rate Limit Handling

All cooking routes use GMGN's plan-based leaky bucket: Free `5/5`, Plus `20/20`, Pro `50/50` (rate/capacity). Sustained throughput is roughly `tier rate ÷ weight` requests/second.

| Command | Weight |
|---------|--------|
| `cooking create` | 5 |
| `cooking stats` | 1 |

When a request returns `429`:

- On `RATE_LIMIT_EXCEEDED`, tell the user exactly: `已达到当前套餐的限频上限,点击 https://gmgn.ai/ai?chain=bsc&tab=paid_plans 升级套餐,获得更高速率限制`. Show this upgrade guidance at most once per user task. Do not repeat it for subsequent `RATE_LIMIT_BANNED` responses during the same cooldown.

- Read `X-RateLimit-Reset` from the response headers — Unix timestamp for when the limit resets.
- If the response body contains `reset_at` (e.g., `{"code":429,"error":"RATE_LIMIT_BANNED","message":"...","reset_at":1775184222}`), extract `reset_at` — it is the Unix timestamp when the ban lifts (typically 5 minutes). Convert to local time and tell the user exactly when they can retry.
- `cooking create` is a real transaction: **never loop or auto-resubmit** after a `429`. Wait until the reset time before retrying.
- For `RATE_LIMIT_EXCEEDED` or `RATE_LIMIT_BANNED`, repeated requests during cooldown extend the ban by 5 seconds each time, up to 5 minutes.
- On `RATE_LIMIT_BANNED_MAX`, the ban has hit the 5-minute ceiling because requests kept arriving during the cooldown. Stop **all** GMGN calls for this task (not just the failing one) and tell the user the exact reset time; any request before `reset_at` resets the ban to 5 minutes again.
- On `403 PLAN_UPGRADE_REQUIRED`, the endpoint costs more rate-limit weight than the user's plan capacity, so it can never succeed on this plan — do not retry or wait. Tell the user the endpoint is unavailable on their current plan and show the `upgrade_message` from the response (it contains the upgrade link `https://gmgn.ai/ai?chain=bsc&tab=paid_plans`).

### Credential Model

- `GMGN_PRIVATE_KEY` is used exclusively for **local message signing** — the private key never leaves the machine. The CLI computes an Ed25519 signature in-process and transmits only the base64-encoded result in the `X-Signature` request header.
- `GMGN_API_KEY` is transmitted in the `X-APIKEY` header over HTTPS.
- Neither credential is ever passed as a command-line argument.

## `cooking stats` Usage

```bash
gmgn-cli cooking stats [--raw]
```

### `cooking stats` Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `launchpad` | string | Launchpad identifier (e.g. `pump`, `bonk`, `fourmeme`) |
| `token_count` | int | Number of tokens created via GMGN on that launchpad |

## `cooking create` Parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `--chain` | Yes | Chain: `sol` / `bsc` / `base` / `robinhood` |
| `--dex` | Yes | Launchpad platform identifier — see Supported Launchpads table. Never guess this value. |
| `--from` | Yes | Wallet address (must match API Key binding) |
| `--name` | Yes | Token full name (e.g. `Doge Killer`). Max 100 chars; rejected if it contains control characters or prompt-injection framing. |
| `--symbol` | Yes | Token ticker symbol (e.g. `DOGEK`). Max 100 chars; rejected if it contains control characters or prompt-injection framing. |
| `--buy-amt` | Yes | Initial buy amount in **human-readable native token units** (e.g. `0.01` = 0.01 SOL). This is NOT in smallest unit. |
| `--image` | No* | Token logo as **base64-encoded** data (max 2MB decoded). Mutually exclusive with `--image-url`. One of the two is required. |
| `--image-url` | No* | Token logo as a publicly accessible URL. Mutually exclusive with `--image`. One of the two is required. |
| `--slippage` | No* | Slippage tolerance as an integer 0–100, e.g. `30` = 30%. **Mutually exclusive with `--auto-slippage`** — provide one or the other. |
| `--auto-slippage` | No* | Enable automatic slippage. **Mutually exclusive with `--slippage`.** |
| `--description` | No | Token description / project pitch. Max 500 chars; rejected if it contains control characters or prompt-injection framing. |
| `--website` | No | Project website URL. Must be a valid `http(s)` URL. |
| `--twitter` | No | Twitter / X URL. Must be a valid `http(s)` URL. |
| `--telegram` | No | Telegram group URL. Must be a valid `http(s)` URL. |
| `--fee` | No | Base gas / fee |
| `--priority-fee` | No | Priority fee in SOL (**SOL only**) |
| `--tip-fee` | No | Tip fee (SOL in SOL / BSC in BNB; ignored on BASE) |
| `--gas-price` | No | Gas price in wei (EVM chains: BSC / BASE) |
| `--max-fee-per-gas` | No | Max fee per gas in wei (**EVM only**) |
| `--max-priority-fee-per-gas` | No | Max priority fee per gas in wei (**EVM only**) |
| `--anti-mev` | No | Enable anti-MEV protection (**SOL only**; rejected on BSC / BASE) |
| `--anti-mev-mode` | No | Anti-MEV mode: `off` / `normal` / `secure` (**SOL only**) |
| `--raised-token` | No | Raise token symbol. `pump`: `USDC`; `bonk`: `USD1`; `fourmeme`: `USDT` / `USD1`; omit or `""` for native |
| `--dev-wallet-bps` | No | Dev wallet fee share in basis points (100 = 1%) |
| `--dev-gas` | No | Dev gas amount |
| `--dev-priority` | No | Dev priority fee |
| `--dev-tip` | No | Dev tip fee |
| `--dev-max-fee-per-gas` | No | Dev tx feeCap in wei (**EVM EIP-1559**) |
| `--approve-vision` | No | Approve vision version: `v1` / `v2` (default: `v2`) |
| `--source` | No | Traffic source identifier |
| `--is-mayhem` | No | Enable Mayhem mode (**Pump.fun only**) |
| `--is-cashback` | No | Enable Cashback (**Pump.fun only**) |
| `--is-buy-back` | No | Enable Agent Auto Buyback (**Pump.fun only**) |
| `--pump-fee-share-list` | No | Pump.fun fee share list as JSON array: `[{"provider":"twitter","username":"<handle>","basic_points":<n>}]` (**Pump.fun only**) |
| `--flap-rate-conf` | No | Flap rate config as JSON object (**Flap only**) |
| `--fourmeme-rate-conf` | No | FourMeme rate config as JSON object (**FourMeme only**) |
| `--bags-fee-share-list` | No | BAGS fee share list as JSON array: `[{"provider":"twitter","username":"<handle>","basic_points":<n>}]` (**BAGS only**) |
| `--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>"}]` |
| `--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 |

\* `--image` or `--image-url`: provide exactly one. `--slippage` or `--auto-slippage`: provide exactly one.

## Advanced API Fields

The structured flags (`--pump-fee-share-list`, `--bags-fee-share-list`, `--flap-rate-conf`, `--fourmeme-rate-conf`, `--buy-wallets`, `--snip-buy-wallets`, `--buy-trade-config`, `--sell-trade-config`, `--sell-configs`) each accept a **JSON string**. This section documents the exact JSON schema for each.

### Platform capability matrix

Which advanced features each platform supports. Do not send a field a platform does not support.

| Platform | `--dex` | Chain | Platform-specific fields | Bundle (`--buy-wallets`) | Sniper (`--snip-buy-wallets`) | Cashback | Mayhem |
|---|---|---|---|---|---|---|---|
| Pump.fun | `pump` | SOL | `--pump-fee-share-list` / `--dev-wallet-bps` / `--is-buy-back` | ✅ up to 12 wallets | ✅ up to 10 | ✅ | ✅ |
| Bonk | `bonk` | SOL | `--bonk-model` | ❌ | ✅ up to 10 | ❌ | ❌ |
| BAGS | `bags` | SOL | `--bags-fee-share-list` / `--dev-wallet-bps` | ❌ | ✅ up to 10 | ❌ | ❌ |
| FourMeme | `fourmeme` | BSC | `--fourmeme-rate-conf` | ✅ up to 3 wallets | ✅ up to 10 | ❌ | ❌ |
| Flap | `flap` | BSC | `--flap-rate-conf` | ❌ | ✅ up to 10 | ❌ | ❌ |
| Klik | `klik` | Base | — | ❌ | ✅ up to 10 | ❌ | ❌ |
| Clanker | `clanker` | Base | — | ❌ | ✅ up to 10 | ❌ | ❌ |

- `--is-cashback` / `--is-mayhem` are **Pump.fun only** — other platforms reject them.
- Bundle/auto-sell (`--sell-configs`) and sniper (`--snip-buy-wallets`) are available where the matrix shows ✅.

**Basis-points rule:** any field named `*_bps` / `basic_points` is in basis points (`100` = 1%). Where a section says the shares must sum, all entries must add up to exactly **10000** (FourMeme uses whole percents summing to **100** instead — see below).

**Always talk to the user in percentages, never basis points.** When asking for or confirming any share, fee, or split, phrase it as a percentage (e.g. *"What % goes to this wallet?"* → user says `"50%"`). Convert to the field's unit yourself when building the JSON — never ask the user for a raw bps number:

| User says | `*_bps` field (×100) | FourMeme `*_rate` field (×1) |
|---|---|---|
| `5%` | `500` | `5` |
| `50%` | `5000` | `50` |
| `100%` | `10000` | `100` |

Never set a fee-share split without the user's explicit instruction — it permanently routes token revenue to the listed accounts.

### Pump.fun (`--dex pump`)

> `is_mayhem`, `is_cashback`, `is_buy_back` use their matching CLI flags (`--is-mayhem`, `--is-cashback`, `--is-buy-back`). `pump_fee_share_list` is passed via `--pump-fee-share-list`.

| Field | CLI flag | Description |
|---|---|---|
| `pump_fee_share_list` | `--pump-fee-share-list <json>` | Fee-share list — see JSON schema below |
| `is_buy_back` | `--is-buy-back` | Enable Agent Auto Buyback |

**JSON schema for `--pump-fee-share-list`** — array of objects:

| Field | Type | Required | Description |
|---|---|---|---|
| `provider` | string | Yes | `solana` / `twitter` / `github` |
| `username` | string | Yes | Platform username; a SOL address when `provider` = `solana` |
| `basic_points` | int | Yes | Share in bps — all entries must sum to **10000** |

Example: `--pump-fee-share-list '[{"provider":"twitter","username":"handle","basic_points":10000}]'`

### Bonk (`--dex bonk`)

`dev_wallet_bps` → `--dev-wallet-bps`, `bonk_model` → `--bonk-model`. No additional structured fields.

### BAGS (`--dex bags`)

`dev_wallet_bps` → `--dev-wallet-bps`. `bags_fee_share_list` is passed via `--bags-fee-share-list`.

**JSON schema for `--bags-fee-share-list`** — array of objects:

| Field | Type | Required | Description |
|---|---|---|---|
| `provider` | string | Yes | `twitter` / `solana` / `kick` / `github` |
| `username` | string | Yes | Platform username |
| `basic_points` | int | Yes | Share in bps — combined with `dev_wallet_bps`, all must sum to **10000** |

### Flap (`--dex flap`)

`flap_rate_conf` is passed via `--flap-rate-conf`.

**JSON schema for `--flap-rate-conf`** — single object:

| Field | Type | Required | Description |
|---|---|---|---|
| `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 |
| `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 |
| `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 `lp_bps > 0`: `minimum_share_balance` must be > 0.

### FourMeme (`--dex fourmeme`)

`fourmeme_rate_conf` is passed via `--fourmeme-rate-conf`.

> `fourmeme_user_login_sign`, `is_approve_allowance`, `is_raised_swap` are broker/jobs **internal** fields — the public API does not accept them, so there is no flag. The multi-quote raise-token retry is handled server-side automatically (poll `order get`); the caller never sets these.

**JSON schema for `--fourmeme-rate-conf`** — single object:

| Field | Type | Required | Description |
|---|---|---|---|
| `fee_plan` | bool | No | Enable the fee plan |
| `recipient_address` | string | Yes | Fee recipient address |
| `fee_rate` | int | Yes | Fee rate, e.g. 5% → `5` (whole percent, not bps) |
| `burn_rate` | int | Yes | Burn share |
| `divide_rate` | int | Yes | Dividend share |
| `liquidity_rate` | int | Yes | Liquidity share |
| `recipient_rate` | int | Yes | Recipient share |
| `min_sharing` | int | Yes | Minimum sharing threshold |

> When `fee_rate > 0`: `burn_rate + divide_rate + liquidity_rate + recipient_rate` must sum to **100**. When `recipient_rate > 0`: `min_sharing` must be > 0.

## Auto-Sell Configuration

`sell_configs` is passed via `--sell-configs` as a JSON array. It schedules conditional sell orders to execute automatically once the token launch succeeds. Omit entirely for a standard launch with no auto-sell.

`--sell-configs` is a JSON array of `CookingSellConfig` objects:

| Field | Type | Required | Description |
|---|---|---|---|
| `sell_type` | string | Yes | `delay_sell` / `limit_order` |
| `delay_sec` | int64 | Conditional | Seconds after buy to trigger; required when `sell_type = delay_sell` |
| `delay_mili_sec` | int64 | No | Milliseconds after buy to trigger; takes precedence over `delay_sec` |
| `sell_ratio` | string | Yes | Fraction to sell — `"1"` = 100%, `"0.5"` = 50% |
| `check_price` | string | Conditional | Market cap in USD to trigger sell; required when `sell_type = limit_order` |
| `wallet_addresses` | []string | Yes | Wallets this strategy applies to (empty array = inert) |

Example: `--sell-configs '[{"sell_type":"delay_sell","delay_sec":60,"sell_ratio":"0.5","wallet_addresses":["<addr>"]}]'`

The buy/sell execution params for these CondMarket orders (slippage, fees, anti-MEV) can be tuned separately via `--buy-trade-config` / `--sell-trade-config` (TradeParam JSON). They do **not** affect the main creation tx, and fall back to the outer-level transaction flags when omitted.

> - **`check_price` is total market cap in USD** — e.g. `"50000"` triggers at a $50,000 market cap.
> - `wallet_addresses` may mix `from_address` and `buy_wallets` entries. The server creates `signal_cooking` for snipe wallets and `pending_sell` for main/bundle wallets automatically.
> - A wallet can carry multiple strategies (e.g. delay-sell 50%, then limit-sell the rest); each applies independently.

### TradeParam (`--buy-trade-config` / `--sell-trade-config`)

These tune the **execution params for the CondMarket buy/sell orders** (bundle buys, sniper buys, and auto-sell). They do **not** affect the main creation transaction (the dev tx uses the outer-level `--dev-*` flags). When omitted, they fall back to the outer-level transaction flags.

`--buy-trade-config` / `--sell-trade-config` each accept a single JSON object:

| Field | Type | Description |
|---|---|---|
| `slippage` | number | Slippage; only sent when truthy |
| `fee` | string | Base gas / fee; only sent when truthy |
| `priority_fee` | string | Priority fee; only sent when truthy |
| `tip_fee` | string | SOL Jito tip; only sent when truthy |
| `gas_price` | string | Gas price in wei (EVM); only sent when truthy |
| `max_priority_fee_per_gas` | string | EVM EIP-1559; only sent when truthy |
| `max_fee_per_gas` | string | EVM EIP-1559; only sent when truthy |
| `auto_slippage` | bool | Always sent |
| `is_anti_mev` | bool | Always sent |
| `anti_mev_mode` | string | `off` / `normal` / `secure`; always sent |

Example: `--buy-trade-config '{"slippage":50,"auto_slippage":false,"priority_fee":"0.0005","tip_fee":"0.0001","is_anti_mev":true,"anti_mev_mode":"secure"}'`

> A standard launch with no `buyConfig` sends `{"is_anti_mev":false,"anti_mev_mode":"off"}` and an empty `buy_wallets` list.

## `cooking create` Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `status` | string | `pending` / `confirmed` / `failed` |
| `hash` | string | Transaction hash (may be empty while `pending`) |
| `order_id` | string | Order ID — pass to `gmgn-cli order get` to poll for final status |
| `error_code` | string | Error code on failure |
| `error_status` | string | Error description on failure |

## Status Polling

Token creation is **asynchronous**. If the initial `cooking create` response shows `status: pending`:

1. Poll with `gmgn-cli order get` every **2 seconds**, up to **30 seconds**:
   ```bash
   gmgn-cli order get --chain <chain> --order-id <order_id>
   ```
2. The new token's contract / mint address is in the **`report.output_token`** field of the `order get` response (only present when `state = 30` and `status = "successful"`) — it is NOT returned by `cooking create` directly.
3. Stop polling once `status` is `confirmed`, `failed`, or `expired`.
4. On `confirmed`: display `output_token` as the token address and include the block explorer link.
5. On `failed` / `expired`: report the `error_status` and do not retry automatically.

## 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

# Create a token on Pump.fun (SOL) — with URL image
gmgn-cli cooking create \
  --chain sol \
  --dex pump \
  --from <wallet_address> \
  --name "My Token" \
  --symbol MAT \
  --buy-amt 0.01 \
  --image-url https://example.com/logo.png \
  --slippage 30 \
  --priority-fee 0.001

# Create a token on FourMeme (BSC) — base64 image + USD1 raise token
gmgn-cli cooking create \
  --chain bsc \
  --dex fourmeme \
  --from <wallet_address> \
  --name "Four Token" \
  --symbol FOUR \
  --buy-amt 0.05 \
  --image "$(base64 -i /path/to/logo.png)" \
  --auto-slippage \
  --raised-token USD1

# Create a token on Bonk (SOL) with anti-MEV
gmgn-cli cooking create \
  --chain sol \
  --dex bonk \
  --from <wallet_address> \
  --name "Bonk Token" \
  --symbol BNKT \
  --buy-amt 0.01 \
  --image-url https://example.com/logo.png \
  --auto-slippage \
  --anti-mev

# Create on Pump.fun with auto-sell: sell 50% 60s after buy
gmgn-cli cooking create \
  --chain sol \
  --dex pump \
  --from <wallet_address> \
  --name "My Token" \
  --symbol MAT \
  --buy-amt 0.01 \
  --image-url https://example.com/logo.png \
  --auto-slippage \
  --sell-configs '[{"sell_type":"delay_sell","delay_sec":60,"sell_ratio":"0.5","wallet_addresses":["<wallet_address>"]}]'
```

These mirror real launch configurations end-to-end.

**Pump.fun (SOL) — Bundle + Sniper + Auto-Sell + Agent Auto Buyback**

```bash
gmgn-cli cooking create \
  --chain sol \
  --dex pump \
  --from DevWallet... \
  --name "Demo Coin" \
  --symbol DEMO \
  --buy-amt 0.5 \
  --image-url https://cdn.example.com/coin.png \
  --twitter https://x.com/handle/status/123 \
  --priority-fee 0.0005 \
  --tip-fee 0.0001 \
  --is-buy-back \
  --buy-trade-config '{"slippage":50,"auto_slippage":false,"priority_fee":"0.0005","tip_fee":"0.0001","is_anti_mev":true,"anti_mev_mode":"secure"}' \
  --buy-wallets '[{"from_address":"Wallet1...","buy_amt":"0.1"},{"from_address":"Wallet2...","buy_amt":"0.1"}]' \
  --snip-buy-wallets '[{"from_address":"Sniper1...","buy_amt":"0.05"}]' \
  --sell-configs '[{"sell_type":"delay_sell","sell_ratio":"1","wallet_addresses":["Wallet1..."],"delay_mili_sec":5000}]'
```

- `--is-buy-back` is the Agent Auto Buyback mode (the backend also sets the agent fee internally).
- `buy_amt` values in `--buy-wallets` / `--snip-buy-wallets` are in native SOL.
- Bundle wallets ≤ 12, sniper wallets ≤ 10 on Pump.fun (see capability matrix).

**FourMeme (BSC) — user fee split + raise token USDT**

```bash
gmgn-cli cooking create \
  --chain bsc \
  --dex fourmeme \
  --from 0xDev... \
  --name "Demo BSC" \
  --symbol DBSC \
  --buy-amt 0.0123 \
  --image-url https://cdn.example.com/coin.png \
  --raised-token USDT \
  --website https://demo.com \
  --gas-price 1000000000 \
  --auto-slippage \
  --fourmeme-rate-conf '{"fee_rate":1,"recipient_rate":50,"burn_rate":20,"divide_rate":20,"liquidity_rate":10,"min_sharing":100000,"recipient_address":"0xDev..."}'
```

- `--buy-amt 0.0123` is **already converted to native BNB** from the USDT amount the user wanted (see Quote Token conversion). Do the conversion before building the command.
- `--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":"0x1f8d977b6843e1bbcb306c4a3664c9fb0...

© GMGNAI · MIT · GMGNAI/gmgn-skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor