mirror of
https://github.com/GMGNAI/gmgn-skills.git
synced 2026-07-27 16:57:44 +00:00
docs: add gas-price command and ETH gas control examples to README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -569,6 +569,12 @@ gmgn-cli order quote \
|
||||
# Query order
|
||||
gmgn-cli order get --chain sol --order-id <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 <wallet-address> \
|
||||
--input-token <input-token-addr> \
|
||||
--output-token <output-token-addr> \
|
||||
--amount <amount> \
|
||||
--slippage 0.01 \
|
||||
--gas-level high
|
||||
|
||||
# Let GMGN auto-select the optimal gas fee for condition orders
|
||||
gmgn-cli swap \
|
||||
--chain eth \
|
||||
--from <wallet-address> \
|
||||
--input-token <input-token-addr> \
|
||||
--output-token <output-token-addr> \
|
||||
--amount <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` | — |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -593,6 +593,12 @@ gmgn-cli order quote \
|
||||
# 查询订单状态
|
||||
gmgn-cli order get --chain sol --order-id <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 <wallet-address> \
|
||||
--input-token <input-token-addr> \
|
||||
--output-token <output-token-addr> \
|
||||
--amount <amount> \
|
||||
--slippage 0.01 \
|
||||
--gas-level high
|
||||
|
||||
# 策略单(condition-orders)由 GMGN 自动选择最优 Gas Fee
|
||||
gmgn-cli swap \
|
||||
--chain eth \
|
||||
--from <wallet-address> \
|
||||
--input-token <input-token-addr> \
|
||||
--output-token <output-token-addr> \
|
||||
--amount <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` | — |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user