diff --git a/Readme.md b/Readme.md index 1881d02..15c18ce 100644 --- a/Readme.md +++ b/Readme.md @@ -99,7 +99,7 @@ No more scraping web pages or getting blocked by Cloudflare. Query all the profe Ready to install? [Jump to Installation →](#1-installation) -Already installed? [Upgrade Skills and CLI →](#9-upgrade-skills-and-cli) +Already installed? [Upgrade Skills and CLI →](#10-upgrade-skills-and-cli) > **Tip:** If your AI agent tries to open or scrape the gmgn.ai website instead of using the CLI, add this to your prompt: `Use gmgn-cli commands. Do not call gmgn.ai web endpoints directly.` @@ -176,9 +176,10 @@ If output appears without error, setup is complete. ## Upgrade (AI Agent) -> Run this command to upgrade both the CLI and Skills to the latest version. +> Run these two commands to upgrade both the CLI and Skills to the latest version. ```bash +npm install -g gmgn-cli npx skills add GMGNAI/gmgn-skills ``` @@ -188,7 +189,7 @@ Check the installed version after upgrading: gmgn-cli --version ``` -> For the full upgrade reference, see [Section 9 — Upgrade Skills and CLI](#9-upgrade-skills-and-cli). +> For the full upgrade reference, see [Section 9 — Upgrade Skills and CLI](#10-upgrade-skills-and-cli). --- @@ -373,12 +374,23 @@ Natural language prompts you can send to any AI assistant with gmgn-cli skills i ``` buy 0.1 SOL of sell 50% of on BSC +sell 30% of my position +get a quote: how much can I get for 1 SOL? check order status is safe to buy on solana? show top holders of +show smart money holdings of , sorted by buy volume +show recent KOL trades for show my wallet holdings on SOL query token details for 0x1234... +show 24h K-line and volume for show trading stats for wallet on BSC +show recent trades for wallet +which wallets are linked to my API key, and what are their balances +show the latest smart money trades on SOL +show what KOLs are buying on SOL +show newly launched tokens on Solana +show Solana 1-minute trending tokens ``` ### Typical Workflows @@ -428,26 +440,26 @@ Full parameter reference: [docs/cli-usage.md](docs/cli-usage.md). All commands s ### Token ```bash -npx gmgn-cli token info --chain sol --address +gmgn-cli token info --chain sol --address ``` ### Market ```bash -npx gmgn-cli market trending \ +gmgn-cli market trending \ --chain sol \ --interval 1h \ --order-by volume --limit 20 \ --filter not_risk --filter not_honeypot -npx gmgn-cli market trenches \ +gmgn-cli market trenches \ --chain sol \ --type new_creation --type near_completion --type completed \ --launchpad-platform Pump.fun --launchpad-platform pump_mayhem --launchpad-platform letsbonk \ --limit 80 # With server-side filters: safe preset + require smart money + sort by smart degen count -npx gmgn-cli market trenches \ +gmgn-cli market trenches \ --chain sol --type new_creation \ --filter-preset safe --min-smart-degen-count 1 --sort-by smart_degen_count ``` @@ -455,30 +467,43 @@ npx gmgn-cli market trenches \ ### Portfolio ```bash -npx gmgn-cli portfolio holdings --chain sol --wallet +# Holdings +gmgn-cli portfolio holdings --chain sol --wallet + +# Activity +gmgn-cli portfolio activity --chain sol --wallet + +# Stats (supports multiple wallets) +gmgn-cli portfolio stats --chain sol --wallet --wallet + +# Wallets and balances linked to API key +gmgn-cli portfolio info + +# Single token balance +gmgn-cli portfolio token-balance --chain sol --wallet --token ``` ### Track ```bash # Follow-wallet trade records (requires GMGN_PRIVATE_KEY) -npx gmgn-cli track follow-wallet --chain sol -npx gmgn-cli track follow-wallet --chain sol --wallet --side buy +gmgn-cli track follow-wallet --chain sol +gmgn-cli track follow-wallet --chain sol --wallet --side buy # KOL trade records -npx gmgn-cli track kol --limit 100 --raw -npx gmgn-cli track kol --chain sol --side buy --limit 50 --raw +gmgn-cli track kol --limit 100 --raw +gmgn-cli track kol --chain sol --side buy --limit 50 --raw # Smart Money trade records -npx gmgn-cli track smartmoney --limit 100 --raw -npx gmgn-cli track smartmoney --chain sol --side sell --limit 50 --raw +gmgn-cli track smartmoney --limit 100 --raw +gmgn-cli track smartmoney --chain sol --side sell --limit 50 --raw ``` ### Swap (requires private key) ```bash # Submit swap with fixed slippage -npx gmgn-cli swap \ +gmgn-cli swap \ --chain sol \ --from \ --input-token \ @@ -487,7 +512,7 @@ npx gmgn-cli swap \ --slippage 0.01 # Submit swap with automatic slippage -npx gmgn-cli swap \ +gmgn-cli swap \ --chain sol \ --from \ --input-token \ @@ -495,11 +520,29 @@ npx gmgn-cli swap \ --amount 1000000 \ --auto-slippage +# Sell by position percentage (e.g. sell 50%) +gmgn-cli swap \ + --chain sol \ + --from \ + --input-token \ + --output-token \ + --percent 50 \ + --auto-slippage + +# Get quote (no transaction submitted) +gmgn-cli order quote \ + --chain sol \ + --from \ + --input-token \ + --output-token \ + --amount 1000000 \ + --slippage 0.01 + # Query order -npx gmgn-cli order get --chain sol --order-id +gmgn-cli order get --chain sol --order-id ``` -## 8. Supported Chains +## 9. Supported Chains | Commands | Chains | Chain Currencies | |----------|--------|-----------------| @@ -508,10 +551,13 @@ npx gmgn-cli order get --chain sol --order-id --- -## 9. Upgrade Skills and CLI +## 10. Upgrade Skills and CLI ```bash -# Upgrade CLI and Skills +# Upgrade CLI +npm install -g gmgn-cli + +# Upgrade Skills npx skills add GMGNAI/gmgn-skills # Check current version @@ -522,7 +568,7 @@ gmgn-cli --version --- -## 10. Security & Disclaimer (Read Before Use) +## 11. Security & Disclaimer (Read Before Use) This tool can be invoked by an AI Agent to submit real on-chain transactions automatically. It carries inherent risks including model hallucination, uncontrolled execution, and prompt injection. Once authorized, the AI Agent will submit transactions on behalf of your linked wallet address — **on-chain transactions are irreversible once confirmed** and may result in financial loss. Use with caution. diff --git a/Readme.zh.md b/Readme.zh.md index 27e564b..25f2f83 100644 --- a/Readme.zh.md +++ b/Readme.zh.md @@ -102,7 +102,7 @@ SOL / BSC / Base 多链数据每次查询均为实时,支持多参数个性化 已准备好?[点击这里开始安装 Skills →](#开始安装-skills) -已安装?[升级 Skills 和 CLI →](#9-升级-skills-和-cli) +已安装?[升级 Skills 和 CLI →](#10-升级-skills-和-cli) > **提示:** 如果你的 AI Agent 尝试直接打开 gmgn.ai 网站而不是使用 CLI,请在提示词中加上: > ``` @@ -182,9 +182,10 @@ gmgn-cli market trending --chain sol --interval 1h --limit 3 ## AI Agent 升级 -> 运行以下命令,将 CLI 和 Skills 同时升级到最新版本。 +> 运行以下两条命令,将 CLI 和 Skills 同时升级到最新版本。 ```bash +npm install -g gmgn-cli npx skills add GMGNAI/gmgn-skills ``` @@ -194,7 +195,7 @@ npx skills add GMGNAI/gmgn-skills gmgn-cli --version ``` -> 完整升级说明请参阅[第 9 节 — 升级 Skills 和 CLI](#9-升级-skills-和-cli)。 +> 完整升级说明请参阅[第 10 节 — 升级 Skills 和 CLI](#10-升级-skills-和-cli)。 --- @@ -223,15 +224,6 @@ gmgn-cli --version --- -## 开始安装 Skills - -安装前,请先在 **https://gmgn.ai/ai** 创建 API Key,用于: - -1. 读取数据:代币、榜单、K 线、特色数据指标 -2. 提交交易:市价立即交易、创建限价单、策略单等 - ---- - ## 1. 安装 选择以下任意一种方式 @@ -260,20 +252,10 @@ node dist/index.js [options] ## 2. 验证连通性 -### 方式一:通过 AI Agent 验证 - -发送以下提示词给你的 AI Agent: - -``` -执行这个cli命令:GMGN_API_KEY=gmgn_solbscbaseethmonadtron npx gmgn-cli market trending --chain sol --interval 1h --limit 3 -``` - -### 方式二:通过 CLI 验证 - 使用公共 API Key 测试,无需注册: ```bash -GMGN_API_KEY=gmgn_solbscbaseethmonadtron npx gmgn-cli market trending --chain sol --interval 1h --limit 3 +GMGN_API_KEY=gmgn_solbscbaseethmonadtron gmgn-cli market trending --chain sol --interval 1h --limit 3 ``` 看到 JSON 输出即表示 CLI 正常工作。公共 Key 支持所有只读接口(token / market / portfolio),公共 Key 仅用于测试,正式使用任何接口均需申请个人 API Key(见第 3 步)。 @@ -592,7 +574,7 @@ gmgn-cli order quote \ gmgn-cli order get --chain sol --order-id ``` -## 8. 支持的链 +## 9. 支持的链 | 接口类型 | 支持的链 | 链原生货币 | |----------|----------|-----------| @@ -601,7 +583,7 @@ gmgn-cli order get --chain sol --order-id --- -## 9. 升级 Skills 和 CLI +## 10. 升级 Skills 和 CLI 将 `gmgn-cli` 和 Skills 升级到最新版本: @@ -633,7 +615,7 @@ gmgn-cli --version --- -## 10. 安全与免责(使用前必读) +## 11. 安全与免责(使用前必读) 本工具可供 AI Agent 调用以自动执行链上交易,存在模型幻觉、执行不可控、提示词注入等固有风险。AI Agent 在获得授权后,将以您绑定的钱包地址提交真实的链上交易,**交易一经上链即不可撤销**,可能导致资金损失,请您谨慎使用。