gmgn-portfolio by gmgnai/gmgn-skills
npx skills add https://github.com/gmgnai/gmgn-skills --skill gmgn-portfolio使用 gmgn-cli 工具根据用户请求查询钱包投资组合数据。
| 子命令 | 描述 |
|---|---|
portfolio info | 与 API Key 绑定的钱包及主货币余额 |
portfolio holdings | 包含盈亏的钱包代币持仓 |
portfolio activity | 交易历史记录 |
portfolio stats | 交易统计(支持批量) |
portfolio token-balance |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 特定代币的余额 |
sol / bsc / base
GMGN_API_KEY 的 .env 文件.env 文件的目录运行,或在环境中设置 GMGN_HOSTgmgn-cli:npm install -g gmgn-cli@1.0.1# API Key 钱包信息(无需 --chain 或 --wallet)
gmgn-cli portfolio info
# 钱包持仓(默认排序)
gmgn-cli portfolio holdings --chain sol --wallet <wallet_address>
# 按美元价值降序排序的持仓
gmgn-cli portfolio holdings \
--chain sol --wallet <wallet_address> \
--order-by usd_value --direction desc --limit 20
# 包含已清仓的持仓
gmgn-cli portfolio holdings --chain sol --wallet <wallet_address> --sell-out
# 交易活动
gmgn-cli portfolio activity --chain sol --wallet <wallet_address>
# 按类型筛选的交易活动
gmgn-cli portfolio activity --chain sol --wallet <wallet_address> \
--type buy --type sell
# 特定代币的交易活动
gmgn-cli portfolio activity --chain sol --wallet <wallet_address> \
--token <token_address>
# 交易统计(默认 7 天)
gmgn-cli portfolio stats --chain sol --wallet <wallet_address>
# 30 天的交易统计
gmgn-cli portfolio stats --chain sol --wallet <wallet_address> --period 30d
# 多个钱包的批量统计
gmgn-cli portfolio stats --chain sol \
--wallet <wallet_1> --wallet <wallet_2>
# 代币余额
gmgn-cli portfolio token-balance \
--chain sol --wallet <wallet_address> --token <token_address>
| 选项 | 描述 |
|---|---|
--limit <n> | 每页大小(默认 20,最大 50) |
--cursor <cursor> | 分页游标 |
--order-by <field> | 排序字段:usd_value / last_active_timestamp / realized_profit / unrealized_profit / total_profit / history_bought_cost / history_sold_income(默认 usd_value) |
| `--direction <asc | desc>` |
--sell-out | 包含已清仓的持仓 |
--show-small | 包含小额持仓 |
--hide-abnormal | 隐藏异常持仓 |
--hide-airdrop | 隐藏空投持仓 |
--hide-closed | 隐藏已关闭持仓 |
--hide-open | 隐藏开放持仓 |
| 选项 | 描述 |
|---|---|
--token <address> | 按代币筛选 |
--limit <n> | 每页大小 |
--cursor <cursor> | 分页游标(传入先前响应中的 next 值) |
--type <type> | 可重复:buy / sell / add / remove / transfer |
活动响应中包含一个 next 字段。将其传递给 --cursor 以获取下一页。
| 选项 | 描述 |
|---|---|
--period <period> | 统计周期:7d / 30d(默认 7d) |
portfolio stats 支持多个 --wallet 标志以进行批量查询--raw 获取单行 JSON 以便进一步处理0x + 40 位十六进制数字)。如果输入无效,CLI 将报错退出。每周安装次数
367
代码仓库
GitHub 星标数
29
首次出现
10 天前
安全审计
安装于
codex363
opencode361
gemini-cli359
github-copilot358
kimi-cli358
amp358
Use the gmgn-cli tool to query wallet portfolio data based on the user's request.
| 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 token-balance | Token balance for a specific token |
sol / bsc / base
.env file with GMGN_API_KEY set.env file is located, or set GMGN_HOST in your environmentgmgn-cli installed globally: npm install -g gmgn-cli@1.0.1# API Key wallet info (no --chain or --wallet needed)
gmgn-cli portfolio info
# Wallet holdings (default sort)
gmgn-cli portfolio holdings --chain sol --wallet <wallet_address>
# Holdings sorted by USD value, descending
gmgn-cli portfolio holdings \
--chain sol --wallet <wallet_address> \
--order-by usd_value --direction desc --limit 20
# Include sold-out positions
gmgn-cli portfolio holdings --chain sol --wallet <wallet_address> --sell-out
# Transaction activity
gmgn-cli portfolio activity --chain sol --wallet <wallet_address>
# Activity filtered by type
gmgn-cli portfolio activity --chain sol --wallet <wallet_address> \
--type buy --type sell
# Activity for a specific token
gmgn-cli portfolio activity --chain sol --wallet <wallet_address> \
--token <token_address>
# Trading stats (default 7d)
gmgn-cli portfolio stats --chain sol --wallet <wallet_address>
# Trading stats for 30 days
gmgn-cli portfolio stats --chain sol --wallet <wallet_address> --period 30d
# Batch stats for multiple wallets
gmgn-cli portfolio stats --chain sol \
--wallet <wallet_1> --wallet <wallet_2>
# Token balance
gmgn-cli portfolio token-balance \
--chain sol --wallet <wallet_address> --token <token_address>
| Option | Description |
|---|---|
--limit <n> | Page size (default 20, max 50) |
--cursor <cursor> | Pagination cursor |
--order-by <field> | Sort field: usd_value / last_active_timestamp / realized_profit / unrealized_profit / / / (default ) |
| Option | Description |
|---|---|
--token <address> | Filter by token |
--limit <n> | Page size |
--cursor <cursor> | Pagination cursor (pass the next value from the previous response) |
--type <type> | Repeatable: buy / sell / add / / |
The activity response includes a next field. Pass it to --cursor to fetch the next page.
| Option | Description |
|---|---|
--period <period> | Stats period: 7d / 30d (default 7d) |
portfolio stats supports multiple --wallet flags for batch queries--raw to get single-line JSON for further processing0x + 40 hex digits). The CLI exits with an error on invalid input.Weekly Installs
367
Repository
GitHub Stars
29
First Seen
10 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex363
opencode361
gemini-cli359
github-copilot358
kimi-cli358
amp358
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
68,100 周安装
total_profithistory_bought_costhistory_sold_incomeusd_value| `--direction <asc | desc>` |
--sell-out | Include sold-out positions |
--show-small | Include small-value positions |
--hide-abnormal | Hide abnormal positions |
--hide-airdrop | Hide airdrop positions |
--hide-closed | Hide closed positions |
--hide-open | Hide open positions |
removetransfer