@backtest-kit/cli 7.1.0 → 7.2.0

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.
Files changed (206) hide show
  1. package/README.md +119 -0
  2. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776683700000.json +1 -0
  3. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776684600000.json +1 -0
  4. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776685500000.json +1 -0
  5. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776686400000.json +1 -0
  6. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776687300000.json +1 -0
  7. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776688200000.json +1 -0
  8. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776689100000.json +1 -0
  9. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776690000000.json +1 -0
  10. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776690900000.json +1 -0
  11. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776691800000.json +1 -0
  12. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776692700000.json +1 -0
  13. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776693600000.json +1 -0
  14. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776694500000.json +1 -0
  15. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776695400000.json +1 -0
  16. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776696300000.json +1 -0
  17. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776697200000.json +1 -0
  18. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776698100000.json +1 -0
  19. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776699000000.json +1 -0
  20. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776699900000.json +1 -0
  21. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776700800000.json +1 -0
  22. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776701700000.json +1 -0
  23. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776702600000.json +1 -0
  24. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776703500000.json +1 -0
  25. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776704400000.json +1 -0
  26. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776705300000.json +1 -0
  27. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776706200000.json +1 -0
  28. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776707100000.json +1 -0
  29. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776708000000.json +1 -0
  30. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776708900000.json +1 -0
  31. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776709800000.json +1 -0
  32. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776710700000.json +1 -0
  33. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776711600000.json +1 -0
  34. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776712500000.json +1 -0
  35. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776713400000.json +1 -0
  36. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776714300000.json +1 -0
  37. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776715200000.json +1 -0
  38. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776716100000.json +1 -0
  39. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776717000000.json +1 -0
  40. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776717900000.json +1 -0
  41. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776718800000.json +1 -0
  42. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776719700000.json +1 -0
  43. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776720600000.json +1 -0
  44. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776721500000.json +1 -0
  45. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776722400000.json +1 -0
  46. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776723300000.json +1 -0
  47. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776724200000.json +1 -0
  48. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776725100000.json +1 -0
  49. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776726000000.json +1 -0
  50. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776726900000.json +1 -0
  51. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776727800000.json +1 -0
  52. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776728700000.json +1 -0
  53. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776729600000.json +1 -0
  54. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776730500000.json +1 -0
  55. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776731400000.json +1 -0
  56. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776732300000.json +1 -0
  57. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776733200000.json +1 -0
  58. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776734100000.json +1 -0
  59. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776735000000.json +1 -0
  60. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776735900000.json +1 -0
  61. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776736800000.json +1 -0
  62. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776737700000.json +1 -0
  63. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776738600000.json +1 -0
  64. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776739500000.json +1 -0
  65. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776740400000.json +1 -0
  66. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776741300000.json +1 -0
  67. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776742200000.json +1 -0
  68. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776743100000.json +1 -0
  69. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776744000000.json +1 -0
  70. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776744900000.json +1 -0
  71. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776745800000.json +1 -0
  72. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776746700000.json +1 -0
  73. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776747600000.json +1 -0
  74. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776748500000.json +1 -0
  75. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776749400000.json +1 -0
  76. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776750300000.json +1 -0
  77. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776751200000.json +1 -0
  78. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776752100000.json +1 -0
  79. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776753000000.json +1 -0
  80. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776753900000.json +1 -0
  81. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776754800000.json +1 -0
  82. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776755700000.json +1 -0
  83. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776756600000.json +1 -0
  84. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776757500000.json +1 -0
  85. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776758400000.json +1 -0
  86. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776759300000.json +1 -0
  87. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776760200000.json +1 -0
  88. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776761100000.json +1 -0
  89. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776762000000.json +1 -0
  90. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776762900000.json +1 -0
  91. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776763800000.json +1 -0
  92. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776764700000.json +1 -0
  93. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776765600000.json +1 -0
  94. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776766500000.json +1 -0
  95. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776767400000.json +1 -0
  96. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776768300000.json +1 -0
  97. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776769200000.json +1 -0
  98. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776770100000.json +1 -0
  99. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776771000000.json +1 -0
  100. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776771900000.json +1 -0
  101. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776772800000.json +1 -0
  102. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776773700000.json +1 -0
  103. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776774600000.json +1 -0
  104. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776775500000.json +1 -0
  105. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776776400000.json +1 -0
  106. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776777300000.json +1 -0
  107. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776778200000.json +1 -0
  108. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776779100000.json +1 -0
  109. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776780000000.json +1 -0
  110. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776780900000.json +1 -0
  111. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776781800000.json +1 -0
  112. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776782700000.json +1 -0
  113. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776783600000.json +1 -0
  114. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776784500000.json +1 -0
  115. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776785400000.json +1 -0
  116. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776786300000.json +1 -0
  117. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776787200000.json +1 -0
  118. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776788100000.json +1 -0
  119. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776789000000.json +1 -0
  120. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776789900000.json +1 -0
  121. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776790800000.json +1 -0
  122. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776791700000.json +1 -0
  123. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776792600000.json +1 -0
  124. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776793500000.json +1 -0
  125. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776794400000.json +1 -0
  126. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776795300000.json +1 -0
  127. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776796200000.json +1 -0
  128. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776797100000.json +1 -0
  129. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776798000000.json +1 -0
  130. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776798900000.json +1 -0
  131. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776799800000.json +1 -0
  132. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776800700000.json +1 -0
  133. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776801600000.json +1 -0
  134. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776802500000.json +1 -0
  135. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776803400000.json +1 -0
  136. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776804300000.json +1 -0
  137. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776805200000.json +1 -0
  138. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776806100000.json +1 -0
  139. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776807000000.json +1 -0
  140. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776807900000.json +1 -0
  141. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776808800000.json +1 -0
  142. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776809700000.json +1 -0
  143. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776810600000.json +1 -0
  144. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776811500000.json +1 -0
  145. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776812400000.json +1 -0
  146. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776813300000.json +1 -0
  147. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776814200000.json +1 -0
  148. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776815100000.json +1 -0
  149. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776816000000.json +1 -0
  150. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776816900000.json +1 -0
  151. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776817800000.json +1 -0
  152. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776818700000.json +1 -0
  153. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776819600000.json +1 -0
  154. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776820500000.json +1 -0
  155. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776821400000.json +1 -0
  156. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776822300000.json +1 -0
  157. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776823200000.json +1 -0
  158. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776824100000.json +1 -0
  159. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776825000000.json +1 -0
  160. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776825900000.json +1 -0
  161. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776826800000.json +1 -0
  162. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776827700000.json +1 -0
  163. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776828600000.json +1 -0
  164. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776829500000.json +1 -0
  165. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776830400000.json +1 -0
  166. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776831300000.json +1 -0
  167. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776832200000.json +1 -0
  168. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776833100000.json +1 -0
  169. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776834000000.json +1 -0
  170. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776834900000.json +1 -0
  171. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776835800000.json +1 -0
  172. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776836700000.json +1 -0
  173. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776837600000.json +1 -0
  174. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776838500000.json +1 -0
  175. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776839400000.json +1 -0
  176. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776840300000.json +1 -0
  177. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776841200000.json +1 -0
  178. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776842100000.json +1 -0
  179. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776843000000.json +1 -0
  180. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776843900000.json +1 -0
  181. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776844800000.json +1 -0
  182. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776845700000.json +1 -0
  183. package/build/dump/data/candle/default_exchange/BTCUSDT/15m/1776846600000.json +1 -0
  184. package/build/error.txt +770 -0
  185. package/build/index.cjs +356 -148
  186. package/build/index.mjs +359 -151
  187. package/config/notification.config.mjs +13 -0
  188. package/config/symbol.config.mjs +460 -0
  189. package/package.json +16 -15
  190. package/template/average-buy.mustache +2 -0
  191. package/template/breakeven.mustache +2 -0
  192. package/template/cancel-scheduled.mustache +1 -1
  193. package/template/cancelled.mustache +2 -0
  194. package/template/close-pending.mustache +2 -0
  195. package/template/closed.mustache +2 -0
  196. package/template/opened.mustache +2 -0
  197. package/template/partial-loss.mustache +2 -0
  198. package/template/partial-profit.mustache +2 -0
  199. package/template/project/package.mustache +7 -7
  200. package/template/scheduled.mustache +2 -0
  201. package/template/signal-close.mustache +2 -0
  202. package/template/signal-open.mustache +2 -0
  203. package/template/trailing-stop.mustache +2 -0
  204. package/template/trailing-take.mustache +2 -0
  205. package/types.d.ts +146 -38
  206. /package/template/project/config/{symbol.config.cjs → symbol.config.ts} +0 -0
