feat: 在文档中添加 CLI 参数说明,支持通过命令行临时指定交易所

This commit is contained in:
discountry
2025-10-03 03:16:44 +08:00
parent 9a419c36ac
commit b43eaa0c64
5 changed files with 72 additions and 5 deletions
+13
View File
@@ -69,6 +69,12 @@ The most important settings shipped in `.env.example` are summarised below:
To trade on GRVT, set `EXCHANGE=grvt` and populate `GRVT_API_KEY`, `GRVT_API_SECRET`, `GRVT_SUB_ACCOUNT_ID`, plus any optional overrides documented in `.env.example`.
> Tip: you can temporarily override the exchange via CLI flags (takes precedence over environment):
> ```bash
> bun run index.ts --exchange grvt
> bun run index.ts -e lighter
> ```
## Common Commands
```bash
bun run index.ts # Launch the CLI
@@ -87,6 +93,13 @@ bun run index.ts --strategy maker --silent # Maker engine
bun run index.ts --strategy offset-maker --silent # Offset maker engine
```
Combine with `--exchange/-e` to explicitly choose the venue (overrides `EXCHANGE`/`TRADE_EXCHANGE` from `.env`):
```bash
bun run index.ts --exchange grvt --strategy maker --silent
bun run index.ts -e lighter -s offset-maker --silent
```
### Package scripts
Convenience aliases are exposed in `package.json`: