gmgn-portfolio
Original:🇺🇸 English
Translated
Query GMGN wallet portfolio — API Key wallet info, holdings, transaction activity, trading stats, and token balance. Supports sol / bsc / base.
2installs
Sourcegmgnai/gmgn-skills
Added on
NPX Install
npx skill4agent add gmgnai/gmgn-skills gmgn-portfolioTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Use the tool to query wallet portfolio data based on the user's request.
gmgn-cliSub-commands
| Sub-command | Description |
|---|---|
| Wallets and main currency balances bound to the API Key |
| Wallet token holdings with P&L |
| Transaction history |
| Trading statistics (supports batch) |
| Token balance for a specific token |
Supported Chains
solbscbasePrerequisites
- file with
.envsetGMGN_API_KEY - Run from the directory where your file is located, or set
.envin your environmentGMGN_HOST
Usage Examples
bash
# API Key wallet info (no --chain or --wallet needed)
npx gmgn-cli portfolio info
# Wallet holdings (default sort)
npx gmgn-cli portfolio holdings --chain sol --wallet <wallet_address>
# Holdings sorted by USD value, descending
npx gmgn-cli portfolio holdings \
--chain sol --wallet <wallet_address> \
--order-by usd_value --direction desc --limit 20
# Include sold-out positions
npx gmgn-cli portfolio holdings --chain sol --wallet <wallet_address> --sell-out
# Transaction activity
npx gmgn-cli portfolio activity --chain sol --wallet <wallet_address>
# Activity filtered by type
npx gmgn-cli portfolio activity --chain sol --wallet <wallet_address> \
--type buy --type sell
# Activity for a specific token
npx gmgn-cli portfolio activity --chain sol --wallet <wallet_address> \
--token <token_address>
# Trading stats (default 7d)
npx gmgn-cli portfolio stats --chain sol --wallet <wallet_address>
# Trading stats for 30 days
npx gmgn-cli portfolio stats --chain sol --wallet <wallet_address> --period 30d
# Batch stats for multiple wallets
npx gmgn-cli portfolio stats --chain sol \
--wallet <wallet_1> --wallet <wallet_2>
# Token balance
npx gmgn-cli portfolio token-balance \
--chain sol --wallet <wallet_address> --token <token_address>Holdings Options
| Option | Description |
|---|---|
| Page size (default |
| Pagination cursor |
| Sort field: |
| Sort direction (default |
| Include sold-out positions |
| Include small-value positions |
| Hide abnormal positions |
| Hide airdrop positions |
| Hide closed positions |
| Hide open positions |
Activity Options
| Option | Description |
|---|---|
| Filter by token |
| Page size |
| Pagination cursor |
| Repeatable: |
Stats Options
| Option | Description |
|---|---|
| Stats period: |
Notes
- All portfolio commands use normal auth (API Key only, no signature required)
- supports multiple
portfolio statsflags for batch queries--wallet - Use to get single-line JSON for further processing
--raw