forgex-cli 1.0.58 → 1.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +375 -368
- package/dist/bin/forgex.d.ts +5 -5
- package/dist/bin/forgex.js +14 -14
- package/dist/bin/forgex.js.map +1 -1
- package/dist/src/adapters/codex-adapter.d.ts +90 -90
- package/dist/src/adapters/codex-adapter.d.ts.map +1 -1
- package/dist/src/adapters/codex-adapter.js +76 -76
- package/dist/src/adapters/codex-adapter.js.map +1 -1
- package/dist/src/adapters/connection.d.ts +6 -6
- package/dist/src/adapters/connection.js +8 -8
- package/dist/src/adapters/connection.js.map +1 -1
- package/dist/src/adapters/ipfs.d.ts +3 -3
- package/dist/src/adapters/ipfs.js +3 -3
- package/dist/src/adapters/jito-adapter.d.ts +85 -85
- package/dist/src/adapters/jito-adapter.d.ts.map +1 -1
- package/dist/src/adapters/jito-adapter.js +111 -111
- package/dist/src/adapters/jito-adapter.js.map +1 -1
- package/dist/src/adapters/rpc-adapter.d.ts +53 -53
- package/dist/src/adapters/rpc-adapter.d.ts.map +1 -1
- package/dist/src/adapters/rpc-adapter.js +69 -69
- package/dist/src/adapters/rpc-adapter.js.map +1 -1
- package/dist/src/adapters/sdk-adapter.d.ts +21 -21
- package/dist/src/adapters/sdk-adapter.d.ts.map +1 -1
- package/dist/src/adapters/sdk-adapter.js +79 -79
- package/dist/src/adapters/sdk-adapter.js.map +1 -1
- package/dist/src/commands/config/index.d.ts +1 -1
- package/dist/src/commands/config/index.js +15 -15
- package/dist/src/commands/config/index.js.map +1 -1
- package/dist/src/commands/query/index.d.ts +2 -2
- package/dist/src/commands/query/index.js +82 -82
- package/dist/src/commands/query/index.js.map +1 -1
- package/dist/src/commands/token/index.d.ts +8 -8
- package/dist/src/commands/token/index.js +73 -73
- package/dist/src/commands/token/index.js.map +1 -1
- package/dist/src/commands/tools/index.d.ts +9 -9
- package/dist/src/commands/tools/index.js +137 -137
- package/dist/src/commands/tools/index.js.map +1 -1
- package/dist/src/commands/trade/index.d.ts +2 -2
- package/dist/src/commands/trade/index.js +82 -82
- package/dist/src/commands/trade/index.js.map +1 -1
- package/dist/src/commands/transfer/index.d.ts +8 -8
- package/dist/src/commands/transfer/index.js +106 -106
- package/dist/src/commands/transfer/index.js.map +1 -1
- package/dist/src/commands/wallet/index.d.ts +1 -1
- package/dist/src/commands/wallet/index.js +175 -175
- package/dist/src/commands/wallet/index.js.map +1 -1
- package/dist/src/config.d.ts +26 -26
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +28 -28
- package/dist/src/config.js.map +1 -1
- package/dist/src/const/index.js +1 -1
- package/dist/src/const/index.js.map +1 -1
- package/dist/src/data-source.d.ts +81 -81
- package/dist/src/data-source.d.ts.map +1 -1
- package/dist/src/data-source.js +149 -149
- package/dist/src/data-source.js.map +1 -1
- package/dist/src/data-store/index.d.ts +22 -22
- package/dist/src/data-store/index.d.ts.map +1 -1
- package/dist/src/data-store/index.js +46 -46
- package/dist/src/data-store/index.js.map +1 -1
- package/dist/src/data-store/types.d.ts +3 -3
- package/dist/src/data-store/types.js +3 -3
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.js +10 -10
- package/dist/src/index.js.map +1 -1
- package/dist/src/output.d.ts +18 -18
- package/dist/src/output.d.ts.map +1 -1
- package/dist/src/output.js +34 -34
- package/dist/src/output.js.map +1 -1
- package/dist/src/shims/store.d.ts +3 -2
- package/dist/src/shims/store.d.ts.map +1 -1
- package/dist/src/shims/store.js +6 -5
- package/dist/src/shims/store.js.map +1 -1
- package/dist/src/sol-sdk/batch/create.d.ts +4 -1
- package/dist/src/sol-sdk/batch/create.d.ts.map +1 -1
- package/dist/src/sol-sdk/batch/create.js +44 -44
- package/dist/src/sol-sdk/batch/create.js.map +1 -1
- package/dist/src/sol-sdk/batch/index.js +135 -135
- package/dist/src/sol-sdk/batch/index.js.map +1 -1
- package/dist/src/sol-sdk/calc.d.ts +63 -63
- package/dist/src/sol-sdk/calc.d.ts.map +1 -1
- package/dist/src/sol-sdk/calc.js +120 -120
- package/dist/src/sol-sdk/calc.js.map +1 -1
- package/dist/src/sol-sdk/jito/index.js +12 -12
- package/dist/src/sol-sdk/jito/index.js.map +1 -1
- package/dist/src/sol-sdk/launchlab/instructions/create.js +10 -10
- package/dist/src/sol-sdk/launchlab/instructions/create.js.map +1 -1
- package/dist/src/sol-sdk/meteora/index.d.ts +5 -5
- package/dist/src/sol-sdk/meteora/index.js +11 -11
- package/dist/src/sol-sdk/meteora/index.js.map +1 -1
- package/dist/src/sol-sdk/meteora/instructions/buy.js +8 -8
- package/dist/src/sol-sdk/meteora/instructions/buy.js.map +1 -1
- package/dist/src/sol-sdk/meteora/instructions/sell.js +6 -6
- package/dist/src/sol-sdk/meteora/instructions/sell.js.map +1 -1
- package/dist/src/sol-sdk/pump/index.js +3 -3
- package/dist/src/sol-sdk/pump/index.js.map +1 -1
- package/dist/src/sol-sdk/pump/instructions/buy.d.ts +12 -12
- package/dist/src/sol-sdk/pump/instructions/buy.d.ts.map +1 -1
- package/dist/src/sol-sdk/pump/instructions/buy.js +26 -26
- package/dist/src/sol-sdk/pump/instructions/buy.js.map +1 -1
- package/dist/src/sol-sdk/pump/instructions/createAndBuy.d.ts +13 -13
- package/dist/src/sol-sdk/pump/instructions/createAndBuy.js +17 -17
- package/dist/src/sol-sdk/pump/instructions/createAndBuy.js.map +1 -1
- package/dist/src/sol-sdk/pump/instructions/sell.d.ts +2 -2
- package/dist/src/sol-sdk/pump/instructions/sell.d.ts.map +1 -1
- package/dist/src/sol-sdk/pump/instructions/sell.js +7 -7
- package/dist/src/sol-sdk/pump/instructions/sell.js.map +1 -1
- package/dist/src/sol-sdk/pumpswap/index.d.ts +4 -4
- package/dist/src/sol-sdk/pumpswap/index.js +5 -5
- package/dist/src/sol-sdk/pumpswap/index.js.map +1 -1
- package/dist/src/sol-sdk/pumpswap/instructions/buy.d.ts +8 -8
- package/dist/src/sol-sdk/pumpswap/instructions/buy.js +19 -19
- package/dist/src/sol-sdk/pumpswap/instructions/buy.js.map +1 -1
- package/dist/src/sol-sdk/pumpswap/instructions/migrate.js +2 -2
- package/dist/src/sol-sdk/pumpswap/instructions/migrate.js.map +1 -1
- package/dist/src/sol-sdk/pumpswap/instructions/sell.js +4 -4
- package/dist/src/sol-sdk/pumpswap/instructions/sell.js.map +1 -1
- package/dist/src/sol-sdk/pumpswap/rpc/index.js +1 -1
- package/dist/src/sol-sdk/pumpswap/rpc/index.js.map +1 -1
- package/dist/src/sol-sdk/raydium/instructions/cpmmSell.js +3 -3
- package/dist/src/sol-sdk/raydium/instructions/cpmmSell.js.map +1 -1
- package/dist/src/sol-sdk/raydium/instructions/sell.d.ts +40 -8520
- package/dist/src/sol-sdk/raydium/instructions/sell.d.ts.map +1 -1
- package/dist/src/sol-sdk/raydium/instructions/sell.js +6 -6
- package/dist/src/sol-sdk/raydium/instructions/sell.js.map +1 -1
- package/dist/src/sol-sdk/raydium/rpc/index.d.ts +4 -4
- package/dist/src/sol-sdk/rpc/index.d.ts +14 -14
- package/dist/src/sol-sdk/rpc/index.d.ts.map +1 -1
- package/dist/src/sol-sdk/rpc/index.js +17 -17
- package/dist/src/sol-sdk/rpc/index.js.map +1 -1
- package/dist/src/sol-sdk/transfer/index.js +5 -5
- package/dist/src/sol-sdk/transfer/index.js.map +1 -1
- package/dist/src/sol-sdk/turnover/index.d.ts +3 -3
- package/dist/src/sol-sdk/turnover/index.js +56 -56
- package/dist/src/sol-sdk/turnover/index.js.map +1 -1
- package/dist/src/telemetry.d.ts +8 -8
- package/dist/src/telemetry.d.ts.map +1 -1
- package/dist/src/telemetry.js +28 -27
- package/dist/src/telemetry.js.map +1 -1
- package/dist/src/tx-tracker/detail-adapter.d.ts +53 -53
- package/dist/src/tx-tracker/detail-adapter.d.ts.map +1 -1
- package/dist/src/tx-tracker/detail-adapter.js +68 -68
- package/dist/src/tx-tracker/detail-adapter.js.map +1 -1
- package/dist/src/tx-tracker/index.d.ts +67 -67
- package/dist/src/tx-tracker/index.d.ts.map +1 -1
- package/dist/src/tx-tracker/index.js +103 -103
- package/dist/src/tx-tracker/index.js.map +1 -1
- package/dist/src/types/index.d.ts +10 -10
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/websocket.js +1 -1
- package/dist/src/types/websocket.js.map +1 -1
- package/dist/src/utils/index.js +20 -20
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/wallet-store.d.ts +51 -51
- package/dist/src/wallet-store.d.ts.map +1 -1
- package/dist/src/wallet-store.js +104 -104
- package/dist/src/wallet-store.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,513 +1,520 @@
|
|
|
1
1
|
# ForgeX CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### Launch tokens. Bundle buy. Manage wallets — Just talk to your agent.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
On-chain market making, from a single command line to your OpenClaw agent.<br/>No programming required.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- **多钱包组管理** -- 创建/删除钱包组,批量生成钱包,靓号地址生成(自定义后缀/前缀),CSV/JSON 导入导出,AES 加密存储私钥
|
|
10
|
-
- **批量交易** -- 多钱包同时买入/卖出,支持百分比卖出、全部卖出、狙击买入
|
|
11
|
-
- **专业做市工具** -- 换手交易(Jito Bundle 零滑点)、刷量工具(5 种模式)、价格机器人(自动拉升/砸盘)
|
|
12
|
-
- **多 DEX 支持** -- Pump.fun、PumpSwap、Raydium V4/CPMM、LaunchLab
|
|
13
|
-
- **Jito MEV 保护** -- 交易捆绑发送,防止夹子攻击
|
|
14
|
-
- **代币创建** -- 支持 Pump.fun / LaunchLab 发币,IPFS 元数据上传,开盘狙击
|
|
15
|
-
- **链上查询** -- 余额、价格、K 线、交易记录、持仓监控
|
|
16
|
-
- **批量转账** -- 收集(多对一)、分发(一对多)、多对多转账
|
|
17
|
-
- **交易追踪** -- 自动追踪交易结果,持久化持仓和盈亏数据
|
|
18
|
-
- **灵活输出** -- 支持 JSON / Table / Minimal 三种输出格式
|
|
7
|
+
---
|
|
19
8
|
|
|
20
|
-
|
|
9
|
+
⛓️ Supported Platforms
|
|
21
10
|
|
|
22
|
-
|
|
11
|
+
[](https://sonic.game) [](https://solana.com) [](https://pump.fun) [](https://jito.wtf) [](https://openclaw.ai)
|
|
23
12
|
|
|
24
|
-
|
|
25
|
-
- npm
|
|
26
|
-
- solana-keygen(仅靓号生成功能需要,可选)
|
|
13
|
+
---
|
|
27
14
|
|
|
28
|
-
|
|
15
|
+
[](https://www.npmjs.com/package/forgex-cli) [](LICENSE) [](https://github.com) [](https://jito.wtf) [](.) [](https://sonic.game) [](https://openclaw.ai) [](.)
|
|
29
16
|
|
|
30
|
-
|
|
31
|
-
cd cli
|
|
32
|
-
npm install
|
|
33
|
-
npm run build
|
|
34
|
-
```
|
|
17
|
+
---
|
|
35
18
|
|
|
36
|
-
|
|
19
|
+
[Overview](#why-forgex) · [Quick Start](#quick-start-5-minutes) · [Configure](#config--configuration) · [Command Reference](#command-reference) · [Examples](#workflow-examples)
|
|
37
20
|
|
|
38
|
-
|
|
39
|
-
# 开发模式(tsx 直接运行 TypeScript)
|
|
40
|
-
npm run dev -- <command>
|
|
21
|
+
---
|
|
41
22
|
|
|
42
|
-
|
|
43
|
-
node dist/bin/forgex.js <command>
|
|
23
|
+
---
|
|
44
24
|
|
|
45
|
-
|
|
46
|
-
npm link
|
|
47
|
-
forgex <command>
|
|
48
|
-
```
|
|
25
|
+
## Why ForgeX?
|
|
49
26
|
|
|
50
|
-
|
|
27
|
+
Most on-chain workflows on Solana are painful:
|
|
51
28
|
|
|
52
|
-
|
|
29
|
+
- **Too many manual steps.** Copy-pasting addresses, switching tabs, signing transaction after transaction — every extra step is a chance to make a costly mistake.
|
|
30
|
+
- **Repetitive confirmations waste hours.** Manually confirming the same operations over and over drains time that should go toward strategy, not execution.
|
|
31
|
+
- **Complex tools lock out non-developers.** If you're not writing custom scripts, most market making tooling is simply inaccessible.
|
|
53
32
|
|
|
54
|
-
|
|
55
|
-
# 创建默认配置文件 (~/.forgex/config.json)
|
|
56
|
-
forgex config init
|
|
33
|
+
ForgeX packages the full workflow into a clean CLI. One command at a time.
|
|
57
34
|
|
|
58
|
-
|
|
59
|
-
forgex config set rpcUrl https://your-rpc-url.com
|
|
35
|
+
---
|
|
60
36
|
|
|
61
|
-
|
|
62
|
-
forgex config set codexApiKey your-codex-api-key
|
|
37
|
+
## Install
|
|
63
38
|
|
|
64
|
-
|
|
65
|
-
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g forgex-cli
|
|
66
41
|
```
|
|
67
42
|
|
|
68
|
-
|
|
43
|
+
Requires Node.js >= 22.14.0.
|
|
44
|
+
|
|
45
|
+
Verify installation:
|
|
69
46
|
|
|
70
47
|
```bash
|
|
71
|
-
|
|
72
|
-
|
|
48
|
+
forgex --version
|
|
49
|
+
```
|
|
73
50
|
|
|
74
|
-
|
|
75
|
-
forgex wallet generate --group 1 --count 5
|
|
51
|
+
---
|
|
76
52
|
|
|
77
|
-
|
|
78
|
-
forgex wallet group-info --id 1
|
|
53
|
+
## Quick Start (5 minutes)
|
|
79
54
|
|
|
80
|
-
|
|
81
|
-
|
|
55
|
+
### Step 1 — Initialize config
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
forgex config init --rpc-url "https://your-rpc-endpoint.com" --network mainnet
|
|
82
59
|
```
|
|
83
60
|
|
|
84
|
-
###
|
|
61
|
+
### Step 2 — Create a wallet group
|
|
85
62
|
|
|
86
63
|
```bash
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
# 模拟分发(不实际执行,检查余额是否充足)
|
|
91
|
-
forgex transfer out --from <主钱包地址> --to-group 1 --value 0.1 --dry-run
|
|
64
|
+
forgex wallet create-group --name "my-group"
|
|
65
|
+
# Returns groupId — note it for subsequent commands
|
|
92
66
|
```
|
|
93
67
|
|
|
94
|
-
###
|
|
68
|
+
### Step 3 — Generate wallets
|
|
95
69
|
|
|
96
70
|
```bash
|
|
97
|
-
|
|
98
|
-
|
|
71
|
+
forgex --password "your-password" wallet generate --group 1 --count 10
|
|
72
|
+
```
|
|
99
73
|
|
|
100
|
-
|
|
101
|
-
forgex trade sell --group 1 --token <代币CA> --amount all
|
|
74
|
+
### Step 4 — Fund your wallets
|
|
102
75
|
|
|
103
|
-
|
|
104
|
-
forgex trade sell --group 1 --token <代币CA> --amount 50%
|
|
76
|
+
Distribute SOL from a source wallet to the group:
|
|
105
77
|
|
|
78
|
+
```bash
|
|
79
|
+
forgex --password "your-password" transfer out \
|
|
80
|
+
--from "YourSourceWalletAddress" \
|
|
81
|
+
--to-group 1 \
|
|
82
|
+
--value 0.1
|
|
106
83
|
```
|
|
107
84
|
|
|
108
|
-
### 5
|
|
85
|
+
### Step 5 — Launch a token
|
|
109
86
|
|
|
110
87
|
```bash
|
|
111
|
-
|
|
112
|
-
|
|
88
|
+
forgex --password "your-password" token create \
|
|
89
|
+
--dex pump \
|
|
90
|
+
--name "MyToken" \
|
|
91
|
+
--symbol "MYT" \
|
|
92
|
+
--image ./logo.png \
|
|
93
|
+
--dev-wallet 1 \
|
|
94
|
+
--dev-buy 0.5 \
|
|
95
|
+
--dry-run # remove --dry-run when ready to go live
|
|
96
|
+
```
|
|
113
97
|
|
|
114
|
-
|
|
115
|
-
forgex tools turnover --from-group 1 --to-group 2 --token <代币CA>
|
|
98
|
+
### Step 6 — Start the volume bot
|
|
116
99
|
|
|
117
|
-
|
|
118
|
-
forgex
|
|
100
|
+
```bash
|
|
101
|
+
forgex --password "your-password" tools volume \
|
|
102
|
+
--group 1 \
|
|
103
|
+
--token "TOKEN_MINT_ADDRESS" \
|
|
104
|
+
--mode 1b1s \
|
|
105
|
+
--amount 0.01 \
|
|
106
|
+
--rounds 20 \
|
|
107
|
+
--interval 10000
|
|
119
108
|
```
|
|
120
109
|
|
|
121
|
-
|
|
110
|
+
> **Tip:** Always run with `--dry-run` first to simulate the operation before executing on-chain.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Command Reference
|
|
115
|
+
|
|
116
|
+
All commands accept `--format json|table|minimal` (default: `json`).
|
|
117
|
+
|
|
118
|
+
Commands involving private keys require `--password` before the subcommand name:
|
|
122
119
|
|
|
123
120
|
```bash
|
|
124
|
-
|
|
125
|
-
forgex transfer in --to <目标地址> --from-group 1 --amount all
|
|
121
|
+
forgex --password "your-password" <command> [subcommand] [options]
|
|
126
122
|
```
|
|
127
123
|
|
|
128
|
-
|
|
124
|
+
---
|
|
129
125
|
|
|
130
|
-
###
|
|
126
|
+
### `config` — Configuration
|
|
131
127
|
|
|
132
|
-
|
|
|
133
|
-
|------|------|--------|
|
|
134
|
-
| `--password <password>` | 钱包加密密码(跳过交互式输入,适合脚本/Agent 自动化) | - |
|
|
135
|
-
| `--format <format>` | 输出格式: `json` \| `table` \| `minimal` | `json` |
|
|
136
|
-
| `--help` | 显示帮助信息 | - |
|
|
137
|
-
| `--version` | 显示版本号 | - |
|
|
128
|
+
| Command | Description |
|
|
138
129
|
|
|
139
|
-
|
|
130
|
+
|---|---|
|
|
140
131
|
|
|
141
|
-
|
|
132
|
+
| `forgex config init` | Initialize config file |
|
|
142
133
|
|
|
143
|
-
|
|
134
|
+
| `forgex config set <key> <value>` | Set a config value |
|
|
144
135
|
|
|
145
|
-
|
|
|
146
|
-
|------|------|
|
|
147
|
-
| `config init` | 初始化配置文件,支持 `--rpc-url`、`--network` |
|
|
148
|
-
| `config set <key> <value>` | 设置配置项,支持点号路径 |
|
|
149
|
-
| `config get [key]` | 查看配置项,不指定 key 显示全部 |
|
|
150
|
-
| `config list` | 列出所有配置 |
|
|
136
|
+
| `forgex config get [key]` | View config values |
|
|
151
137
|
|
|
152
|
-
|
|
138
|
+
```bash
|
|
139
|
+
# Initialize with RPC endpoint
|
|
140
|
+
forgex config init --rpc-url "https://my-rpc.com" --network mainnet
|
|
153
141
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
| `wallet add` | `--group` (必填), `--private-key` (必填) | 导入已有钱包 |
|
|
164
|
-
| `wallet remove` | `--group` (必填), `--address` (必填) | 从组中移除钱包 |
|
|
165
|
-
| `wallet import` | `--group` (必填), `--file` (必填) | 从 CSV 批量导入钱包 |
|
|
166
|
-
| `wallet export` | `--group` (必填), `--file` (必填) | 导出钱包组为 CSV |
|
|
167
|
-
| `wallet import-group` | `--file` (必填), `--password` | 从 JSON 导入钱包组 |
|
|
168
|
-
| `wallet export-group` | `--file` (必填), `--encrypt`, `--password` | 导出所有钱包组为 JSON |
|
|
169
|
-
| `wallet grind` | `--suffix` (必填), `--prefix`, `--count`, `--threads` | 生成靓号地址(自定义后缀/前缀),需要本地安装 solana-keygen |
|
|
170
|
-
| `wallet grind-list` | `--suffix` | 列出已生成的靓号地址,可按后缀过滤 |
|
|
171
|
-
|
|
172
|
-
**靓号生成 (grind) 说明:**
|
|
173
|
-
- 依赖本地 `solana-keygen` 工具,未安装时会提示安装方式
|
|
174
|
-
- 后缀/前缀仅支持 Base58 字符(不含 0, O, I, l)
|
|
175
|
-
- 生成的密钥文件保存在 `~/.forgex/vanity/` 目录
|
|
176
|
-
- 后缀越长,生成时间越久(4 字符秒级,5+ 字符可能数分钟)
|
|
142
|
+
# Set Codex API key for market data
|
|
143
|
+
forgex config set codexApiKey "your-api-key"
|
|
144
|
+
|
|
145
|
+
# Set default slippage (BPS)
|
|
146
|
+
forgex config set defaultSlippage 300
|
|
147
|
+
|
|
148
|
+
# View all config
|
|
149
|
+
forgex config get
|
|
150
|
+
```
|
|
177
151
|
|
|
178
152
|
---
|
|
179
153
|
|
|
180
|
-
###
|
|
154
|
+
### `wallet` — Wallet Group Management
|
|
181
155
|
|
|
182
|
-
|
|
183
|
-
|------|----------|------|
|
|
184
|
-
| `trade buy` | `--group`, `--token`, `--amount`(SOL) | 批量买入,`--slippage` 默认 300bps |
|
|
185
|
-
| `trade sell` | `--group`, `--token`, `--amount` | 批量卖出,amount 支持: 数量 / 百分比(`50%`) / `all` |
|
|
186
|
-
| `trade batch` | `--group`, `--token`, `--type`, `--mode` | 批量交易,type: `buy\|sell\|buyWithSell`,mode: `1b1s\|1b2s\|1b3s\|2b1s\|3b1s` |
|
|
156
|
+
**Create & manage groups**
|
|
187
157
|
|
|
188
|
-
|
|
158
|
+
```bash
|
|
159
|
+
# Create a local wallet group
|
|
160
|
+
forgex wallet create-group --name "market-making-group"
|
|
161
|
+
|
|
162
|
+
# Create with optional remark
|
|
163
|
+
forgex wallet create-group --name "sniper-group" --remark "launch snipers"
|
|
189
164
|
|
|
190
|
-
|
|
165
|
+
# List all wallet groups
|
|
166
|
+
forgex wallet list-groups
|
|
191
167
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
| `tools turnover` | `--from-group`, `--to-group`, `--token` | 换手交易,使用 Jito Bundle 实现零滑点钱包间换手 |
|
|
195
|
-
| `tools volume` | `--group`, `--token`, `--mode`, `--amount` | 刷量工具,支持 5 种模式,零损失提升交易量 |
|
|
196
|
-
| `tools robot-price` | `--group`, `--token`, `--direction`, `--target-price` | 价格机器人,direction: `up`(拉升) / `down`(砸盘) |
|
|
168
|
+
# View group details (wallet addresses)
|
|
169
|
+
forgex wallet group-info --id 1
|
|
197
170
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
- `--rounds`: 轮数(0=无限)
|
|
202
|
-
- `--interval`: 间隔毫秒
|
|
171
|
+
# Delete a group
|
|
172
|
+
forgex wallet delete-group --id 1 --force
|
|
173
|
+
```
|
|
203
174
|
|
|
204
|
-
|
|
205
|
-
- `--mode`: `1b1s`(1买1卖) / `1b2s` / `1b3s` / `2b1s` / `3b1s`
|
|
206
|
-
- `--daemon`: 后台持续执行
|
|
207
|
-
- `--rounds`: 轮数(0=无限)
|
|
208
|
-
- `--interval`: 间隔毫秒
|
|
175
|
+
**Generate & import wallets**
|
|
209
176
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
- `--max-cost`: 总消耗 SOL 上限
|
|
214
|
-
- 默认持续运行直到达到目标价格或成本上限,Ctrl+C 停止
|
|
177
|
+
```bash
|
|
178
|
+
# Generate new wallets (max 100 per group)
|
|
179
|
+
forgex --password "pwd" wallet generate --group 1 --count 10
|
|
215
180
|
|
|
216
|
-
|
|
181
|
+
# Add an existing wallet by private key
|
|
182
|
+
forgex --password "pwd" wallet add --group 1 --private-key "Base58Key..." --note "main wallet"
|
|
217
183
|
|
|
218
|
-
|
|
184
|
+
# Remove a wallet from group
|
|
185
|
+
forgex --password "pwd" wallet remove --group 1 --address "WalletAddress..."
|
|
219
186
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
| `transfer out` | `--from`, `--to-group`, `--value` | 批量分发(一对多),`--amount fixed\|random` |
|
|
224
|
-
| `transfer many-to-many` | `--from-group`, `--to-group` | 多对多转账,按索引配对,`--amount all\|fixed\|reserve\|random` |
|
|
187
|
+
# Import from CSV (format: privateKey,note)
|
|
188
|
+
forgex --password "pwd" wallet import --group 1 --file ./wallets.csv
|
|
189
|
+
```
|
|
225
190
|
|
|
226
|
-
|
|
191
|
+
**Backup & restore**
|
|
227
192
|
|
|
228
|
-
|
|
193
|
+
```bash
|
|
194
|
+
# Export group as CSV
|
|
195
|
+
forgex --password "pwd" wallet export --group 1 --file ./backup.csv
|
|
196
|
+
|
|
197
|
+
# Export all groups as encrypted JSON
|
|
198
|
+
forgex --password "pwd" wallet export-group \
|
|
199
|
+
--file ./all-groups.json \
|
|
200
|
+
--encrypt \
|
|
201
|
+
--password "file-encryption-password"
|
|
202
|
+
|
|
203
|
+
# Import all groups from JSON backup
|
|
204
|
+
forgex --password "pwd" wallet import-group \
|
|
205
|
+
--file ./all-groups.json \
|
|
206
|
+
--password "file-encryption-password"
|
|
207
|
+
```
|
|
229
208
|
|
|
230
|
-
|
|
231
|
-
|------|----------|------|
|
|
232
|
-
| `token create` | `--dex`, `--name`, `--symbol`, `--image` | 创建代币,dex: `pump` / `launchlab` |
|
|
233
|
-
| `token info` | `--ca` | 查询代币信息(名称、符号、价格、交易对等) |
|
|
234
|
-
| `token pool` | `--ca` | 查询代币池子信息 |
|
|
209
|
+
**Vanity addresses**
|
|
235
210
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
- `--snipers`: 狙击者钱包组 ID,`--sniper-amounts`: 狙击金额
|
|
240
|
-
- `--bundle-time`: `T0`(同区块) / `T1_T5`
|
|
241
|
-
- `--use-suffix`: 使用自定义后缀地址
|
|
211
|
+
```bash
|
|
212
|
+
# Generate address ending in "pump"
|
|
213
|
+
forgex wallet grind --suffix pump
|
|
242
214
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
- T1_T5 模式允许跨区块买入,对 Jito tip 要求较低
|
|
215
|
+
# Generate 3 addresses with custom suffix, using 8 threads
|
|
216
|
+
forgex wallet grind --suffix pump --count 3 --threads 8
|
|
217
|
+
```
|
|
247
218
|
|
|
248
219
|
---
|
|
249
220
|
|
|
250
|
-
###
|
|
221
|
+
### `trade` — Trading
|
|
251
222
|
|
|
252
|
-
|
|
253
|
-
|------|----------|------|
|
|
254
|
-
| `query balance` | `--address`, `--token`(可选) | 查询余额,不填 token 查 SOL |
|
|
255
|
-
| `query price` | `--token` | 查询代币价格(SOL/USD) |
|
|
256
|
-
| `query kline` | `--token`, `--interval`, `--count` | K 线数据,interval: `1m\|5m\|15m\|1h\|4h\|1d` |
|
|
257
|
-
| `query transactions` | `--group`, `--token`(可选) | 查询交易记录,支持分页 `--page` `--page-size` |
|
|
258
|
-
| `query monitor` | `--group`, `--token`(可选) | 持仓监控(余额/均价/已实现&未实现盈亏) |
|
|
223
|
+
> All trade commands support `--dry-run` for simulation.
|
|
259
224
|
|
|
260
|
-
|
|
225
|
+
**Buy**
|
|
261
226
|
|
|
262
|
-
|
|
227
|
+
```bash
|
|
228
|
+
# Simulate buy (recommended before first run)
|
|
229
|
+
forgex --password "pwd" trade buy \
|
|
230
|
+
--group 1 --token "TOKEN_CA" --amount 0.1 --dry-run
|
|
263
231
|
|
|
264
|
-
|
|
232
|
+
# Batch buy — all wallets in group buy the same amount
|
|
233
|
+
forgex --password "pwd" trade buy \
|
|
234
|
+
--group 1 --token "TOKEN_CA" --amount 0.1 --slippage 300
|
|
235
|
+
```
|
|
265
236
|
|
|
266
|
-
|
|
237
|
+
**Sell**
|
|
267
238
|
|
|
268
|
-
|
|
239
|
+
```bash
|
|
240
|
+
# Sell all tokens
|
|
241
|
+
forgex --password "pwd" trade sell \
|
|
242
|
+
--group 1 --token "TOKEN_CA" --amount all
|
|
269
243
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
| `codexApiKey` | Codex API Key(市场数据查询) | `""` |
|
|
274
|
-
| `network` | 网络: `mainnet` / `devnet` / `testnet` | `mainnet` |
|
|
275
|
-
| `defaultPriorityFee` | 默认优先费 (SOL) | `0.0001` |
|
|
276
|
-
| `defaultSlippage` | 默认滑点 (bps) | `300` |
|
|
277
|
-
| `outputFormat` | 默认输出格式 | `json` |
|
|
278
|
-
| `solPrice` | SOL 美元价格(估值用) | `130` |
|
|
244
|
+
# Sell 50%
|
|
245
|
+
forgex --password "pwd" trade sell \
|
|
246
|
+
--group 1 --token "TOKEN_CA" --amount 50%
|
|
279
247
|
|
|
280
|
-
|
|
248
|
+
# Sell fixed token quantity
|
|
249
|
+
forgex --password "pwd" trade sell \
|
|
250
|
+
--group 1 --token "TOKEN_CA" --amount 1000000
|
|
251
|
+
```
|
|
281
252
|
|
|
282
|
-
|
|
253
|
+
**Batch (buy + sell in one bundle)**
|
|
283
254
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
255
|
+
```bash
|
|
256
|
+
# Execute buy and sell in same Jito Bundle
|
|
257
|
+
forgex --password "pwd" trade batch \
|
|
258
|
+
--group 1 --token "TOKEN_CA" \
|
|
259
|
+
--type buyWithSell --mode 1b1s --amount 0.01
|
|
260
|
+
```
|
|
289
261
|
|
|
290
|
-
|
|
262
|
+
Modes: `1b1s` (1 buy + 1 sell), `1b2s`, `1b3s`, `2b1s`, `3b1s`
|
|
291
263
|
|
|
292
|
-
|
|
264
|
+
**Sniper**
|
|
293
265
|
|
|
294
|
-
|
|
266
|
+
```bash
|
|
267
|
+
# Snipe with different amounts per wallet (amounts count must match wallet count)
|
|
268
|
+
forgex --password "pwd" trade sniper \
|
|
269
|
+
--group 1 --token "TOKEN_CA" \
|
|
270
|
+
--amounts "0.5,0.3,0.2" --slippage 500
|
|
271
|
+
```
|
|
295
272
|
|
|
296
|
-
|
|
297
|
-
1. 用户设置主密码
|
|
298
|
-
2. 私钥通过 `CryptoJS.AES.encrypt(privateKey, password)` 加密后写入磁盘
|
|
299
|
-
3. 使用时通过 `CryptoJS.AES.decrypt(encrypted, password)` 临时解密到内存
|
|
300
|
-
4. 明文私钥仅在内存中使用,不持久化
|
|
301
|
-
5. 旧版明文存储会自动检测并迁移到加密格式
|
|
273
|
+
---
|
|
302
274
|
|
|
303
|
-
###
|
|
275
|
+
### `tools` — Market Making
|
|
304
276
|
|
|
305
|
-
-
|
|
306
|
-
- 通过 `--password` 全局参数或环境变量 `FORGEX_PASSWORD` 设置密码,适合脚本/Agent 自动化场景(优先级: `--password` > `FORGEX_PASSWORD` > 交互式输入)
|
|
307
|
-
- 定期使用 `wallet export-group --encrypt --password <pwd>` 加密备份钱包数据
|
|
308
|
-
- 不要在公共环境或共享屏幕时使用 `wallet group-info --show-keys`
|
|
309
|
-
- 所有交易命令支持 `--dry-run` 预检,建议大额操作前先模拟验证
|
|
310
|
-
- 配置文件权限为 `600`(仅所有者可读写),目录权限为 `700`
|
|
277
|
+
> All tools support `--dry-run`. Use `--rounds` to limit execution.
|
|
311
278
|
|
|
312
|
-
|
|
279
|
+
**Turnover (wallet cycling)**
|
|
313
280
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
281
|
+
Cycles tokens between two wallet groups via Jito Bundle — zero price impact.
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
# Simulate
|
|
285
|
+
forgex --password "pwd" tools turnover \
|
|
286
|
+
--from-group 1 --to-group 2 --token "TOKEN_CA" --dry-run
|
|
287
|
+
|
|
288
|
+
# Run 5 turnover cycles
|
|
289
|
+
forgex --password "pwd" tools turnover \
|
|
290
|
+
--from-group 1 --to-group 2 --token "TOKEN_CA" \
|
|
291
|
+
--daemon --rounds 5 --interval 2000
|
|
292
|
+
|
|
293
|
+
# Turnover 50% of holdings
|
|
294
|
+
forgex --password "pwd" tools turnover \
|
|
295
|
+
--from-group 1 --to-group 2 --token "TOKEN_CA" \
|
|
296
|
+
--amount 50%
|
|
328
297
|
```
|
|
329
298
|
|
|
330
|
-
|
|
299
|
+
**Volume bot**
|
|
331
300
|
|
|
301
|
+
Generates on-chain trading volume with zero net loss (buy + sell in same bundle).
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
# Simulate
|
|
305
|
+
forgex --password "pwd" tools volume \
|
|
306
|
+
--group 1 --token "TOKEN_CA" --dry-run
|
|
307
|
+
|
|
308
|
+
# Run 20 rounds, every 10 seconds
|
|
309
|
+
forgex --password "pwd" tools volume \
|
|
310
|
+
--group 1 --token "TOKEN_CA" \
|
|
311
|
+
--mode 1b1s --amount 0.01 \
|
|
312
|
+
--daemon --rounds 20 --interval 10000
|
|
332
313
|
```
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
+---> sol-sdk 前端交易 SDK 适配
|
|
314
|
+
|
|
315
|
+
**Price robot**
|
|
316
|
+
|
|
317
|
+
Automatically moves price toward a target by buying (up) or selling (down).
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
# Simulate price push
|
|
321
|
+
forgex --password "pwd" tools robot-price \
|
|
322
|
+
--group 1 --token "TOKEN_CA" \
|
|
323
|
+
--direction up --target-price 0.001 --dry-run
|
|
324
|
+
|
|
325
|
+
# Push price up, max spend 5 SOL
|
|
326
|
+
forgex --password "pwd" tools robot-price \
|
|
327
|
+
--group 1 --token "TOKEN_CA" \
|
|
328
|
+
--direction up --target-price 0.001 \
|
|
329
|
+
--amount 0.05 --max-cost 5 --interval 3000
|
|
350
330
|
```
|
|
351
331
|
|
|
352
|
-
|
|
332
|
+
Options: `--direction up|down`, `--target-price <sol>`, `--amount <sol>`, `--max-cost <sol>`, `--interval <ms>`
|
|
353
333
|
|
|
354
|
-
|
|
355
|
-
- **DataStore**: 基于文件系统的本地数据存储,按 `tokens/{CA}/groups/{groupId}/` 组织数据
|
|
356
|
-
- **CodexAdapter**: 对接 Codex API 获取市场数据(代币信息、实时价格、K 线、交易对)
|
|
357
|
-
- **RpcAdapter**: 对接 Solana RPC 节点进行链上查询(SOL/Token 余额、账户信息、交易确认)
|
|
358
|
-
- **JitoAdapter**: 对接 Jito Block Engine 发送和查询 Bundle 交易
|
|
359
|
-
- **TxTracker**: 交易完成后自动追踪链上结果,解析交易详情,更新持仓和盈亏数据
|
|
360
|
-
- **SdkAdapter**: 封装前端 sol-sdk,提供买入/卖出/换手/刷量等交易构建和执行能力
|
|
334
|
+
---
|
|
361
335
|
|
|
362
|
-
###
|
|
336
|
+
### `transfer` — Fund Management
|
|
363
337
|
|
|
364
|
-
|
|
338
|
+
> All transfer commands support `--dry-run`.
|
|
365
339
|
|
|
366
|
-
|
|
367
|
-
- **table**: cli-table3 表格,适合终端人工查看
|
|
368
|
-
- **minimal**: 简洁文本,仅输出关键信息
|
|
340
|
+
**Collect (many → one)**
|
|
369
341
|
|
|
370
342
|
```bash
|
|
371
|
-
|
|
372
|
-
forgex
|
|
373
|
-
|
|
343
|
+
# Collect all SOL from group into one wallet
|
|
344
|
+
forgex --password "pwd" transfer in \
|
|
345
|
+
--to "MainWalletAddress" --from-group 1 --amount all
|
|
346
|
+
|
|
347
|
+
# Keep 0.01 SOL in each wallet, collect the rest
|
|
348
|
+
forgex --password "pwd" transfer in \
|
|
349
|
+
--to "MainWalletAddress" --from-group 1 \
|
|
350
|
+
--amount reserve --value 0.01
|
|
351
|
+
|
|
352
|
+
# Collect tokens instead of SOL
|
|
353
|
+
forgex --password "pwd" transfer in \
|
|
354
|
+
--to "MainWalletAddress" --from-group 1 \
|
|
355
|
+
--token "TOKEN_CA" --amount all
|
|
374
356
|
```
|
|
375
357
|
|
|
376
|
-
|
|
358
|
+
**Distribute (one → many)**
|
|
377
359
|
|
|
378
|
-
|
|
360
|
+
> `--from` address must belong to a wallet group (private key required for signing).
|
|
379
361
|
|
|
380
362
|
```bash
|
|
381
|
-
#
|
|
382
|
-
|
|
363
|
+
# Send 0.1 SOL to each wallet in group
|
|
364
|
+
forgex --password "pwd" transfer out \
|
|
365
|
+
--from "SourceAddress" --to-group 1 --value 0.1
|
|
366
|
+
|
|
367
|
+
# Random distribution between 0.05 and 0.15 SOL
|
|
368
|
+
forgex --password "pwd" transfer out \
|
|
369
|
+
--from "SourceAddress" --to-group 1 \
|
|
370
|
+
--amount random --value 0.05 --max 0.15
|
|
371
|
+
```
|
|
383
372
|
|
|
384
|
-
|
|
385
|
-
npm run dev -- config list
|
|
386
|
-
npm run dev -- wallet list-groups --format table
|
|
373
|
+
**Many-to-many (wallet[i] → wallet[i])**
|
|
387
374
|
|
|
388
|
-
|
|
389
|
-
|
|
375
|
+
```bash
|
|
376
|
+
# Transfer all from group 1 wallets to matching group 2 wallets
|
|
377
|
+
forgex --password "pwd" transfer many-to-many \
|
|
378
|
+
--from-group 1 --to-group 2 --amount all
|
|
390
379
|
|
|
391
|
-
#
|
|
392
|
-
|
|
380
|
+
# Fixed amount per pair
|
|
381
|
+
forgex --password "pwd" transfer many-to-many \
|
|
382
|
+
--from-group 1 --to-group 2 --amount fixed --value 0.1
|
|
393
383
|
```
|
|
394
384
|
|
|
395
|
-
|
|
385
|
+
---
|
|
396
386
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
387
|
+
### `token` — Token Operations
|
|
388
|
+
|
|
389
|
+
> Supports `--dry-run` for simulation.
|
|
390
|
+
|
|
391
|
+
**Create & launch token**
|
|
400
392
|
|
|
401
|
-
|
|
402
|
-
|
|
393
|
+
```bash
|
|
394
|
+
# Simulate token creation
|
|
395
|
+
forgex --password "pwd" token create \
|
|
396
|
+
--dex pump \
|
|
397
|
+
--name "MyToken" --symbol "MTK" \
|
|
398
|
+
--image ./logo.png \
|
|
399
|
+
--description "My token" \
|
|
400
|
+
--dry-run
|
|
401
|
+
|
|
402
|
+
# Launch with dev buy + snipers in same block (T0 bundle)
|
|
403
|
+
forgex --password "pwd" token create \
|
|
404
|
+
--dex pump \
|
|
405
|
+
--name "MyToken" --symbol "MTK" \
|
|
406
|
+
--image ./logo.png \
|
|
407
|
+
--twitter "https://twitter.com/mytoken" \
|
|
408
|
+
--website "https://mytoken.io" \
|
|
409
|
+
--dev-wallet 1 --dev-buy 2.0 \
|
|
410
|
+
--snipers 2 --sniper-amounts "0.5,0.3,0.2" \
|
|
411
|
+
--bundle-time T0
|
|
403
412
|
```
|
|
404
413
|
|
|
405
|
-
|
|
414
|
+
Platforms: `pump` (Pump.fun), `launchlab`
|
|
415
|
+
|
|
416
|
+
Bundle time: `T0` (dev buy + snipers same block), `T1_T5` (snipers 1-5 blocks after dev)
|
|
406
417
|
|
|
407
|
-
|
|
418
|
+
**Query token**
|
|
408
419
|
|
|
420
|
+
```bash
|
|
421
|
+
# Token info (price, name, dex)
|
|
422
|
+
forgex token info --ca "TOKEN_CA"
|
|
423
|
+
|
|
424
|
+
# Liquidity pool info
|
|
425
|
+
forgex token pool --ca "TOKEN_CA"
|
|
409
426
|
```
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
index.ts 本地文件存储实现
|
|
434
|
-
types.ts 数据类型定义
|
|
435
|
-
tx-tracker/
|
|
436
|
-
index.ts 交易追踪主逻辑
|
|
437
|
-
detail-adapter.ts 链上交易详情解析
|
|
438
|
-
tests/ 测试文件
|
|
439
|
-
vitest.config.ts vitest 测试配置
|
|
440
|
-
package.json 依赖和脚本
|
|
441
|
-
tsconfig.json TypeScript 配置
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
### `query` — Data Queries
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
# SOL balance
|
|
434
|
+
forgex query balance --address "WalletAddress"
|
|
435
|
+
|
|
436
|
+
# Token balance
|
|
437
|
+
forgex query balance --address "WalletAddress" --token "TOKEN_CA"
|
|
438
|
+
|
|
439
|
+
# Token price
|
|
440
|
+
forgex query price --token "TOKEN_CA"
|
|
441
|
+
|
|
442
|
+
# Candlestick data (intervals: 1m, 5m, 15m, 1h, 4h, 1d)
|
|
443
|
+
forgex query kline --token "TOKEN_CA" --interval 5m --count 50
|
|
444
|
+
|
|
445
|
+
# Transaction history for a group
|
|
446
|
+
forgex query transactions --group 1 --token "TOKEN_CA"
|
|
447
|
+
|
|
448
|
+
# Holdings and PnL across a group
|
|
449
|
+
forgex query monitor --group 1 --token "TOKEN_CA"
|
|
442
450
|
```
|
|
443
451
|
|
|
444
|
-
|
|
452
|
+
---
|
|
445
453
|
|
|
446
|
-
|
|
447
|
-
|------|------|
|
|
448
|
-
| 语言 | TypeScript (ESM, type: module) |
|
|
449
|
-
| CLI 框架 | Commander.js 13 |
|
|
450
|
-
| 区块链 SDK | @solana/web3.js, @coral-xyz/anchor 0.31 |
|
|
451
|
-
| 加密 | crypto-js (AES) |
|
|
452
|
-
| 交互 | inquirer 12 |
|
|
453
|
-
| 表格 | cli-table3 |
|
|
454
|
-
| 进度条 | cli-progress |
|
|
455
|
-
| 加载动画 | ora |
|
|
456
|
-
| 颜色 | chalk 5 |
|
|
457
|
-
| 大数 | bignumber.js, bn.js |
|
|
458
|
-
| HTTP | axios |
|
|
459
|
-
| 测试 | vitest 4 |
|
|
454
|
+
## Slippage Reference
|
|
460
455
|
|
|
461
|
-
|
|
456
|
+
| BPS | Percentage | Recommended for |
|
|
462
457
|
|
|
463
|
-
|
|
458
|
+
|---|---|---|
|
|
464
459
|
|
|
465
|
-
|
|
460
|
+
| 100 | 1% | Turnover trades |
|
|
466
461
|
|
|
467
|
-
|
|
462
|
+
| 300 | 3% | Normal buy/sell |
|
|
468
463
|
|
|
469
|
-
|
|
470
|
-
```bash
|
|
471
|
-
forgex --password "your-password" trade buy --group 1 --token "CA..." --amount 0.01
|
|
472
|
-
forgex --password="your-password" wallet list-groups
|
|
473
|
-
```
|
|
464
|
+
| 500 | 5% | Sniping / fast entries |
|
|
474
465
|
|
|
475
|
-
|
|
476
|
-
```bash
|
|
477
|
-
export FORGEX_PASSWORD="your-password"
|
|
478
|
-
forgex trade buy --group 1 --token "CA..." --amount 0.01
|
|
479
|
-
```
|
|
466
|
+
| 1000 | 10% | High volatility tokens |
|
|
480
467
|
|
|
481
|
-
|
|
468
|
+
| 2000 | 20% | Extreme conditions |
|
|
482
469
|
|
|
483
|
-
|
|
470
|
+
---
|
|
484
471
|
|
|
485
|
-
|
|
486
|
-
- `wallet import-group` 和 `wallet export-group` 的 `--password` 是子命令参数(用于加密导入/导出文件),与全局 `--password` 不冲突
|
|
487
|
-
- Agent 应始终使用 `--format json`(默认值),以便解析结构化输出
|
|
488
|
-
- 首次执行高风险操作前应使用 `--dry-run` 模拟验证
|
|
472
|
+
## Demo
|
|
489
473
|
|
|
490
|
-
|
|
474
|
+
<!-- 📹 30-second demo video — coming soon -->
|
|
491
475
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
## Workflow Examples
|
|
479
|
+
|
|
480
|
+
### Token Launch in 3 commands
|
|
481
|
+
|
|
482
|
+
```bash
|
|
483
|
+
# 1. Create wallets
|
|
484
|
+
forgex --password "pwd" wallet generate --group 1 --count 5
|
|
485
|
+
|
|
486
|
+
# 2. Fund them
|
|
487
|
+
forgex --password "pwd" transfer out --from "MainWallet" --to-group 1 --value 0.5
|
|
488
|
+
|
|
489
|
+
# 3. Launch token with dev buy + snipers
|
|
490
|
+
forgex --password "pwd" token create \
|
|
491
|
+
--dex pump --name "MyToken" --symbol "MTK" \
|
|
492
|
+
--image ./logo.png \
|
|
493
|
+
--dev-wallet 1 --dev-buy 1.0 \
|
|
494
|
+
--snipers 1 --sniper-amounts "0.3,0.2,0.1,0.1,0.1" \
|
|
495
|
+
--bundle-time T0
|
|
496
|
+
```
|
|
499
497
|
|
|
500
|
-
###
|
|
498
|
+
### Run the volume bot
|
|
501
499
|
|
|
502
500
|
```bash
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
forgex --password "pwd" trade sell --group 1 --token "CA..." --amount all
|
|
508
|
-
forgex --password "pwd" transfer in --to "MainWallet..." --from-group 1 --amount all
|
|
501
|
+
forgex --password "pwd" tools volume \
|
|
502
|
+
--group 1 --token "TOKEN_CA" \
|
|
503
|
+
--mode 1b1s --amount 0.01 \
|
|
504
|
+
--rounds 30 --interval 10000
|
|
509
505
|
```
|
|
510
506
|
|
|
511
|
-
|
|
507
|
+
### Collect funds back to main wallet
|
|
508
|
+
|
|
509
|
+
```bash
|
|
510
|
+
forgex --password "pwd" trade sell --group 1 --token "TOKEN_CA" --amount all
|
|
511
|
+
forgex --password "pwd" transfer in --to "MainWallet" --from-group 1 --amount all
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
---
|
|
515
|
+
|
|
516
|
+
## Links
|
|
512
517
|
|
|
513
|
-
|
|
518
|
+
- **Twitter:** [@SonicSVM](https://twitter.com/SonicSVM)
|
|
519
|
+
- **npm:** [forgex-cli](https://www.npmjs.com/package/forgex-cli)
|
|
520
|
+
- **Sonic SVM:** [sonic.game](https://sonic.game)
|