mirror of
https://github.com/GMGNAI/gmgn-skills.git
synced 2026-07-27 16:57:44 +00:00
fix bsc order quote auth
This commit is contained in:
+13
-2
@@ -164,7 +164,7 @@ echo 'GMGN_API_KEY=<user_api_key>' > ~/.config/gmgn/.env
|
||||
chmod 600 ~/.config/gmgn/.env
|
||||
```
|
||||
|
||||
如果用户需要 swap 能力,追加私钥:
|
||||
如果用户需要 swap 能力或 BSC 链上的 `order quote`,追加私钥:
|
||||
|
||||
```bash
|
||||
# 追加私钥(使用第 3 步输出的 PEM 内容)
|
||||
@@ -532,7 +532,7 @@ gmgn-cli track smartmoney --limit 100 --raw
|
||||
gmgn-cli track smartmoney --chain sol --side sell --limit 50 --raw
|
||||
```
|
||||
|
||||
### Swap(需要私钥)
|
||||
### Swap / Quote / Query
|
||||
|
||||
```bash
|
||||
# 提交兑换(固定滑点)
|
||||
@@ -571,10 +571,21 @@ gmgn-cli order quote \
|
||||
--amount 1000000 \
|
||||
--slippage 0.01
|
||||
|
||||
# BSC 报价走关键鉴权,需要 GMGN_PRIVATE_KEY
|
||||
gmgn-cli order quote \
|
||||
--chain bsc \
|
||||
--from <wallet-address> \
|
||||
--input-token <input-token-addr> \
|
||||
--output-token <output-token-addr> \
|
||||
--amount 1000000000000000000 \
|
||||
--slippage 0.01
|
||||
|
||||
# 查询订单状态
|
||||
gmgn-cli order get --chain sol --order-id <order-id>
|
||||
```
|
||||
|
||||
> `order quote` 在 `sol` / `base` 上仍只需要 API Key;在 `bsc` 上改为关键鉴权,必须配置 `GMGN_PRIVATE_KEY`。
|
||||
|
||||
### 带止盈止损的 Swap(需要私钥)
|
||||
|
||||
**`hold_amount` 模式** — 按触发时的实际持仓比例卖出:
|
||||
|
||||
Reference in New Issue
Block a user