package/README.md CHANGED
@@ -420,6 +420,89 @@ http://localhost:60050
420
420
 
421
421
  Customize host/port via environment variables `CC_WWWROOT_HOST` and `CC_WWWROOT_PORT`.
422
422
 
423
+ #### Symbol List (`symbol.config`)
424
+
425
+ By default the UI shows all symbols from the exchange. To restrict or reorder the list, create a `config/symbol.config` file in your strategy directory (next to the entry point).
426
+
427
+ **Resolution order — first match wins:**
428
+
429
+ | Priority | Path | Notes |
430
+ |----------|------|-------|
431
+ | 1 | `{strategyDir}/config/symbol.config` | per-strategy override (cwd after `chdir`) |
432
+ | 2 | `{projectRoot}/config/symbol.config` | project-root override (cwd where `npx` was invoked) |
433
+ | 3 | `@backtest-kit/cli/config/symbol.config` | built-in default shipped with the package |
434
+
435
+ Supported file formats (`.ts`, `.cjs`, `.mjs`, `.js` tried automatically):
436
+
437
+ ```ts
438
+ // config/symbol.config.ts
439
+ export const symbol_list = [
440
+ {
441
+ icon: "/icon/btc.png",
442
+ logo: "/icon/128/btc.png",
443
+ symbol: "BTCUSDT",
444
+ displayName: "Bitcoin",
445
+ color: "#F7931A",
446
+ priority: 50,
447
+ description: "Bitcoin - the first and most popular cryptocurrency",
448
+ },
449
+ {
450
+ icon: "/icon/eth.png",
451
+ logo: "/icon/128/eth.png",
452
+ symbol: "ETHUSDT",
453
+ displayName: "Ethereum",
454
+ color: "#6F42C1",
455
+ priority: 50,
456
+ description: "Ethereum - a blockchain platform for smart contracts",
457
+ },
458
+ ];
459
+ ```
460
+
461
+ #### Notification Filter (`notification.config`)
462
+
463
+ Controls which notification categories are shown in the UI dashboard. Create a `config/notification.config` file in your strategy directory to override the defaults.
464
+
465
+ **Resolution order — first match wins:**
466
+
467
+ | Priority | Path | Notes |
468
+ |----------|------|-------|
469
+ | 1 | `{strategyDir}/config/notification.config` | per-strategy override (cwd after `chdir`) |
470
+ | 2 | `{projectRoot}/config/notification.config` | project-root override (cwd where `npx` was invoked) |
471
+ | 3 | `@backtest-kit/cli/config/notification.config` | built-in default shipped with the package |
472
+
473
+ **Default values (built-in):**
474
+
475
+ | Key | Default | Description |
476
+ |-----|---------|-------------|
477
+ | `signal` | `true` | Signal lifecycle: opened, scheduled, closed, cancelled |
478
+ | `risk` | `true` | Risk manager rejection notifications |
479
+ | `info` | `true` | Informational messages attached to an active signal |
480
+ | `breakeven` | `true` | Breakeven level reached |
481
+ | `common_error` | `true` | Non-fatal runtime errors |
482
+ | `critical_error` | `true` | Fatal errors that terminate the session |
483
+ | `validation_error` | `true` | Strategy config / input validation errors |
484
+ | `strategy_commit` | `true` | All committed actions (partial close, DCA, trailing, etc.) |
485
+ | `partial_loss` | `false` | Partial loss level reached (before commit) |
486
+ | `partial_profit` | `false` | Partial profit level reached (before commit) |
487
+ | `signal_sync` | `false` | Live order fill / exit confirmations from exchange sync |
488
+
489
+ ```js
490
+ // config/notification.config.ts
491
+ export default {
492
+ signal: true,
493
+ risk: true,
494
+ info: true,
495
+ breakeven: true,
496
+ common_error: true,
497
+ critical_error: true,
498
+ validation_error: true,
499
+ strategy_commit: true,
500
+ partial_loss: false,
501
+ partial_profit: false,
502
+ signal_sync: false,
503
+ };
504
+ ```
505
+
423
506
  ### Telegram Notifications (`--telegram`)
