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.
- package/README.md +77 -68
- package/claw/data/positions.json +3391 -1
- package/claw/docs/AI_BOT_LIBRARY_API.md +1 -1
- package/claw/docs/POSITION_HEALTH.md +2 -2
- package/claw/modules/claw_catalog.ts +1 -3
- package/claw/modules/claw_launcher.ts +2 -3
- package/claw/modules/claw_skill_md.ts +1 -1
- package/claw/modules/decision_loop.ts +1 -1
- package/claw/modules/dexbot_profiles.ts +2 -33
- package/claw/modules/feed_price_source.ts +3 -32
- package/claw/modules/launcher_mode_detector.ts +1 -1
- package/claw/modules/mcp_utils.ts +1 -1
- package/claw/modules/mpa_utils.ts +36 -1
- package/claw/modules/position_discovery.ts +1 -28
- package/claw/modules/position_health.ts +1 -20
- package/claw/modules/position_manager.ts +3 -28
- package/claw/modules/skill_utils.ts +1 -1
- package/claw/modules/types.ts +0 -53
- package/claw/package.json +1 -1
- package/claw/runtimes/openclaw-plugin/openclaw.plugin.json +1 -1
- package/claw/runtimes/openclaw-plugin/package.json +1 -1
- package/claw/skills/margin-trading/references/honest-assets.md +1 -1
- package/claw/skills/margin-trading/references/position-management.md +2 -2
- package/claw/skills/shared/references/js-automation-overview.md +2 -2
- package/claw/skills/trend-detection/references/service.md +24 -17
- package/claw/tests/test_claw_bridge.ts +47 -47
- package/claw/tests/test_claw_catalog_and_credentials.ts +9 -9
- package/claw/tests/test_claw_chain_layer.ts +54 -54
- package/claw/tests/test_claw_data_flow.ts +41 -41
- package/claw/tests/test_claw_domain_logic.ts +26 -26
- package/claw/tests/test_claw_manifest_and_matrix.ts +1 -1
- package/claw/tests/test_claw_mcp_transport.ts +16 -16
- package/claw/tests/test_claw_regressions.ts +43 -43
- package/claw/tests/test_claw_skill_generation.ts +1 -1
- package/claw/tests/test_claw_state_store.ts +2 -2
- package/claw/tests/test_dexbot_profiles.ts +4 -4
- package/claw/tests/test_memu_bridge.ts +3 -3
- package/claw/tests/test_nullclaw_tmp_integration.ts +1 -1
- package/claw/tests/test_position_health.ts +2 -2
- package/claw/tests/test_position_manager.ts +18 -18
- package/claw/tests/test_position_manager_watch_health.ts +2 -2
- package/claw/tests/test_short_mpa_strategy.ts +12 -12
- package/dist/analysis/chart_utils.d.ts +13 -1
- package/dist/analysis/chart_utils.d.ts.map +1 -1
- package/dist/analysis/chart_utils.js +16 -1
- package/dist/analysis/chart_utils.js.map +1 -1
- package/dist/analysis/math_utils.d.ts +8 -12
- package/dist/analysis/math_utils.d.ts.map +1 -1
- package/dist/analysis/math_utils.js +9 -75
- package/dist/analysis/math_utils.js.map +1 -1
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.js +4 -4
- package/dist/dexbot.d.ts.map +1 -1
- package/dist/dexbot.js +54 -35
- package/dist/dexbot.js.map +1 -1
- package/dist/market_adapter/candle_utils.d.ts +18 -1
- package/dist/market_adapter/candle_utils.d.ts.map +1 -1
- package/dist/market_adapter/candle_utils.js +50 -1
- package/dist/market_adapter/candle_utils.js.map +1 -1
- package/dist/market_adapter/core/config_normalizers.js +1 -1
- package/dist/market_adapter/core/config_normalizers.js.map +1 -1
- package/dist/market_adapter/core/kibana_client.d.ts +2 -2
- package/dist/market_adapter/core/kibana_client.js +2 -2
- package/dist/market_adapter/core/kibana_market_candles.d.ts +1 -87
- package/dist/market_adapter/core/kibana_market_candles.d.ts.map +1 -1
- package/dist/market_adapter/core/kibana_market_candles.js +1 -80
- package/dist/market_adapter/core/kibana_market_candles.js.map +1 -1
- package/dist/market_adapter/core/market_adapter_service.d.ts +0 -8
- package/dist/market_adapter/core/market_adapter_service.d.ts.map +1 -1
- package/dist/market_adapter/core/market_adapter_service.js +28 -115
- package/dist/market_adapter/core/market_adapter_service.js.map +1 -1
- package/dist/market_adapter/core/signals/hurst_analyzer.d.ts.map +1 -0
- package/dist/{analysis/trend_detection → market_adapter/core/signals}/hurst_analyzer.js +2 -2
- package/dist/market_adapter/core/signals/hurst_analyzer.js.map +1 -0
- package/dist/{analysis/trend_detection → market_adapter/core/signals}/kalman_trend_analyzer.d.ts +0 -1
- package/dist/market_adapter/core/signals/kalman_trend_analyzer.d.ts.map +1 -0
- package/dist/{analysis/trend_detection → market_adapter/core/signals}/kalman_trend_analyzer.js +2 -4
- package/dist/market_adapter/core/signals/kalman_trend_analyzer.js.map +1 -0
- package/dist/{analysis/trend_detection → market_adapter/core/signals}/kalman_velocity_smoothing.d.ts +25 -4
- package/dist/market_adapter/core/signals/kalman_velocity_smoothing.d.ts.map +1 -0
- package/dist/{analysis/trend_detection → market_adapter/core/signals}/kalman_velocity_smoothing.js +41 -19
- package/dist/market_adapter/core/signals/kalman_velocity_smoothing.js.map +1 -0
- package/dist/market_adapter/core/signals/permutation_entropy_analyzer.d.ts.map +1 -0
- package/dist/{analysis/trend_detection → market_adapter/core/signals}/permutation_entropy_analyzer.js +2 -2
- package/dist/market_adapter/core/signals/permutation_entropy_analyzer.js.map +1 -0
- package/dist/market_adapter/core/strategies/ama.d.ts +1 -19
- package/dist/market_adapter/core/strategies/ama.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/ama.js +1 -1
- package/dist/market_adapter/core/strategies/ama.js.map +1 -1
- package/dist/market_adapter/core/strategies/ama_slope_model.d.ts +2 -13
- package/dist/market_adapter/core/strategies/ama_slope_model.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/ama_slope_model.js +15 -26
- package/dist/market_adapter/core/strategies/ama_slope_model.js.map +1 -1
- package/dist/market_adapter/core/strategies/atr/calculator.d.ts +38 -3
- package/dist/market_adapter/core/strategies/atr/calculator.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/atr/calculator.js +84 -24
- package/dist/market_adapter/core/strategies/atr/calculator.js.map +1 -1
- package/dist/market_adapter/core/strategies/collateral_manager.d.ts +1 -1
- package/dist/market_adapter/core/strategies/collateral_manager.js +1 -1
- package/dist/market_adapter/core/strategies/dynamic_weight_series.d.ts +32 -0
- package/dist/market_adapter/core/strategies/dynamic_weight_series.d.ts.map +1 -0
- package/dist/market_adapter/core/strategies/dynamic_weight_series.js +136 -0
- package/dist/market_adapter/core/strategies/dynamic_weight_series.js.map +1 -0
- package/dist/market_adapter/core/strategies/regime_gate.d.ts +6 -21
- package/dist/market_adapter/core/strategies/regime_gate.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/regime_gate.js +11 -74
- package/dist/market_adapter/core/strategies/regime_gate.js.map +1 -1
- package/dist/market_adapter/core/strategies/regime_interp.d.ts +13 -0
- package/dist/market_adapter/core/strategies/regime_interp.d.ts.map +1 -0
- package/dist/market_adapter/core/strategies/regime_interp.js +74 -0
- package/dist/market_adapter/core/strategies/regime_interp.js.map +1 -0
- package/dist/market_adapter/core/strategies/volatility_shift.d.ts +22 -0
- package/dist/market_adapter/core/strategies/volatility_shift.d.ts.map +1 -0
- package/dist/market_adapter/core/strategies/volatility_shift.js +37 -0
- package/dist/market_adapter/core/strategies/volatility_shift.js.map +1 -0
- package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js +3 -4
- package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js.map +1 -1
- package/dist/market_adapter/inputs/fetch_lp_data.d.ts +1 -10
- package/dist/market_adapter/inputs/fetch_lp_data.d.ts.map +1 -1
- package/dist/market_adapter/inputs/fetch_lp_data.js +1 -1
- package/dist/market_adapter/inputs/fetch_lp_data.js.map +1 -1
- package/dist/market_adapter/lp_chart_core.d.ts.map +1 -1
- package/dist/market_adapter/lp_chart_core.js +0 -10
- package/dist/market_adapter/lp_chart_core.js.map +1 -1
- package/dist/market_adapter/lp_chart_runner.d.ts +1 -16
- package/dist/market_adapter/lp_chart_runner.d.ts.map +1 -1
- package/dist/market_adapter/lp_chart_runner.js +1 -15
- package/dist/market_adapter/lp_chart_runner.js.map +1 -1
- package/dist/market_adapter/market_adapter.d.ts +3 -3
- package/dist/market_adapter/market_adapter.d.ts.map +1 -1
- package/dist/market_adapter/market_adapter.js +6 -8
- package/dist/market_adapter/market_adapter.js.map +1 -1
- package/dist/market_adapter/merge_lp_data.js +5 -5
- package/dist/market_adapter/utils/adapter_client.d.ts +1 -3
- package/dist/market_adapter/utils/adapter_client.d.ts.map +1 -1
- package/dist/market_adapter/utils/adapter_client.js +1 -14
- package/dist/market_adapter/utils/adapter_client.js.map +1 -1
- package/dist/market_adapter/utils/data_discovery.d.ts.map +1 -1
- package/dist/market_adapter/utils/data_discovery.js +1 -2
- package/dist/market_adapter/utils/data_discovery.js.map +1 -1
- package/dist/market_adapter/utils/dynamic_grid_snapshot.d.ts +1 -3
- package/dist/market_adapter/utils/dynamic_grid_snapshot.d.ts.map +1 -1
- package/dist/market_adapter/utils/dynamic_grid_snapshot.js +1 -1
- package/dist/market_adapter/utils/dynamic_grid_snapshot.js.map +1 -1
- package/dist/market_adapter/utils/file_lock.d.ts +10 -2
- package/dist/market_adapter/utils/file_lock.d.ts.map +1 -1
- package/dist/market_adapter/utils/file_lock.js +171 -102
- package/dist/market_adapter/utils/file_lock.js.map +1 -1
- package/dist/market_adapter/utils/native_history.d.ts +1 -9
- package/dist/market_adapter/utils/native_history.d.ts.map +1 -1
- package/dist/market_adapter/utils/native_history.js +1 -21
- package/dist/market_adapter/utils/native_history.js.map +1 -1
- package/dist/modules/account_bots.d.ts +16 -38
- package/dist/modules/account_bots.d.ts.map +1 -1
- package/dist/modules/account_bots.js +16 -38
- package/dist/modules/account_bots.js.map +1 -1
- package/dist/modules/account_orders.d.ts +11 -11
- package/dist/modules/account_orders.d.ts.map +1 -1
- package/dist/modules/account_orders.js +11 -18
- package/dist/modules/account_orders.js.map +1 -1
- package/dist/modules/bitshares_client.d.ts +5 -8
- package/dist/modules/bitshares_client.d.ts.map +1 -1
- package/dist/modules/bitshares_client.js +6 -10
- package/dist/modules/bitshares_client.js.map +1 -1
- package/dist/modules/bots_file_lock.d.ts +8 -5
- package/dist/modules/bots_file_lock.d.ts.map +1 -1
- package/dist/modules/bots_file_lock.js +8 -5
- package/dist/modules/bots_file_lock.js.map +1 -1
- package/dist/modules/chain_keys.d.ts +31 -22
- package/dist/modules/chain_keys.d.ts.map +1 -1
- package/dist/modules/chain_keys.js +31 -22
- package/dist/modules/chain_keys.js.map +1 -1
- package/dist/modules/chain_orders.d.ts +52 -48
- package/dist/modules/chain_orders.d.ts.map +1 -1
- package/dist/modules/chain_orders.js +124 -49
- package/dist/modules/chain_orders.js.map +1 -1
- package/dist/modules/config.d.ts +3 -0
- package/dist/modules/config.d.ts.map +1 -1
- package/dist/modules/config.js +3 -0
- package/dist/modules/config.js.map +1 -1
- package/dist/modules/constants.d.ts +17 -13
- package/dist/modules/constants.d.ts.map +1 -1
- package/dist/modules/constants.js +42 -21
- package/dist/modules/constants.js.map +1 -1
- package/dist/modules/cr_planner.d.ts +2 -1
- package/dist/modules/cr_planner.d.ts.map +1 -1
- package/dist/modules/cr_planner.js +1 -1
- package/dist/modules/cr_planner.js.map +1 -1
- package/dist/modules/credential_policy.d.ts +6 -4
- package/dist/modules/credential_policy.d.ts.map +1 -1
- package/dist/modules/credential_policy.js +6 -4
- package/dist/modules/credential_policy.js.map +1 -1
- package/dist/modules/credit_runtime.d.ts.map +1 -1
- package/dist/modules/credit_runtime.js +4 -8
- package/dist/modules/credit_runtime.js.map +1 -1
- package/dist/modules/dexbot_class.d.ts +33 -88
- package/dist/modules/dexbot_class.d.ts.map +1 -1
- package/dist/modules/dexbot_class.js +36 -68
- package/dist/modules/dexbot_class.js.map +1 -1
- package/dist/modules/dexbot_cow_runtime.d.ts +7 -7
- package/dist/modules/dexbot_cow_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_cow_runtime.js +7 -7
- package/dist/modules/dexbot_cow_runtime.js.map +1 -1
- package/dist/modules/dexbot_credential_client.d.ts +3 -3
- package/dist/modules/dexbot_credential_client.js +3 -3
- package/dist/modules/dexbot_credential_client.js.map +1 -1
- package/dist/modules/dexbot_fill_runtime.d.ts +1 -7
- package/dist/modules/dexbot_fill_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_fill_runtime.js +1 -9
- package/dist/modules/dexbot_fill_runtime.js.map +1 -1
- package/dist/modules/dexbot_maintenance_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_maintenance_runtime.js +3 -1
- package/dist/modules/dexbot_maintenance_runtime.js.map +1 -1
- package/dist/modules/dexbot_state_recovery.d.ts.map +1 -1
- package/dist/modules/dexbot_state_recovery.js +99 -1
- package/dist/modules/dexbot_state_recovery.js.map +1 -1
- package/dist/modules/graceful_shutdown.d.ts +4 -2
- package/dist/modules/graceful_shutdown.d.ts.map +1 -1
- package/dist/modules/graceful_shutdown.js +4 -2
- package/dist/modules/graceful_shutdown.js.map +1 -1
- package/dist/modules/launcher/bot_supervisor.d.ts +1 -1
- package/dist/modules/launcher/bot_supervisor.d.ts.map +1 -1
- package/dist/modules/launcher/bot_supervisor.js +1 -4
- package/dist/modules/launcher/bot_supervisor.js.map +1 -1
- package/dist/modules/launcher/child_env.d.ts.map +1 -1
- package/dist/modules/launcher/child_env.js +3 -0
- package/dist/modules/launcher/child_env.js.map +1 -1
- package/dist/modules/market_adapter_whitelist.d.ts +1 -2
- package/dist/modules/market_adapter_whitelist.d.ts.map +1 -1
- package/dist/modules/market_adapter_whitelist.js +1 -4
- package/dist/modules/market_adapter_whitelist.js.map +1 -1
- package/dist/modules/node_health_cache.d.ts +12 -4
- package/dist/modules/node_health_cache.d.ts.map +1 -1
- package/dist/modules/node_health_cache.js +13 -13
- package/dist/modules/node_health_cache.js.map +1 -1
- package/dist/modules/node_manager.d.ts.map +1 -1
- package/dist/modules/node_manager.js +3 -6
- package/dist/modules/node_manager.js.map +1 -1
- package/dist/modules/order/accounting.d.ts +2 -37
- package/dist/modules/order/accounting.d.ts.map +1 -1
- package/dist/modules/order/accounting.js +2 -64
- package/dist/modules/order/accounting.js.map +1 -1
- package/dist/modules/order/export.d.ts +1 -37
- package/dist/modules/order/export.d.ts.map +1 -1
- package/dist/modules/order/export.js +1 -1
- package/dist/modules/order/export.js.map +1 -1
- package/dist/modules/order/format.d.ts +28 -14
- package/dist/modules/order/format.d.ts.map +1 -1
- package/dist/modules/order/format.js +73 -18
- package/dist/modules/order/format.js.map +1 -1
- package/dist/modules/order/grid.d.ts +11 -5
- package/dist/modules/order/grid.d.ts.map +1 -1
- package/dist/modules/order/grid.js +79 -37
- package/dist/modules/order/grid.js.map +1 -1
- package/dist/modules/order/grid_reconcile_internal.js +2 -2
- package/dist/modules/order/grid_reconcile_internal.js.map +1 -1
- package/dist/modules/order/logger_state.d.ts +3 -45
- package/dist/modules/order/logger_state.d.ts.map +1 -1
- package/dist/modules/order/logger_state.js +3 -55
- package/dist/modules/order/logger_state.js.map +1 -1
- package/dist/modules/order/manager.d.ts +0 -4
- package/dist/modules/order/manager.d.ts.map +1 -1
- package/dist/modules/order/manager.js +3 -9
- package/dist/modules/order/manager.js.map +1 -1
- package/dist/modules/order/sync_engine.d.ts +0 -2
- package/dist/modules/order/sync_engine.d.ts.map +1 -1
- package/dist/modules/order/sync_engine.js +1 -4
- package/dist/modules/order/sync_engine.js.map +1 -1
- package/dist/modules/order/utils/math.d.ts +2 -11
- package/dist/modules/order/utils/math.d.ts.map +1 -1
- package/dist/modules/order/utils/math.js +3 -14
- package/dist/modules/order/utils/math.js.map +1 -1
- package/dist/modules/order/utils/order.d.ts +1 -17
- package/dist/modules/order/utils/order.d.ts.map +1 -1
- package/dist/modules/order/utils/order.js +3 -21
- package/dist/modules/order/utils/order.js.map +1 -1
- package/dist/modules/order/utils/system.d.ts +1 -11
- package/dist/modules/order/utils/system.d.ts.map +1 -1
- package/dist/modules/order/utils/system.js +3 -3
- package/dist/modules/order/utils/system.js.map +1 -1
- package/dist/modules/order/utils/validate.d.ts +1 -26
- package/dist/modules/order/utils/validate.d.ts.map +1 -1
- package/dist/modules/order/utils/validate.js +1 -1
- package/dist/modules/order/utils/validate.js.map +1 -1
- package/dist/modules/order/working_grid.d.ts +3 -9
- package/dist/modules/order/working_grid.d.ts.map +1 -1
- package/dist/modules/order/working_grid.js +3 -11
- package/dist/modules/order/working_grid.js.map +1 -1
- package/dist/modules/paths.d.ts +43 -2
- package/dist/modules/paths.d.ts.map +1 -1
- package/dist/modules/paths.js +81 -21
- package/dist/modules/paths.js.map +1 -1
- package/dist/modules/runtime_settings.js +1 -1
- package/dist/modules/runtime_settings.js.map +1 -1
- package/dist/pm2.d.ts +1 -1
- package/dist/pm2.d.ts.map +1 -1
- package/dist/pm2.js +1 -4
- package/dist/pm2.js.map +1 -1
- package/dist/scripts/analyze-orders.d.ts.map +1 -1
- package/dist/scripts/analyze-orders.js +36 -45
- package/dist/scripts/analyze-orders.js.map +1 -1
- package/dist/scripts/sync-version.js +22 -0
- package/dist/scripts/sync-version.js.map +1 -1
- package/ecosystem.config.cjs +32 -0
- package/package.json +4 -1
- package/scripts/README.md +24 -8
- package/scripts/clear-all.sh +39 -12
- package/scripts/clear-logs.sh +1 -1
- package/scripts/clear-market-adapter.sh +3 -3
- package/scripts/clear-orders.sh +1 -1
- package/scripts/create-bot-symlinks.sh +4 -2
- package/scripts/lib/dexbot-paths.sh +63 -0
- package/scripts/reset-settings.sh +1 -1
- package/dist/analysis/trend_detection/hurst_analyzer.d.ts.map +0 -1
- package/dist/analysis/trend_detection/hurst_analyzer.js.map +0 -1
- package/dist/analysis/trend_detection/kalman_trend_analyzer.d.ts.map +0 -1
- package/dist/analysis/trend_detection/kalman_trend_analyzer.js.map +0 -1
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.d.ts.map +0 -1
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.js.map +0 -1
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.d.ts.map +0 -1
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.js.map +0 -1
- package/dist/market_adapter/index.d.ts +0 -32
- package/dist/market_adapter/index.d.ts.map +0 -1
- package/dist/market_adapter/index.js +0 -39
- package/dist/market_adapter/index.js.map +0 -1
- package/dist/scripts/fix-err-message.d.ts +0 -3
- package/dist/scripts/fix-err-message.d.ts.map +0 -1
- package/dist/scripts/fix-err-message.js +0 -193
- package/dist/scripts/fix-err-message.js.map +0 -1
- /package/dist/{analysis/trend_detection → market_adapter/core/signals}/hurst_analyzer.d.ts +0 -0
- /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
|
-
##
|
|
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
|
-
##
|
|
30
|
+
## 🌱 Quick Start
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
#
|
|
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
|
|
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](
|
|
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
|
-
####
|
|
63
|
+
#### Linux Users
|
|
69
64
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
####
|
|
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
|
-
|
|
98
|
-
|
|
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
|
|
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
|
-
|
|
122
|
+
## 🔧 Configuration
|
|
123
|
+
|
|
124
|
+
### Create Your Bot
|
|
117
125
|
|
|
118
|
-
|
|
119
|
-
dexbot key
|
|
120
|
-
dexbot bot
|
|
121
|
-
```
|
|
126
|
+
1. Set up your master password and import your BitShares **active** key (WIF):
|
|
122
127
|
|
|
123
|
-
|
|
128
|
+
```bash
|
|
129
|
+
dexbot key
|
|
130
|
+
```
|
|
124
131
|
|
|
125
|
-
|
|
132
|
+
2. Create a bot through the interactive prompts:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
dexbot bot
|
|
136
|
+
```
|
|
126
137
|
|
|
127
|
-
|
|
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
|
-
|
|
130
|
-
2. `incrementPercent`
|
|
131
|
-
3. `gridPrice: "ama"`
|
|
132
|
-
4. `minPrice` / `maxPrice`
|
|
142
|
+
### Recommended Bot Setup
|
|
133
143
|
|
|
134
|
-
|
|
135
|
-
targets more profit per cycle but trades less often.
|
|
144
|
+
Keep the default settings first, and tune these:
|
|
136
145
|
|
|
137
|
-
`
|
|
138
|
-
|
|
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
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
162
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|