dexbot 1.4.13 → 1.4.15

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 (330) hide show
  1. package/README.md +77 -68
  2. package/claw/data/positions.json +3391 -1
  3. package/claw/docs/AI_BOT_LIBRARY_API.md +1 -1
  4. package/claw/docs/POSITION_HEALTH.md +2 -2
  5. package/claw/modules/claw_catalog.ts +1 -3
  6. package/claw/modules/claw_launcher.ts +2 -3
  7. package/claw/modules/claw_skill_md.ts +1 -1
  8. package/claw/modules/decision_loop.ts +1 -1
  9. package/claw/modules/dexbot_profiles.ts +2 -33
  10. package/claw/modules/feed_price_source.ts +3 -32
  11. package/claw/modules/launcher_mode_detector.ts +1 -1
  12. package/claw/modules/mcp_utils.ts +1 -1
  13. package/claw/modules/mpa_utils.ts +36 -1
  14. package/claw/modules/position_discovery.ts +1 -28
  15. package/claw/modules/position_health.ts +1 -20
  16. package/claw/modules/position_manager.ts +3 -28
  17. package/claw/modules/skill_utils.ts +1 -1
  18. package/claw/modules/types.ts +0 -53
  19. package/claw/package.json +1 -1
  20. package/claw/runtimes/openclaw-plugin/openclaw.plugin.json +1 -1
  21. package/claw/runtimes/openclaw-plugin/package.json +1 -1
  22. package/claw/skills/margin-trading/references/honest-assets.md +1 -1
  23. package/claw/skills/margin-trading/references/position-management.md +2 -2
  24. package/claw/skills/shared/references/js-automation-overview.md +2 -2
  25. package/claw/skills/trend-detection/references/service.md +24 -17
  26. package/claw/tests/test_claw_bridge.ts +47 -47
  27. package/claw/tests/test_claw_catalog_and_credentials.ts +9 -9
  28. package/claw/tests/test_claw_chain_layer.ts +54 -54
  29. package/claw/tests/test_claw_data_flow.ts +41 -41
  30. package/claw/tests/test_claw_domain_logic.ts +26 -26
  31. package/claw/tests/test_claw_manifest_and_matrix.ts +1 -1
  32. package/claw/tests/test_claw_mcp_transport.ts +16 -16
  33. package/claw/tests/test_claw_regressions.ts +43 -43
  34. package/claw/tests/test_claw_skill_generation.ts +1 -1
  35. package/claw/tests/test_claw_state_store.ts +2 -2
  36. package/claw/tests/test_dexbot_profiles.ts +4 -4
  37. package/claw/tests/test_memu_bridge.ts +3 -3
  38. package/claw/tests/test_nullclaw_tmp_integration.ts +1 -1
  39. package/claw/tests/test_position_health.ts +2 -2
  40. package/claw/tests/test_position_manager.ts +18 -18
  41. package/claw/tests/test_position_manager_watch_health.ts +2 -2
  42. package/claw/tests/test_short_mpa_strategy.ts +12 -12
  43. package/dist/analysis/chart_utils.d.ts +13 -1
  44. package/dist/analysis/chart_utils.d.ts.map +1 -1
  45. package/dist/analysis/chart_utils.js +16 -1
  46. package/dist/analysis/chart_utils.js.map +1 -1
  47. package/dist/analysis/math_utils.d.ts +8 -12
  48. package/dist/analysis/math_utils.d.ts.map +1 -1
  49. package/dist/analysis/math_utils.js +9 -75
  50. package/dist/analysis/math_utils.js.map +1 -1
  51. package/dist/analysis/tradingview/tradingview_uplot_chart_generator.js +4 -4
  52. package/dist/dexbot.d.ts.map +1 -1
  53. package/dist/dexbot.js +54 -35
  54. package/dist/dexbot.js.map +1 -1
  55. package/dist/market_adapter/candle_utils.d.ts +18 -1
  56. package/dist/market_adapter/candle_utils.d.ts.map +1 -1
  57. package/dist/market_adapter/candle_utils.js +50 -1
  58. package/dist/market_adapter/candle_utils.js.map +1 -1
  59. package/dist/market_adapter/core/config_normalizers.js +1 -1
  60. package/dist/market_adapter/core/config_normalizers.js.map +1 -1
  61. package/dist/market_adapter/core/kibana_client.d.ts +2 -2
  62. package/dist/market_adapter/core/kibana_client.js +2 -2
  63. package/dist/market_adapter/core/kibana_market_candles.d.ts +1 -87
  64. package/dist/market_adapter/core/kibana_market_candles.d.ts.map +1 -1
  65. package/dist/market_adapter/core/kibana_market_candles.js +1 -80
  66. package/dist/market_adapter/core/kibana_market_candles.js.map +1 -1
  67. package/dist/market_adapter/core/market_adapter_service.d.ts +0 -8
  68. package/dist/market_adapter/core/market_adapter_service.d.ts.map +1 -1
  69. package/dist/market_adapter/core/market_adapter_service.js +28 -115
  70. package/dist/market_adapter/core/market_adapter_service.js.map +1 -1
  71. package/dist/market_adapter/core/signals/hurst_analyzer.d.ts.map +1 -0
  72. package/dist/{analysis/trend_detection → market_adapter/core/signals}/hurst_analyzer.js +2 -2
  73. package/dist/market_adapter/core/signals/hurst_analyzer.js.map +1 -0
  74. package/dist/{analysis/trend_detection → market_adapter/core/signals}/kalman_trend_analyzer.d.ts +0 -1
  75. package/dist/market_adapter/core/signals/kalman_trend_analyzer.d.ts.map +1 -0
  76. package/dist/{analysis/trend_detection → market_adapter/core/signals}/kalman_trend_analyzer.js +2 -4
  77. package/dist/market_adapter/core/signals/kalman_trend_analyzer.js.map +1 -0
  78. package/dist/{analysis/trend_detection → market_adapter/core/signals}/kalman_velocity_smoothing.d.ts +25 -4
  79. package/dist/market_adapter/core/signals/kalman_velocity_smoothing.d.ts.map +1 -0
  80. package/dist/{analysis/trend_detection → market_adapter/core/signals}/kalman_velocity_smoothing.js +41 -19
  81. package/dist/market_adapter/core/signals/kalman_velocity_smoothing.js.map +1 -0
  82. package/dist/market_adapter/core/signals/permutation_entropy_analyzer.d.ts.map +1 -0
  83. package/dist/{analysis/trend_detection → market_adapter/core/signals}/permutation_entropy_analyzer.js +2 -2
  84. package/dist/market_adapter/core/signals/permutation_entropy_analyzer.js.map +1 -0
  85. package/dist/market_adapter/core/strategies/ama.d.ts +1 -19
  86. package/dist/market_adapter/core/strategies/ama.d.ts.map +1 -1
  87. package/dist/market_adapter/core/strategies/ama.js +1 -1
  88. package/dist/market_adapter/core/strategies/ama.js.map +1 -1
  89. package/dist/market_adapter/core/strategies/ama_slope_model.d.ts +2 -13
  90. package/dist/market_adapter/core/strategies/ama_slope_model.d.ts.map +1 -1
  91. package/dist/market_adapter/core/strategies/ama_slope_model.js +15 -26
  92. package/dist/market_adapter/core/strategies/ama_slope_model.js.map +1 -1
  93. package/dist/market_adapter/core/strategies/atr/calculator.d.ts +38 -3
  94. package/dist/market_adapter/core/strategies/atr/calculator.d.ts.map +1 -1
  95. package/dist/market_adapter/core/strategies/atr/calculator.js +84 -24
  96. package/dist/market_adapter/core/strategies/atr/calculator.js.map +1 -1
  97. package/dist/market_adapter/core/strategies/collateral_manager.d.ts +1 -1
  98. package/dist/market_adapter/core/strategies/collateral_manager.js +1 -1
  99. package/dist/market_adapter/core/strategies/dynamic_weight_series.d.ts +32 -0
  100. package/dist/market_adapter/core/strategies/dynamic_weight_series.d.ts.map +1 -0
  101. package/dist/market_adapter/core/strategies/dynamic_weight_series.js +136 -0
  102. package/dist/market_adapter/core/strategies/dynamic_weight_series.js.map +1 -0
  103. package/dist/market_adapter/core/strategies/regime_gate.d.ts +6 -21
  104. package/dist/market_adapter/core/strategies/regime_gate.d.ts.map +1 -1
  105. package/dist/market_adapter/core/strategies/regime_gate.js +11 -74
  106. package/dist/market_adapter/core/strategies/regime_gate.js.map +1 -1
  107. package/dist/market_adapter/core/strategies/regime_interp.d.ts +13 -0
  108. package/dist/market_adapter/core/strategies/regime_interp.d.ts.map +1 -0
  109. package/dist/market_adapter/core/strategies/regime_interp.js +74 -0
  110. package/dist/market_adapter/core/strategies/regime_interp.js.map +1 -0
  111. package/dist/market_adapter/core/strategies/volatility_shift.d.ts +22 -0
  112. package/dist/market_adapter/core/strategies/volatility_shift.d.ts.map +1 -0
  113. package/dist/market_adapter/core/strategies/volatility_shift.js +37 -0
  114. package/dist/market_adapter/core/strategies/volatility_shift.js.map +1 -0
  115. package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js +3 -4
  116. package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js.map +1 -1
  117. package/dist/market_adapter/inputs/fetch_lp_data.d.ts +1 -10
  118. package/dist/market_adapter/inputs/fetch_lp_data.d.ts.map +1 -1
  119. package/dist/market_adapter/inputs/fetch_lp_data.js +1 -1
  120. package/dist/market_adapter/inputs/fetch_lp_data.js.map +1 -1
  121. package/dist/market_adapter/lp_chart_core.d.ts.map +1 -1
  122. package/dist/market_adapter/lp_chart_core.js +0 -10
  123. package/dist/market_adapter/lp_chart_core.js.map +1 -1
  124. package/dist/market_adapter/lp_chart_runner.d.ts +1 -16
  125. package/dist/market_adapter/lp_chart_runner.d.ts.map +1 -1
  126. package/dist/market_adapter/lp_chart_runner.js +1 -15
  127. package/dist/market_adapter/lp_chart_runner.js.map +1 -1
  128. package/dist/market_adapter/market_adapter.d.ts +3 -3
  129. package/dist/market_adapter/market_adapter.d.ts.map +1 -1
  130. package/dist/market_adapter/market_adapter.js +6 -8
  131. package/dist/market_adapter/market_adapter.js.map +1 -1
  132. package/dist/market_adapter/merge_lp_data.js +5 -5
  133. package/dist/market_adapter/utils/adapter_client.d.ts +1 -3
  134. package/dist/market_adapter/utils/adapter_client.d.ts.map +1 -1
  135. package/dist/market_adapter/utils/adapter_client.js +1 -14
  136. package/dist/market_adapter/utils/adapter_client.js.map +1 -1
  137. package/dist/market_adapter/utils/data_discovery.d.ts.map +1 -1
  138. package/dist/market_adapter/utils/data_discovery.js +1 -2
  139. package/dist/market_adapter/utils/data_discovery.js.map +1 -1
  140. package/dist/market_adapter/utils/dynamic_grid_snapshot.d.ts +1 -3
  141. package/dist/market_adapter/utils/dynamic_grid_snapshot.d.ts.map +1 -1
  142. package/dist/market_adapter/utils/dynamic_grid_snapshot.js +1 -1
  143. package/dist/market_adapter/utils/dynamic_grid_snapshot.js.map +1 -1
  144. package/dist/market_adapter/utils/file_lock.d.ts +10 -2
  145. package/dist/market_adapter/utils/file_lock.d.ts.map +1 -1
  146. package/dist/market_adapter/utils/file_lock.js +171 -102
  147. package/dist/market_adapter/utils/file_lock.js.map +1 -1
  148. package/dist/market_adapter/utils/native_history.d.ts +1 -9
  149. package/dist/market_adapter/utils/native_history.d.ts.map +1 -1
  150. package/dist/market_adapter/utils/native_history.js +1 -21
  151. package/dist/market_adapter/utils/native_history.js.map +1 -1
  152. package/dist/modules/account_bots.d.ts +16 -38
  153. package/dist/modules/account_bots.d.ts.map +1 -1
  154. package/dist/modules/account_bots.js +16 -38
  155. package/dist/modules/account_bots.js.map +1 -1
  156. package/dist/modules/account_orders.d.ts +11 -11
  157. package/dist/modules/account_orders.d.ts.map +1 -1
  158. package/dist/modules/account_orders.js +11 -18
  159. package/dist/modules/account_orders.js.map +1 -1
  160. package/dist/modules/bitshares_client.d.ts +5 -8
  161. package/dist/modules/bitshares_client.d.ts.map +1 -1
  162. package/dist/modules/bitshares_client.js +6 -10
  163. package/dist/modules/bitshares_client.js.map +1 -1
  164. package/dist/modules/bots_file_lock.d.ts +8 -5
  165. package/dist/modules/bots_file_lock.d.ts.map +1 -1
  166. package/dist/modules/bots_file_lock.js +8 -5
  167. package/dist/modules/bots_file_lock.js.map +1 -1
  168. package/dist/modules/chain_keys.d.ts +31 -22
  169. package/dist/modules/chain_keys.d.ts.map +1 -1
  170. package/dist/modules/chain_keys.js +31 -22
  171. package/dist/modules/chain_keys.js.map +1 -1
  172. package/dist/modules/chain_orders.d.ts +52 -48
  173. package/dist/modules/chain_orders.d.ts.map +1 -1
  174. package/dist/modules/chain_orders.js +124 -49
  175. package/dist/modules/chain_orders.js.map +1 -1
  176. package/dist/modules/config.d.ts +3 -0
  177. package/dist/modules/config.d.ts.map +1 -1
  178. package/dist/modules/config.js +3 -0
  179. package/dist/modules/config.js.map +1 -1
  180. package/dist/modules/constants.d.ts +17 -13
  181. package/dist/modules/constants.d.ts.map +1 -1
  182. package/dist/modules/constants.js +42 -21
  183. package/dist/modules/constants.js.map +1 -1
  184. package/dist/modules/cr_planner.d.ts +2 -1
  185. package/dist/modules/cr_planner.d.ts.map +1 -1
  186. package/dist/modules/cr_planner.js +1 -1
  187. package/dist/modules/cr_planner.js.map +1 -1
  188. package/dist/modules/credential_policy.d.ts +6 -4
  189. package/dist/modules/credential_policy.d.ts.map +1 -1
  190. package/dist/modules/credential_policy.js +6 -4
  191. package/dist/modules/credential_policy.js.map +1 -1
  192. package/dist/modules/credit_runtime.d.ts.map +1 -1
  193. package/dist/modules/credit_runtime.js +4 -8
  194. package/dist/modules/credit_runtime.js.map +1 -1
  195. package/dist/modules/dexbot_class.d.ts +33 -88
  196. package/dist/modules/dexbot_class.d.ts.map +1 -1
  197. package/dist/modules/dexbot_class.js +36 -68
  198. package/dist/modules/dexbot_class.js.map +1 -1
  199. package/dist/modules/dexbot_cow_runtime.d.ts +7 -7
  200. package/dist/modules/dexbot_cow_runtime.d.ts.map +1 -1
  201. package/dist/modules/dexbot_cow_runtime.js +7 -7
  202. package/dist/modules/dexbot_cow_runtime.js.map +1 -1
  203. package/dist/modules/dexbot_credential_client.d.ts +3 -3
  204. package/dist/modules/dexbot_credential_client.js +3 -3
  205. package/dist/modules/dexbot_credential_client.js.map +1 -1
  206. package/dist/modules/dexbot_fill_runtime.d.ts +1 -7
  207. package/dist/modules/dexbot_fill_runtime.d.ts.map +1 -1
  208. package/dist/modules/dexbot_fill_runtime.js +1 -9
  209. package/dist/modules/dexbot_fill_runtime.js.map +1 -1
  210. package/dist/modules/dexbot_maintenance_runtime.d.ts.map +1 -1
  211. package/dist/modules/dexbot_maintenance_runtime.js +3 -1
  212. package/dist/modules/dexbot_maintenance_runtime.js.map +1 -1
  213. package/dist/modules/dexbot_state_recovery.d.ts.map +1 -1
  214. package/dist/modules/dexbot_state_recovery.js +99 -1
  215. package/dist/modules/dexbot_state_recovery.js.map +1 -1
  216. package/dist/modules/graceful_shutdown.d.ts +4 -2
  217. package/dist/modules/graceful_shutdown.d.ts.map +1 -1
  218. package/dist/modules/graceful_shutdown.js +4 -2
  219. package/dist/modules/graceful_shutdown.js.map +1 -1
  220. package/dist/modules/launcher/bot_supervisor.d.ts +1 -1
  221. package/dist/modules/launcher/bot_supervisor.d.ts.map +1 -1
  222. package/dist/modules/launcher/bot_supervisor.js +1 -4
  223. package/dist/modules/launcher/bot_supervisor.js.map +1 -1
  224. package/dist/modules/launcher/child_env.d.ts.map +1 -1
  225. package/dist/modules/launcher/child_env.js +3 -0
  226. package/dist/modules/launcher/child_env.js.map +1 -1
  227. package/dist/modules/market_adapter_whitelist.d.ts +1 -2
  228. package/dist/modules/market_adapter_whitelist.d.ts.map +1 -1
  229. package/dist/modules/market_adapter_whitelist.js +1 -4
  230. package/dist/modules/market_adapter_whitelist.js.map +1 -1
  231. package/dist/modules/node_health_cache.d.ts +12 -4
  232. package/dist/modules/node_health_cache.d.ts.map +1 -1
  233. package/dist/modules/node_health_cache.js +13 -13
  234. package/dist/modules/node_health_cache.js.map +1 -1
  235. package/dist/modules/node_manager.d.ts.map +1 -1
  236. package/dist/modules/node_manager.js +3 -6
  237. package/dist/modules/node_manager.js.map +1 -1
  238. package/dist/modules/order/accounting.d.ts +2 -37
  239. package/dist/modules/order/accounting.d.ts.map +1 -1
  240. package/dist/modules/order/accounting.js +2 -64
  241. package/dist/modules/order/accounting.js.map +1 -1
  242. package/dist/modules/order/export.d.ts +1 -37
  243. package/dist/modules/order/export.d.ts.map +1 -1
  244. package/dist/modules/order/export.js +1 -1
  245. package/dist/modules/order/export.js.map +1 -1
  246. package/dist/modules/order/format.d.ts +28 -14
  247. package/dist/modules/order/format.d.ts.map +1 -1
  248. package/dist/modules/order/format.js +73 -18
  249. package/dist/modules/order/format.js.map +1 -1
  250. package/dist/modules/order/grid.d.ts +11 -5
  251. package/dist/modules/order/grid.d.ts.map +1 -1
  252. package/dist/modules/order/grid.js +79 -37
  253. package/dist/modules/order/grid.js.map +1 -1
  254. package/dist/modules/order/grid_reconcile_internal.js +2 -2
  255. package/dist/modules/order/grid_reconcile_internal.js.map +1 -1
  256. package/dist/modules/order/logger_state.d.ts +3 -45
  257. package/dist/modules/order/logger_state.d.ts.map +1 -1
  258. package/dist/modules/order/logger_state.js +3 -55
  259. package/dist/modules/order/logger_state.js.map +1 -1
  260. package/dist/modules/order/manager.d.ts +0 -4
  261. package/dist/modules/order/manager.d.ts.map +1 -1
  262. package/dist/modules/order/manager.js +3 -9
  263. package/dist/modules/order/manager.js.map +1 -1
  264. package/dist/modules/order/sync_engine.d.ts +0 -2
  265. package/dist/modules/order/sync_engine.d.ts.map +1 -1
  266. package/dist/modules/order/sync_engine.js +1 -4
  267. package/dist/modules/order/sync_engine.js.map +1 -1
  268. package/dist/modules/order/utils/math.d.ts +2 -11
  269. package/dist/modules/order/utils/math.d.ts.map +1 -1
  270. package/dist/modules/order/utils/math.js +3 -14
  271. package/dist/modules/order/utils/math.js.map +1 -1
  272. package/dist/modules/order/utils/order.d.ts +1 -17
  273. package/dist/modules/order/utils/order.d.ts.map +1 -1
  274. package/dist/modules/order/utils/order.js +3 -21
  275. package/dist/modules/order/utils/order.js.map +1 -1
  276. package/dist/modules/order/utils/system.d.ts +1 -11
  277. package/dist/modules/order/utils/system.d.ts.map +1 -1
  278. package/dist/modules/order/utils/system.js +3 -3
  279. package/dist/modules/order/utils/system.js.map +1 -1
  280. package/dist/modules/order/utils/validate.d.ts +1 -26
  281. package/dist/modules/order/utils/validate.d.ts.map +1 -1
  282. package/dist/modules/order/utils/validate.js +1 -1
  283. package/dist/modules/order/utils/validate.js.map +1 -1
  284. package/dist/modules/order/working_grid.d.ts +3 -9
  285. package/dist/modules/order/working_grid.d.ts.map +1 -1
  286. package/dist/modules/order/working_grid.js +3 -11
  287. package/dist/modules/order/working_grid.js.map +1 -1
  288. package/dist/modules/paths.d.ts +43 -2
  289. package/dist/modules/paths.d.ts.map +1 -1
  290. package/dist/modules/paths.js +81 -21
  291. package/dist/modules/paths.js.map +1 -1
  292. package/dist/modules/runtime_settings.js +1 -1
  293. package/dist/modules/runtime_settings.js.map +1 -1
  294. package/dist/pm2.d.ts +1 -1
  295. package/dist/pm2.d.ts.map +1 -1
  296. package/dist/pm2.js +1 -4
  297. package/dist/pm2.js.map +1 -1
  298. package/dist/scripts/analyze-orders.d.ts.map +1 -1
  299. package/dist/scripts/analyze-orders.js +36 -45
  300. package/dist/scripts/analyze-orders.js.map +1 -1
  301. package/dist/scripts/sync-version.js +22 -0
  302. package/dist/scripts/sync-version.js.map +1 -1
  303. package/ecosystem.config.cjs +32 -0
  304. package/package.json +4 -1
  305. package/scripts/README.md +24 -8
  306. package/scripts/clear-all.sh +39 -12
  307. package/scripts/clear-logs.sh +1 -1
  308. package/scripts/clear-market-adapter.sh +3 -3
  309. package/scripts/clear-orders.sh +1 -1
  310. package/scripts/create-bot-symlinks.sh +4 -2
  311. package/scripts/lib/dexbot-paths.sh +63 -0
  312. package/scripts/reset-settings.sh +1 -1
  313. package/dist/analysis/trend_detection/hurst_analyzer.d.ts.map +0 -1
  314. package/dist/analysis/trend_detection/hurst_analyzer.js.map +0 -1
  315. package/dist/analysis/trend_detection/kalman_trend_analyzer.d.ts.map +0 -1
  316. package/dist/analysis/trend_detection/kalman_trend_analyzer.js.map +0 -1
  317. package/dist/analysis/trend_detection/kalman_velocity_smoothing.d.ts.map +0 -1
  318. package/dist/analysis/trend_detection/kalman_velocity_smoothing.js.map +0 -1
  319. package/dist/analysis/trend_detection/permutation_entropy_analyzer.d.ts.map +0 -1
  320. package/dist/analysis/trend_detection/permutation_entropy_analyzer.js.map +0 -1
  321. package/dist/market_adapter/index.d.ts +0 -32
  322. package/dist/market_adapter/index.d.ts.map +0 -1
  323. package/dist/market_adapter/index.js +0 -39
  324. package/dist/market_adapter/index.js.map +0 -1
  325. package/dist/scripts/fix-err-message.d.ts +0 -3
  326. package/dist/scripts/fix-err-message.d.ts.map +0 -1
  327. package/dist/scripts/fix-err-message.js +0 -193
  328. package/dist/scripts/fix-err-message.js.map +0 -1
  329. /package/dist/{analysis/trend_detection → market_adapter/core/signals}/hurst_analyzer.d.ts +0 -0
  330. /package/dist/{analysis/trend_detection → market_adapter/core/signals}/permutation_entropy_analyzer.d.ts +0 -0
package/README.md CHANGED
@@ -19,7 +19,7 @@ DEXBot2 is the first open source trading bot with zero runtime dependencies and
19
19
  - [License](#-license)
20
20
  - [Links](#-links)
21
21
 
22
- ## 🚀 Features
22
+ ## ✨ Features
23
23
 
24
24
  - **Grid Trading** — geometric order grids that rebalance as price moves
25
25
  - **Adaptive Signals** — AMA and trend inputs tune grid placement
@@ -27,27 +27,22 @@ DEXBot2 is the first open source trading bot with zero runtime dependencies and
27
27
  - **Runtime Safety** — replay-safe fills, sync recovery, and cleanup
28
28
  - **Secure Ops** — encrypted keys and credential daemon
29
29
 
30
- ## 🔥 Quick Start
30
+ ## 🌱 Quick Start
31
31
 
32
32
  ```bash
33
- # Option A — Global install (`dexbot` works everywhere)
33
+ # Requires Node.js v22.12 or newer
34
+ # Option A — Global install
34
35
  npm i -g dexbot
35
36
 
36
- # Option B — Clone + npm link (`dexbot` works everywhere)
37
+ # Option B — Clone + npm link
37
38
  git clone https://github.com/froooze/DEXBot2.git && cd DEXBot2 && npm install && npm link
38
39
 
39
40
  dexbot key # Set up master password and import keys
40
41
  dexbot bot # Create and manage bot configurations
41
42
  dexbot start # Start DEXBot2
42
-
43
- # Option C — Clone + local wrappers (no global install)
44
- git clone https://github.com/froooze/DEXBot2.git && cd DEXBot2 && npm install
45
- ./dexbot key # or: npx dexbot key
46
- ./dexbot bot # or: npx dexbot bot
47
- ./unlock # or: npx dexbot start
48
43
  ```
49
44
 
50
- Detailed setup: [Installation](#installation).
45
+ Detailed setup: [Installation](#-installation).
51
46
 
52
47
  ### First Run
53
48
 
@@ -63,17 +58,35 @@ New to BitShares? Work through the [BitShares Onboarding Tutorial](docs/BITSHARE
63
58
 
64
59
  ### Prerequisites
65
60
 
66
- You'll need **Git** and **Node.js** installed.
61
+ You'll need **Git** and **Node.js** v22.12 or newer installed.
67
62
 
68
- #### Windows Users
63
+ #### Linux Users
69
64
 
70
- 1. Install **Node.js LTS** from [nodejs.org](https://nodejs.org/) (accept defaults, restart after)
71
- 2. Install **Git** from [git-scm.com](https://git-scm.com/) (accept defaults, restart after)
72
- 3. Verify installation in Command Prompt:
73
- ```bash
74
- node --version && npm --version && git --version
75
- ```
76
- All three should display version numbers.
65
+ Install Git:
66
+
67
+ ```bash
68
+ # Ubuntu/Debian
69
+ sudo apt-get update
70
+ sudo apt-get install git
71
+
72
+ # Fedora/RHEL
73
+ sudo dnf install git
74
+ ```
75
+
76
+ Most distro repos ship an outdated `nodejs` package, so install Node from [nodejs.org](https://nodejs.org/en/download).
77
+
78
+ ```bash
79
+ # e.g. via nvm (from https://nodejs.org/en/download)
80
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash
81
+ \. "$HOME/.nvm/nvm.sh"
82
+ nvm install 24
83
+ ```
84
+
85
+ Verify both installations:
86
+
87
+ ```bash
88
+ node --version && npm --version && git --version
89
+ ```
77
90
 
78
91
  #### macOS Users
79
92
 
@@ -86,17 +99,15 @@ Use Homebrew to install Node.js and Git:
86
99
  brew install node git
87
100
  ```
88
101
 
89
- #### Linux Users
90
-
91
- Use your package manager:
92
- ```bash
93
- # Ubuntu/Debian
94
- sudo apt-get update
95
- sudo apt-get install nodejs npm git
102
+ #### Windows Users
96
103
 
97
- # Fedora/RHEL
98
- sudo dnf install nodejs npm git
99
- ```
104
+ 1. Install **Git** from [git-scm.com](https://git-scm.com/install/windows) (accept defaults, restart after)
105
+ 2. Install **Node.js LTS** from [nodejs.org](https://nodejs.org/en/download) (accept defaults, restart after)
106
+ 3. Verify installation in Command Prompt:
107
+ ```cmd
108
+ node --version && npm --version && git --version
109
+ ```
110
+ All three should display version numbers.
100
111
 
101
112
  ### Install
102
113
 
@@ -104,51 +115,46 @@ sudo dnf install nodejs npm git
104
115
  # Option A — Install globally via npm
105
116
  npm i -g dexbot
106
117
 
107
- # Option B — Clone + npm link (`dexbot` works everywhere)
118
+ # Option B — Clone + npm link
108
119
  git clone https://github.com/froooze/DEXBot2.git && cd DEXBot2 && npm install && npm link
109
-
110
- # Option C — Clone + local wrappers (no global install)
111
- git clone https://github.com/froooze/DEXBot2.git && cd DEXBot2 && npm install
112
- ./dexbot # or: npx dexbot
113
- ./unlock # or: npx dexbot start
114
120
  ```
115
121
 
116
- Then set up your master password, keys and add bots:
122
+ ## 🔧 Configuration
123
+
124
+ ### Create Your Bot
117
125
 
118
- ```bash
119
- dexbot key
120
- dexbot bot
121
- ```
126
+ 1. Set up your master password and import your BitShares **active** key (WIF):
122
127
 
123
- ## 🔧 Configuration
128
+ ```bash
129
+ dexbot key
130
+ ```
124
131
 
125
- ### Recommended Bot Setup
132
+ 2. Create a bot through the interactive prompts:
133
+
134
+ ```bash
135
+ dexbot bot
136
+ ```
126
137
 
127
- Keep the generated defaults and tune only these first:
138
+ This stores your configuration in `profiles/bots.json`. The generated
139
+ defaults are a good starting point — the next step walks through the few
140
+ options worth tuning.
128
141
 
129
- 1. `targetSpreadPercent`
130
- 2. `incrementPercent`
131
- 3. `gridPrice: "ama"`
132
- 4. `minPrice` / `maxPrice`
142
+ ### Recommended Bot Setup
133
143
 
134
- `targetSpreadPercent` controls profit room per completed cycle. A wider spread
135
- targets more profit per cycle but trades less often.
144
+ Keep the default settings first, and tune these:
136
145
 
137
- `incrementPercent` controls grid density and order size. Smaller increments
138
- create more grid levels and smaller orders; larger increments create fewer
139
- levels and larger orders.
146
+ 1. **Tune `targetSpreadPercent`** — controls profit room per completed cycle. A
147
+ wider spread targets more profit per cycle but trades less often.
140
148
 
141
- Use `gridPrice: "ama"` so the market adapter can center the grid on AMA. Once
142
- AMA is active, tighten `minPrice` / `maxPrice` around the maximum expected
143
- market volatility instead of using an unnecessarily wide range.
149
+ 2. **Tune `incrementPercent`** — controls grid density and order size. Smaller
150
+ increments create more grid levels and smaller orders; larger increments
151
+ create fewer levels and larger orders.
144
152
 
145
- ### Simple AMA Workflow
153
+ 3. **Set `gridPrice` to `"ama"`** — so the market adapter can center the grid
154
+ on AMA. Pick a specific preset if desired: `"ama1"` is the fastest,
155
+ `"ama4"` the slowest, and `"ama"` uses the pair's default preset.
146
156
 
147
- 1. Create the bot with `dexbot bot`.
148
- 2. Leave defaults unchanged.
149
- 3. Tune `targetSpreadPercent` and `incrementPercent`.
150
- 4. Set `gridPrice` to `ama`.
151
- 5. Generate the market-adapter whitelist:
157
+ 4. **Generate the market-adapter whitelist:**
152
158
 
153
159
  ```bash
154
160
  dexbot white
@@ -158,8 +164,11 @@ market volatility instead of using an unnecessarily wide range.
158
164
  live writes and range scaling. Use `dexbot white --dynamic-weight` for
159
165
  newly generated dynamic-weight entries; existing entries are preserved.
160
166
 
161
- 6. Start DEXBot2 with `dexbot start` (or `dexbot pm2` for PM2).
162
- 7. Then tune `minPrice` / `maxPrice` for the market's volatility range.
167
+ 5. **Start DEXBot2** with `dexbot start`.
168
+
169
+ 6. **Tune `minPrice` / `maxPrice`** around the market's volatility range. Once
170
+ AMA is active, tighten them around the maximum expected market volatility
171
+ instead of using an unnecessarily wide range.
163
172
 
164
173
  ### Bot Options Reference
165
174
 
@@ -231,7 +240,7 @@ dexbot disable {all|<bot>} # Disable bot in config
231
240
  dexbot enable {all|<bot>} # Enable bot in config
232
241
 
233
242
  dexbot stat # Runtime status (unlock or PM2)
234
- dexbot order # Analyze order grids
243
+ dexbot order [<bot>] # Analyze order grids
235
244
  dexbot order --export # Export as HTML to root folder
236
245
 
237
246
  dexbot update # Update DEXBot2
@@ -244,18 +253,18 @@ dexbot default # Reset settings to defaults
244
253
  PM2 is optional — `dexbot start` is the native solution.
245
254
 
246
255
  ```bash
247
- dexbot pm2 [<bot-name>] # Start with PM2
256
+ dexbot pm2 [<bot>] # Start with PM2
248
257
  dexbot pm2 restart {all|<bot>|dexbot-cred} # Safe restart
249
258
  dexbot pm2 stop {all|<bot>} # Stop (via wrapper)
250
259
  dexbot pm2 delete {all|<bot>} # Delete (via wrapper)
251
- pm2 logs [<bot-name>] # Real-time logs
260
+ pm2 logs [<bot>] # Real-time logs
252
261
  ```
253
262
 
254
263
  Always use `dexbot pm2 restart` instead of raw `pm2 restart all` — the wrapper safely handles the credential daemon. If the credential daemon stops, rerun `dexbot pm2`.
255
264
 
256
265
  > Repo-root users can use `./pm2` instead of `dexbot pm2`.
257
266
 
258
- Logs are written to `profiles/logs/` in all modes: the monolithic runtime uses `dexbot.log` / `dexbot-error.log`, and per-bot output uses `<bot-name>.log` / `<bot-name>-error.log`.
267
+ Logs are written to `profiles/logs/` in all modes: the monolithic runtime uses `dexbot.log` / `dexbot-error.log`, and per-bot output uses `<bot>.log` / `<bot>-error.log`.
259
268
 
260
269
  ## 📚 Documentation
261
270