424
507
 
425
508
  Sends formatted HTML messages with 1m / 15m / 1h price charts to your Telegram channel for every position event: opened, closed, scheduled, cancelled, risk rejection, partial profit/loss, trailing stop/take, and breakeven.
@@ -514,6 +597,42 @@ Broker.useBrokerAdapter(MyBroker);
514
597
  Broker.enable();
515
598
  ```
516
599
 
600
+ ## 🔀 Import Aliases (`alias.module`)
601
+
602
+ `@backtest-kit/cli` lets you override any nodejs module import — without touching the strategy code. Drop a `config/alias.module` file in your project root and export a mapping from module name to replacement module.
603
+
604
+ The alias table is loaded once (on the first `import` call) from `{projectRoot}/config/alias.module` and applied globally to every subsequent module load via `require`/ `import`.
605
+
606
+ **Use cases:**
607
+
608
+ - Replace a heavy dependency with a lighter stub for backtesting
609
+ - Swap any external api for a mock during CI runs
610
+
611
+ ```ts
612
+ // config/alias.module.ts — named export
613
+ export const ccxt = require("./stubs/ccxt.stub.cjs");
614
+ ```
615
+
616
+ ```js
617
+ // config/alias.module.cjs — default export
618
+ module.exports = {
619
+ ccxt: require("./stubs/ccxt.stub.cjs"),
620
+ };
621
+ ```
622
+
623
+ ```js
624
+ // config/alias.module.mjs — default export
625
+ import ccxtStub from "./stubs/ccxt.stub.mjs";
626
+
627
+ export default {
628
+ ccxt: ccxtStub,
629
+ };
630
+ ```
631
+
632
+ **How it works:** when strategy code calls `require("ccxt")`, the loader checks `IMPORT_ALIAS` first. If a key matches, the mapped value is returned instead of the real module — no monkey-patching of `node_modules` needed.
633
+
634
+ **Important:** It is **not** per-strategy — it applies to all modules loaded in the current process.
635
+
517
636
  ## 📦 Supported Entry Point Formats
518
637
 
519
638
  `@backtest-kit/cli` automatically detects the format of your strategy file and loads it with the appropriate runtime — no flags or configuration required.
@@ -0,0 +1 @@
1
+ {"timestamp":1776683700000,"open":75171.24,"high":75266.46,"low":75059.39,"close":75170.49,"volume":75.67269}
@@ -0,0 +1 @@
1
+ {"timestamp":1776684600000,"open":75170.49,"high":75287.88,"low":75083.22,"close":75215.78,"volume":60.00404}
@@ -0,0 +1 @@
1
+ {"timestamp":1776685500000,"open":75215.78,"high":75274.85,"low":75149.98,"close":75192.71,"volume":74.68719}
@@ -0,0 +1 @@
1
+ {"timestamp":1776686400000,"open":75192.72,"high":75393.55,"low":75075.04,"close":75354.1,"volume":114.58486}
@@ -0,0 +1 @@
1
+ {"timestamp":1776687300000,"open":75354.09,"high":75650,"low":75294.61,"close":75412.1,"volume":285.7306}
@@ -0,0 +1 @@
1
+ {"timestamp":1776688200000,"open":75412.1,"high":75450,"low":75043.86,"close":75215.38,"volume":196.21933}
@@ -0,0 +1 @@
1
+ {"timestamp":1776689100000,"open":75215.39,"high":75378.92,"low":75215.39,"close":75289.9,"volume":102.32005}
@@ -0,0 +1 @@
1
+ {"timestamp":1776690000000,"open":75289.91,"high":75350,"low":75120.05,"close":75221.38,"volume":160.83549}
@@ -0,0 +1 @@
1
+ {"timestamp":1776690900000,"open":75221.38,"high":75267.52,"low":75000,"close":75192.79,"volume":154.46322}
@@ -0,0 +1 @@
1
+ {"timestamp":1776691800000,"open":75192.8,"high":75434.41,"low":74859.11,"close":75227.04,"volume":281.95982}
@@ -0,0 +1 @@
1
+ {"timestamp":1776692700000,"open":75227.03,"high":75321.31,"low":74972.44,"close":75269.38,"volume":176.8324}
@@ -0,0 +1 @@
1
+ {"timestamp":1776693600000,"open":75269.37,"high":75300,"low":75030,"close":75070.99,"volume":191.65591}
@@ -0,0 +1 @@
1
+ {"timestamp":1776694500000,"open":75070.98,"high":75766.74,"low":75030.73,"close":75570.61,"volume":308.04668}
@@ -0,0 +1 @@
1
+ {"timestamp":1776695400000,"open":75570.61,"high":75669.82,"low":75200,"close":75329.8,"volume":190.41965}
@@ -0,0 +1 @@
1
+ {"timestamp":1776696300000,"open":75329.79,"high":75435.11,"low":74921.42,"close":75034.79,"volume":357.08704}
@@ -0,0 +1 @@
1
+ {"timestamp":1776697200000,"open":75034.79,"high":75081.9,"low":74702,"close":75063.13,"volume":354.98685}
@@ -0,0 +1 @@
1
+ {"timestamp":1776698100000,"open":75063.13,"high":75772.72,"low":75042.02,"close":75754.4,"volume":444.26314}
@@ -0,0 +1 @@
1
+ {"timestamp":1776699000000,"open":75754.39,"high":75754.39,"low":75516.65,"close":75580.57,"volume":255.58983}
@@ -0,0 +1 @@
1
+ {"timestamp":1776699900000,"open":75580.56,"high":75729.5,"low":75541.15,"close":75716.77,"volume":142.11278}
@@ -0,0 +1 @@
1
+ {"timestamp":1776700800000,"open":75716.78,"high":75723.99,"low":75409.72,"close":75419.01,"volume":200.89812}
@@ -0,0 +1 @@
1
+ {"timestamp":1776701700000,"open":75419.01,"high":75516.64,"low":75325.84,"close":75359.76,"volume":174.21177}
@@ -0,0 +1 @@
1
+ {"timestamp":1776702600000,"open":75359.77,"high":75568.81,"low":75311.25,"close":75481.83,"volume":168.4888}
@@ -0,0 +1 @@
1
+ {"timestamp":1776703500000,"open":75481.83,"high":75558.6,"low":75299.26,"close":75338.74,"volume":87.11836}
@@ -0,0 +1 @@
1
+ {"timestamp":1776704400000,"open":75338.75,"high":75683.46,"low":75289.92,"close":75644.87,"volume":146.38758}
@@ -0,0 +1 @@
1
+ {"timestamp":1776705300000,"open":75644.87,"high":75887.99,"low":75607.22,"close":75719.67,"volume":153.4664}
@@ -0,0 +1 @@
1
+ {"timestamp":1776706200000,"open":75719.67,"high":75844.58,"low":75607.83,"close":75762.03,"volume":155.23886}
@@ -0,0 +1 @@
1
+ {"timestamp":1776707100000,"open":75762.04,"high":75991.47,"low":75697.1,"close":75898.14,"volume":187.51761}
@@ -0,0 +1 @@
1
+ {"timestamp":1776708000000,"open":75898.14,"high":76300,"low":75898.14,"close":76275.24,"volume":482.8632}
@@ -0,0 +1 @@
1
+ {"timestamp":1776708900000,"open":76275.24,"high":76319.99,"low":76082.94,"close":76102,"volume":289.18541}
@@ -0,0 +1 @@
1
+ {"timestamp":1776709800000,"open":76102,"high":76268.78,"low":76001,"close":76173.07,"volume":356.45546}
@@ -0,0 +1 @@
1
+ {"timestamp":1776710700000,"open":76173.06,"high":76453.19,"low":76097.28,"close":76423.69,"volume":416.25896}
@@ -0,0 +1 @@
1
+ {"timestamp":1776711600000,"open":76423.69,"high":76486.67,"low":76302.98,"close":76333.75,"volume":416.51485}
@@ -0,0 +1 @@
1
+ {"timestamp":1776712500000,"open":76333.74,"high":76338.48,"low":76157.76,"close":76211.09,"volume":388.98859}
@@ -0,0 +1 @@
1
+ {"timestamp":1776713400000,"open":76211.09,"high":76257.79,"low":76154.49,"close":76250.57,"volume":66.67309}
@@ -0,0 +1 @@
1
+ {"timestamp":1776714300000,"open":76250.57,"high":76347.45,"low":76209.07,"close":76296.96,"volume":495.9459}
@@ -0,0 +1 @@
1
+ {"timestamp":1776715200000,"open":76296.97,"high":76372.86,"low":76113.07,"close":76333.2,"volume":456.65791}
@@ -0,0 +1 @@
1
+ {"timestamp":1776716100000,"open":76333.2,"high":76558.62,"low":76297.57,"close":76325.12,"volume":283.34142}
@@ -0,0 +1 @@
1
+ {"timestamp":1776717000000,"open":76325.12,"high":76325.13,"low":76199.94,"close":76250.81,"volume":373.19763}
@@ -0,0 +1 @@
1
+ {"timestamp":1776717900000,"open":76250.81,"high":76311.91,"low":76237.57,"close":76276.17,"volume":305.66054}
@@ -0,0 +1 @@
1
+ {"timestamp":1776718800000,"open":76276.18,"high":76357.2,"low":75918.07,"close":76004.79,"volume":222.08014}
@@ -0,0 +1 @@
1
+ {"timestamp":1776719700000,"open":76004.8,"high":76037.57,"low":75854.54,"close":75926.87,"volume":78.18997}
@@ -0,0 +1 @@
1
+ {"timestamp":1776720600000,"open":75926.87,"high":75945.05,"low":75784.05,"close":75888.73,"volume":147.87715}
@@ -0,0 +1 @@
1
+ {"timestamp":1776721500000,"open":75888.73,"high":75968.25,"low":75857.59,"close":75954.71,"volume":75.13506}
@@ -0,0 +1 @@
1
+ {"timestamp":1776722400000,"open":75954.72,"high":76143.71,"low":75954.72,"close":76067.97,"volume":66.9225}
@@ -0,0 +1 @@
1
+ {"timestamp":1776723300000,"open":76067.96,"high":76108.43,"low":75904.39,"close":75919.99,"volume":41.88771}
@@ -0,0 +1 @@
1
+ {"timestamp":1776724200000,"open":75920,"high":76066.87,"low":75904.83,"close":75991.55,"volume":45.0822}
@@ -0,0 +1 @@
1
+ {"timestamp":1776725100000,"open":75991.55,"high":75995.53,"low":75928.27,"close":75974.24,"volume":66.74929}
@@ -0,0 +1 @@
1
+ {"timestamp":1776726000000,"open":75974.24,"high":75974.24,"low":75727,"close":75753.42,"volume":140.13306}
@@ -0,0 +1 @@
1
+ {"timestamp":1776726900000,"open":75753.41,"high":75755.95,"low":75617.6,"close":75658,"volume":80.34183}
@@ -0,0 +1 @@
1
+ {"timestamp":1776727800000,"open":75657.99,"high":75806.8,"low":75636.75,"close":75775.52,"volume":30.94625}
@@ -0,0 +1 @@
1
+ {"timestamp":1776728700000,"open":75775.53,"high":75882.81,"low":75757.51,"close":75840.97,"volume":50.36362}
@@ -0,0 +1 @@
1
+ {"timestamp":1776729600000,"open":75840.97,"high":75924.42,"low":75700,"close":75867.21,"volume":91.7639}
@@ -0,0 +1 @@
1
+ {"timestamp":1776730500000,"open":75867.21,"high":75928.63,"low":75808.18,"close":75909.51,"volume":61.83046}
@@ -0,0 +1 @@
1
+ {"timestamp":1776731400000,"open":75909.51,"high":75993.22,"low":75861.58,"close":75881.61,"volume":132.02951}
@@ -0,0 +1 @@
1
+ {"timestamp":1776732300000,"open":75881.62,"high":76099.19,"low":75881.61,"close":76092.45,"volume":143.33444}
@@ -0,0 +1 @@
1
+ {"timestamp":1776733200000,"open":76092.46,"high":76263.4,"low":76024.72,"close":76129.94,"volume":171.28396}
@@ -0,0 +1 @@
1
+ {"timestamp":1776734100000,"open":76129.94,"high":76142.49,"low":75987.94,"close":76133.01,"volume":101.58182}
@@ -0,0 +1 @@
1
+ {"timestamp":1776735000000,"open":76133,"high":76226.4,"low":75990.82,"close":76072.2,"volume":62.03411}
@@ -0,0 +1 @@
1
+ {"timestamp":1776735900000,"open":76072.2,"high":76072.21,"low":75866.01,"close":75927.59,"volume":56.23604}
@@ -0,0 +1 @@
1
+ {"timestamp":1776736800000,"open":75927.58,"high":75932.7,"low":75703.61,"close":75731.99,"volume":93.53487}
@@ -0,0 +1 @@
1
+ {"timestamp":1776737700000,"open":75732,"high":75794.34,"low":75691.03,"close":75721.38,"volume":301.35013}
@@ -0,0 +1 @@
1
+ {"timestamp":1776738600000,"open":75721.39,"high":75797.94,"low":75600,"close":75603.87,"volume":76.01029}
@@ -0,0 +1 @@
1
+ {"timestamp":1776739500000,"open":75603.88,"high":75672.42,"low":75580,"close":75581.33,"volume":65.19812}
@@ -0,0 +1 @@
1
+ {"timestamp":1776740400000,"open":75581.33,"high":75635.78,"low":75474.77,"close":75568.07,"volume":108.48875}
@@ -0,0 +1 @@
1
+ {"timestamp":1776741300000,"open":75568.07,"high":75663.09,"low":75500.01,"close":75630.58,"volume":43.28465}
@@ -0,0 +1 @@
1
+ {"timestamp":1776742200000,"open":75630.57,"high":75720.84,"low":75492.67,"close":75556.81,"volume":47.02629}
@@ -0,0 +1 @@
1
+ {"timestamp":1776743100000,"open":75556.81,"high":75721.12,"low":75548.82,"close":75710.3,"volume":57.45181}
@@ -0,0 +1 @@
1
+ {"timestamp":1776744000000,"open":75710.31,"high":75763.07,"low":75611.05,"close":75611.05,"volume":55.57354}
@@ -0,0 +1 @@
1
+ {"timestamp":1776744900000,"open":75611.05,"high":75712.89,"low":75600,"close":75633.63,"volume":56.2265}
@@ -0,0 +1 @@
1
+ {"timestamp":1776745800000,"open":75633.63,"high":75729.46,"low":75623.2,"close":75711.19,"volume":83.72791}
@@ -0,0 +1 @@
1
+ {"timestamp":1776746700000,"open":75711.19,"high":75823.49,"low":75689.91,"close":75813.81,"volume":64.11478}
@@ -0,0 +1 @@
1
+ {"timestamp":1776747600000,"open":75813.8,"high":75970.68,"low":75804,"close":75900,"volume":76.53564}
@@ -0,0 +1 @@
1
+ {"timestamp":1776748500000,"open":75900,"high":75981.1,"low":75850,"close":75892.42,"volume":137.47972}
@@ -0,0 +1 @@
1
+ {"timestamp":1776749400000,"open":75892.41,"high":75892.42,"low":75829.79,"close":75841.62,"volume":36.78141}
@@ -0,0 +1 @@
1
+ {"timestamp":1776750300000,"open":75841.62,"high":75841.62,"low":75782.75,"close":75802,"volume":70.74181}
@@ -0,0 +1 @@
1
+ {"timestamp":1776751200000,"open":75802,"high":75817.54,"low":75734.15,"close":75788.54,"volume":61.47036}
@@ -0,0 +1 @@
1
+ {"timestamp":1776752100000,"open":75788.53,"high":75800.06,"low":75703.85,"close":75760.41,"volume":90.74332}
@@ -0,0 +1 @@
1
+ {"timestamp":1776753000000,"open":75760.41,"high":76129.95,"low":75760.41,"close":75992.06,"volume":196.79828}
@@ -0,0 +1 @@
1
+ {"timestamp":1776753900000,"open":75992.07,"high":76045.71,"low":75964.29,"close":75974.11,"volume":59.86143}
@@ -0,0 +1 @@
1
+ {"timestamp":1776754800000,"open":75974.12,"high":75982.13,"low":75814.26,"close":75955.87,"volume":62.28449}
@@ -0,0 +1 @@
1
+ {"timestamp":1776755700000,"open":75955.88,"high":76300,"low":75938,"close":76179.82,"volume":126.24421}
@@ -0,0 +1 @@
1
+ {"timestamp":1776756600000,"open":76179.82,"high":76300,"low":76028.7,"close":76194.84,"volume":644.42642}
@@ -0,0 +1 @@
1
+ {"timestamp":1776757500000,"open":76194.84,"high":76293.36,"low":76084.33,"close":76084.34,"volume":403.76936}
@@ -0,0 +1 @@
1
+ {"timestamp":1776758400000,"open":76084.34,"high":76211.79,"low":76063.98,"close":76132.47,"volume":138.29505}
@@ -0,0 +1 @@
1
+ {"timestamp":1776759300000,"open":76132.46,"high":76370,"low":76115.62,"close":76352.16,"volume":160.37389}
@@ -0,0 +1 @@
1
+ {"timestamp":1776760200000,"open":76352.15,"high":76496.68,"low":76250,"close":76458.78,"volume":163.12362}
@@ -0,0 +1 @@
1
+ {"timestamp":1776761100000,"open":76458.78,"high":76927.57,"low":76419.87,"close":76507.21,"volume":453.44527}
@@ -0,0 +1 @@
1
+ {"timestamp":1776762000000,"open":76507.21,"high":76587.82,"low":76349.82,"close":76476.68,"volume":171.60279}
@@ -0,0 +1 @@
1
+ {"timestamp":1776762900000,"open":76476.69,"high":76531,"low":76196.05,"close":76246.75,"volume":144.17409}
@@ -0,0 +1 @@
1
+ {"timestamp":1776763800000,"open":76246.76,"high":76322.27,"low":76155,"close":76301.26,"volume":171.16386}
@@ -0,0 +1 @@
1
+ {"timestamp":1776764700000,"open":76301.25,"high":76381.61,"low":76250,"close":76362.77,"volume":95.73163}
@@ -0,0 +1 @@
1
+ {"timestamp":1776765600000,"open":76362.78,"high":76502.72,"low":76349.59,"close":76438,"volume":94.09326}
@@ -0,0 +1 @@
1
+ {"timestamp":1776766500000,"open":76437.99,"high":76574,"low":76373.03,"close":76511.72,"volume":150.95596}
@@ -0,0 +1 @@
1
+ {"timestamp":1776767400000,"open":76511.73,"high":76598.56,"low":76471.27,"close":76572.11,"volume":65.36969}
@@ -0,0 +1 @@
1
+ {"timestamp":1776768300000,"open":76572.1,"high":76866.55,"low":76550.86,"close":76746.41,"volume":225.92352}
@@ -0,0 +1 @@
1
+ {"timestamp":1776769200000,"open":76746.41,"high":76750.68,"low":76344.34,"close":76405.37,"volume":284.49354}
@@ -0,0 +1 @@
1
+ {"timestamp":1776770100000,"open":76405.37,"high":76723.87,"low":76342,"close":76669.07,"volume":110.80477}
@@ -0,0 +1 @@
1
+ {"timestamp":1776771000000,"open":76669.07,"high":76691.98,"low":76468.24,"close":76473.9,"volume":128.78949}
@@ -0,0 +1 @@
1
+ {"timestamp":1776771900000,"open":76473.9,"high":76491.6,"low":76417.16,"close":76452.94,"volume":100.85504}
@@ -0,0 +1 @@
1
+ {"timestamp":1776772800000,"open":76452.94,"high":76494.11,"low":76258.76,"close":76258.76,"volume":166.23576}
@@ -0,0 +1 @@
1
+ {"timestamp":1776773700000,"open":76258.76,"high":76386.59,"low":76247.09,"close":76381.19,"volume":81.50503}
@@ -0,0 +1 @@
1
+ {"timestamp":1776774600000,"open":76381.2,"high":76528.11,"low":75709.03,"close":75829.94,"volume":572.65126}
@@ -0,0 +1 @@
1
+ {"timestamp":1776775500000,"open":75829.95,"high":76059.79,"low":75745.13,"close":76009.46,"volume":219.3931}
@@ -0,0 +1 @@
1
+ {"timestamp":1776776400000,"open":76009.46,"high":76088.52,"low":75900,"close":75991.69,"volume":145.66039}
@@ -0,0 +1 @@
1
+ {"timestamp":1776777300000,"open":75991.39,"high":76129.95,"low":75970,"close":76029.46,"volume":172.76432}
@@ -0,0 +1 @@
1
+ {"timestamp":1776778200000,"open":76029.46,"high":76179.75,"low":75736.33,"close":76012.01,"volume":208.18676}
@@ -0,0 +1 @@
1
+ {"timestamp":1776779100000,"open":76012,"high":76053.99,"low":75770.65,"close":75899.98,"volume":159.47346}
@@ -0,0 +1 @@
1
+ {"timestamp":1776780000000,"open":75899.98,"high":75933.37,"low":75700,"close":75838.23,"volume":140.20521}
@@ -0,0 +1 @@
1
+ {"timestamp":1776780900000,"open":75838.24,"high":76300.73,"low":75838.24,"close":76117.39,"volume":205.29244}
@@ -0,0 +1 @@
1
+ {"timestamp":1776781800000,"open":76117.38,"high":76595.3,"low":76110.29,"close":76463.52,"volume":245.90564}
@@ -0,0 +1 @@
1
+ {"timestamp":1776782700000,"open":76463.51,"high":76472.85,"low":75625.28,"close":75675.05,"volume":357.81082}
@@ -0,0 +1 @@
1
+ {"timestamp":1776783600000,"open":75675.04,"high":75850,"low":75430.62,"close":75771.19,"volume":364.38283}
@@ -0,0 +1 @@
1
+ {"timestamp":1776784500000,"open":75771.18,"high":75979.78,"low":75594,"close":75694.9,"volume":198.01278}
@@ -0,0 +1 @@
1
+ {"timestamp":1776785400000,"open":75694.9,"high":75820.19,"low":75529.98,"close":75701.5,"volume":229.62202}
@@ -0,0 +1 @@
1
+ {"timestamp":1776786300000,"open":75701.5,"high":75834.66,"low":75620,"close":75834.65,"volume":131.84388}
@@ -0,0 +1 @@
1
+ {"timestamp":1776787200000,"open":75834.66,"high":76001,"low":75822.71,"close":75960.96,"volume":149.99777}
@@ -0,0 +1 @@
1
+ {"timestamp":1776788100000,"open":75960.97,"high":75986.36,"low":75846,"close":75863.67,"volume":114.50794}
@@ -0,0 +1 @@
1
+ {"timestamp":1776789000000,"open":75863.67,"high":76190.72,"low":75845.22,"close":75891.52,"volume":136.05428}
@@ -0,0 +1 @@
1
+ {"timestamp":1776789900000,"open":75891.52,"high":76046,"low":75760,"close":75781.18,"volume":95.77065}
@@ -0,0 +1 @@
1
+ {"timestamp":1776790800000,"open":75781.19,"high":75822.38,"low":75441.2,"close":75540.23,"volume":220.26982}
@@ -0,0 +1 @@
1
+ {"timestamp":1776791700000,"open":75540.24,"high":75549.42,"low":75052.64,"close":75332.73,"volume":356.55047}
@@ -0,0 +1 @@
1
+ {"timestamp":1776792600000,"open":75332.73,"high":75912.98,"low":75273.03,"close":75768.03,"volume":306.19375}
@@ -0,0 +1 @@
1
+ {"timestamp":1776793500000,"open":75768.02,"high":75820,"low":75506.95,"close":75545.62,"volume":112.07056}
@@ -0,0 +1 @@
1
+ {"timestamp":1776794400000,"open":75545.62,"high":75639.52,"low":75495.55,"close":75582.15,"volume":83.62864}
@@ -0,0 +1 @@
1
+ {"timestamp":1776795300000,"open":75582.15,"high":75668.24,"low":75380,"close":75475.53,"volume":172.92203}