diff --git a/Readme.md b/Readme.md index 2c9a24f..72229e9 100644 --- a/Readme.md +++ b/Readme.md @@ -569,6 +569,12 @@ gmgn-cli order quote \ # Query order gmgn-cli order get --chain sol --order-id +# Query real-time gas price (all chains) +gmgn-cli gas-price --chain sol +gmgn-cli gas-price --chain eth +gmgn-cli gas-price --chain bsc +gmgn-cli gas-price --chain base + # Multi-wallet concurrent swap gmgn-cli multi-swap \ --chain sol \ @@ -581,6 +587,34 @@ gmgn-cli multi-swap \ > `order quote` uses critical auth on `sol` / `bsc` / `base` / `eth` and requires `GMGN_PRIVATE_KEY`. +### ETH Gas Control (ETH only) + +```bash +# Pick a gas tier instead of entering gwei manually (low / average / high) +gmgn-cli swap \ + --chain eth \ + --from \ + --input-token \ + --output-token \ + --amount \ + --slippage 0.01 \ + --gas-level high + +# Let GMGN auto-select the optimal gas fee for condition orders +gmgn-cli swap \ + --chain eth \ + --from \ + --input-token \ + --output-token \ + --amount \ + --slippage 0.01 \ + --condition-orders '[...]' \ + --auto-fee +``` + +> `--gas-level` and `--auto-fee` are ETH only. `--auto-fee` only takes effect when used with `--condition-orders`. +> For other chains (SOL / BSC / BASE), use `gas-price` to query the current gas, then pass the result via `--gas-price`. + ### Swap with Take-Profit / Stop-Loss Orders (requires private key) **`hold_amount` mode** — each condition order fires based on current holdings at trigger time: @@ -674,6 +708,7 @@ gmgn-cli cooking \ |----------|--------|-----------------| | token / market / portfolio / track | `sol` / `bsc` / `base` / `eth` | — | | swap / order | `sol` / `bsc` / `base` / `eth` | sol: SOL, USDC · bsc: BNB, USDC · base: ETH, USDC · eth: ETH | +| gas-price | `sol` / `bsc` / `base` / `eth` | — | --- diff --git a/Readme.zh.md b/Readme.zh.md index 6c79db2..dd3f8c7 100644 --- a/Readme.zh.md +++ b/Readme.zh.md @@ -593,6 +593,12 @@ gmgn-cli order quote \ # 查询订单状态 gmgn-cli order get --chain sol --order-id +# 查询实时 Gas 价格(支持全链) +gmgn-cli gas-price --chain sol +gmgn-cli gas-price --chain eth +gmgn-cli gas-price --chain bsc +gmgn-cli gas-price --chain base + # 多钱包并发 Swap gmgn-cli multi-swap \ --chain sol \ @@ -605,6 +611,34 @@ gmgn-cli multi-swap \ > `order quote` 在 `sol` / `bsc` / `base` / `eth` 上都走关键鉴权,必须配置 `GMGN_PRIVATE_KEY`。 +### ETH Gas 档位控制(仅限 ETH) + +```bash +# 按档位设置 Gas(low / average / high),替代手动填写 gwei +gmgn-cli swap \ + --chain eth \ + --from \ + --input-token \ + --output-token \ + --amount \ + --slippage 0.01 \ + --gas-level high + +# 策略单(condition-orders)由 GMGN 自动选择最优 Gas Fee +gmgn-cli swap \ + --chain eth \ + --from \ + --input-token \ + --output-token \ + --amount \ + --slippage 0.01 \ + --condition-orders '[...]' \ + --auto-fee +``` + +> `--gas-level` 和 `--auto-fee` 仅支持 ETH 链。`--auto-fee` 仅在携带 `--condition-orders` 时生效。 +> 其他链(SOL / BSC / BASE)请先用 `gas-price` 查询当前 Gas,再通过 `--gas-price` 手动传入。 + ### 带止盈止损的 Swap(需要私钥) **`hold_amount` 模式** — 按触发时的实际持仓比例卖出: @@ -698,6 +732,7 @@ gmgn-cli cooking \ |----------|----------|-----------| | token / market / portfolio / track | `sol` / `bsc` / `base` / `eth` | — | | swap / order | `sol` / `bsc` / `base` / `eth` | sol: SOL、USDC · bsc: BNB、USDC · base: ETH、USDC · eth: ETH | +| gas-price | `sol` / `bsc` / `base` / `eth` | — | ---