Skip to content

/gmgn-portfolio

Analyze one or many crypto wallets by address — holdings, batch 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,

From plugin
gmgn-cli
73019 skills

Claude Code

$ npx -y skills add gmgnai/gmgn-skills --skill gmgn-portfolio --agent claude-code

SKILL.md

gmgn-portfolio.SKILL.md
name: gmgn-portfolio
description: Analyze one or many crypto wallets by address — holdings, batch 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 wallet holdings, P&L (including comparing up to 100 wallets), 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|profits|token-balance|created-tokens> [--chain <sol|bsc|base|eth|arbitrum|hyperevm|robinhood|arc|stable|avalanche|elysium>] [--wallet <wallet_address...>]"
metadata:
  cliHelp: "gmgn-cli portfolio --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 to fetch this data — the website requires login and will not return structured data. The CLI is the only correct method.**

**⚠️ 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 query wallet portfolio data based on the user's request.

**For full wallet analysis (holdings + stats + activity + verdict), follow [`docs/workflow-wallet-analysis.md`](../../docs/workflow-wallet-analysis.md)**

Core Concepts

  • **`realized_profit` vs `unrealized_profit`** — `realized_profit` = profit locked in from completed sells (cash in hand). `unrealized_profit` = paper gains on positions still held, calculated at current price. These are separate numbers — do not add them unless answering "total P&L including open positions."
  • **`profit_change`** — A multiplier ratio, not a dollar amount. `1.5` = +150% return. `0` = break-even. `-0.5` = -50% loss. Computed as `total_profit / cost`. Do not display this as a raw decimal — convert to percentage for user-facing output.
  • **`pnl`** — Profit/loss ratio from `portfolio stats`: `realized_profit / total_cost`. Same multiplier format as `profit_change`. A `pnl` of `2.0` means the wallet doubled its money on completed trades over the period.
  • **`winrate`** — Ratio of profitable trades over the period (0–1). `0.6` = 60% of trades were profitable. Does not reflect the size of wins vs losses — a wallet can have high winrate but net negative if losses are large.
  • **`cost` vs `usd_value`** — In holdings: `cost` is the historical amount spent buying this token (your cost basis); `usd_value` is the current market value of the position. The difference is unrealized P&L.
  • **`history_bought_cost` vs `cost`** — `history_bought_cost` is the all-time cumulative spend on this token (including positions already sold). `cost` is the cost basis of the current open position only.
  • **Pagination (`cursor`)** — Activity results are paginated. The response includes a `next` field; pass it as `--cursor` to fetch the next page. An empty or missing `next` means you are on the last page.

Sub-commands

| Sub-command | Description | |-------------|-------------| | `portfolio info` | Wallets and main currency balances bound to the API Key | | `portfolio holdings` | Wallet token holdings with P&L | | `portfolio activity` | Transaction history | | `portfolio stats` | Trading statistics (supports batch) | | `portfolio profits` | Batch wallet P&L for 1–100 wallets | | `portfolio token-balance` | Token balance for a specific token | | `portfolio created-tokens` | Tokens created by a developer wallet, with market cap and ATH info |

Supported Chains

`sol` / `bsc` / `base` / `eth` / `arbitrum` / `hyperevm` / `robinhood` / `arc` / `stable` / `avalanche` / `elysium`

Prerequisites

  • `gmgn-cli` installed globally — if missing, run: `npm install -g gmgn-cli`
  • `GMGN_API_KEY` configured in `~/.config/gmgn/.env`

Rate Limit Handling

All portfolio routes used by this skill 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, and the max burst is roughly `floor(tier capacity ÷ weight)`.

**Critical auth** (`GMGN_API_KEY` + `GMGN_PRIVATE_KEY` required):

| Command | Route | Weight | |---------|-------|--------| | `portfolio holdings` | `GET /v1/user/wallet_holdings` | 2 |

**Exist auth** (`GMGN_API_KEY` only):

| Command | Route | Weight | |---------|-------|--------| | `portfolio info` | `GET /v1/user/info` | 2 | | `portfolio activity` | `GET /v1/user/wallet_activity` | 3 | | `portfolio stats` | `GET /v1/user/wallet_stats` | 3 | | `portfolio profits` | `POST /v1/user/wallet_profits` | 3 | | `portfolio token-balance` | `GET /v1/user/wallet_token_balance` | 2 | | `portfolio created-tokens` | `GET /v1/user/created_tokens` | 2 |

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
Read more
@gmgnai
Ships withgmgn-cli

GMGN OpenAPI skills for AI Agent — query tokens, wallets, and market data, and execute on-chain trades across Solana, BSC, and Base.

Stars on GitHub

Momentum

stars in total
730
Star history of gmgnai/gmgn-skills on GitHub, a chart by star-history.com

Other skills on gmgn-cli.

gmgn-callout-score
Auto-invoked

gmgn-callout-score

Decide whether to act on a caller's (喊单人) calls. Scores one call-out wallet on two axes — SELECTION (do the coins he calls…

@gmgnai@gmgnaiInstall Skill
gmgn-callout
Auto-invoked

gmgn-callout

Read GMGN call-outs (喊单) — public token calls that wallets publish on GMGN, with call price, call market cap, multiplier since…

@gmgnai@gmgnaiInstall Skill
gmgn-contract-dd
Auto-invoked

gmgn-contract-dd

Contract due-diligence score for one token address — contract safety, holder structure and price action combined into a single…

@gmgnai@gmgnaiInstall Skill
gmgn-cooking
Auto-invoked

gmgn-cooking

[FINANCIAL EXECUTION] Create and launch meme coins and crypto tokens on launchpads (Pump.fun, FourMeme, Bonk, BAGS, Flap, Klik,…

@gmgnai@gmgnaiInstall Skill
gmgn-dev-score
Auto-invoked

gmgn-dev-score

Decide whether a token creator's NEXT launch is safe to buy. Scores a dev address 0-100 on two separate axes — CONDUCT (will he…

@gmgnai@gmgnaiInstall Skill
gmgn-heat-rank
Auto-invoked

gmgn-heat-rank

Produce THE list of tokens that are hot RIGHT NOW and safe enough to look at, across every chain GMGN supports, scored 0-100 and…

@gmgnai@gmgnaiInstall Skill

More skills from other plugins.

ccxt-cli

ccxt-cli

CCXT command-line interface (ccxt-cli) for interacting with 100+ cryptocurrency exchanges directly from the terminal — no code…

ccxt2w45k
@ccxt@ccxtInstall Skill

Questions about gmgn-portfolio.

Which coding agents can use gmgn-portfolio?
gmgn-portfolio installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.