@backtest-kit/cli 0.0.3 → 0.0.4
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 +20 -20
- package/build/index.cjs +1 -0
- package/build/index.mjs +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,13 +30,13 @@ Point the CLI at your strategy file, choose a mode, and it handles exchange conn
|
|
|
30
30
|
|
|
31
31
|
`@backtest-kit/cli` wraps the `backtest-kit` engine and resolves all scaffolding automatically:
|
|
32
32
|
|
|
33
|
-
| Mode |
|
|
34
|
-
|
|
35
|
-
| **Backtest** | `--backtest`
|
|
36
|
-
| **Paper** | `--paper`
|
|
37
|
-
| **Live** | `--live`
|
|
38
|
-
| **UI Dashboard** | `--ui`
|
|
39
|
-
| **Telegram** | `--telegram`
|
|
33
|
+
| Mode | Command Line Args | Description |
|
|
34
|
+
|------------------|----------------------------|----------------------------------------------|
|
|
35
|
+
| **Backtest** | `--backtest` | Run strategy on historical candle data |
|
|
36
|
+
| **Paper** | `--paper` | Live prices, no real orders |
|
|
37
|
+
| **Live** | `--live` | Real trades via exchange API |
|
|
38
|
+
| **UI Dashboard** | `--ui` | Web dashboard at `http://localhost:60050` |
|
|
39
|
+
| **Telegram** | `--telegram` | Trade notifications with price charts |
|
|
40
40
|
|
|
41
41
|
## 🚀 Installation
|
|
42
42
|
|
|
@@ -129,19 +129,19 @@ npm start -- --symbol BTCUSDT --ui
|
|
|
129
129
|
|
|
130
130
|
## 🎛️ CLI Flags
|
|
131
131
|
|
|
132
|
-
|
|
|
133
|
-
|
|
134
|
-
| `--backtest`
|
|
135
|
-
| `--paper`
|
|
136
|
-
| `--live`
|
|
137
|
-
| `--ui`
|
|
138
|
-
| `--telegram`
|
|
139
|
-
| `--verbose`
|
|
140
|
-
| `--symbol`
|
|
141
|
-
| `--strategy`
|
|
142
|
-
| `--exchange`
|
|
143
|
-
| `--frame`
|
|
144
|
-
| `--cache`
|
|
132
|
+
| Command Line Args | Type | Description |
|
|
133
|
+
|---------------------------|---------|--------------------------------------------------------------------|
|
|
134
|
+
| `--backtest` | boolean | Run historical backtest (default: `false`) |
|
|
135
|
+
| `--paper` | boolean | Paper trading (live prices, no orders) (default: `false`) |
|
|
136
|
+
| `--live` | boolean | Run live trading (default: `false`) |
|
|
137
|
+
| `--ui` | boolean | Start web UI dashboard (default: `false`) |
|
|
138
|
+
| `--telegram` | boolean | Enable Telegram notifications (default: `false`) |
|
|
139
|
+
| `--verbose` | boolean | Log each candle fetch (default: `false`) |
|
|
140
|
+
| `--symbol` | string | Trading pair (default: `"BTCUSDT"`) |
|
|
141
|
+
| `--strategy` | string | Strategy name (default: first registered) |
|
|
142
|
+
| `--exchange` | string | Exchange name (default: first registered) |
|
|
143
|
+
| `--frame` | string | Backtest frame name (default: first registered) |
|
|
144
|
+
| `--cache` | string | Intervals to pre-cache before backtest (default: `"1m, 15m, 30m, 4h"`) |
|
|
145
145
|
|
|
146
146
|
**Positional argument (required):** path to your strategy entry point file (set once in `package.json` scripts).
|
|
147
147
|
|
package/build/index.cjs
CHANGED
package/build/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
import { Storage, Notification, Markdown, Report, StorageLive, StorageBacktest, NotificationLive, NotificationBacktest, listExchangeSchema, addExchangeSchema, roundTicks, listFrameSchema, addFrameSchema, listenDoneLive, listenDoneBacktest, listStrategySchema, overrideExchangeSchema, Backtest, Live, getCandles, checkCandles, warmCandles, listenRisk, listenSignal, listenStrategyCommit } from 'backtest-kit';
|
|
2
3
|
import { getErrorMessage, errorData, singleshot, str, BehaviorSubject, compose, execpool, queued, sleep, randomString, createAwaiter, TIMEOUT_SYMBOL, typo, retry, memoize, trycatch } from 'functools-kit';
|
|
3
4
|
import fs, { constants } from 'fs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtest-kit/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Zero-boilerplate CLI runner for backtest-kit strategies. Run backtests, paper trading, and live bots with candle cache warming, web dashboard, and Telegram notifications — no setup code required.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Petr Tripolsky",
|