dexbot 1.3.3 → 1.4.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.
- package/dist/analysis/chart_utils.d.ts +11 -9
- package/dist/analysis/chart_utils.d.ts.map +1 -1
- package/dist/analysis/chart_utils.js +21 -16
- package/dist/analysis/chart_utils.js.map +1 -1
- package/dist/analysis/math_utils.d.ts +4 -13
- package/dist/analysis/math_utils.d.ts.map +1 -1
- package/dist/analysis/math_utils.js +16 -18
- package/dist/analysis/math_utils.js.map +1 -1
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.d.ts +3 -7
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.d.ts.map +1 -1
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.js +38 -34
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.js.map +1 -1
- package/dist/analysis/trend_detection/hurst_analyzer.d.ts +1 -4
- package/dist/analysis/trend_detection/hurst_analyzer.d.ts.map +1 -1
- package/dist/analysis/trend_detection/hurst_analyzer.js +10 -7
- package/dist/analysis/trend_detection/hurst_analyzer.js.map +1 -1
- package/dist/analysis/trend_detection/kalman_trend_analyzer.d.ts +6 -6
- package/dist/analysis/trend_detection/kalman_trend_analyzer.d.ts.map +1 -1
- package/dist/analysis/trend_detection/kalman_trend_analyzer.js +23 -15
- package/dist/analysis/trend_detection/kalman_trend_analyzer.js.map +1 -1
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.d.ts +12 -13
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.d.ts.map +1 -1
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.js +16 -16
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.js.map +1 -1
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.d.ts +1 -4
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.d.ts.map +1 -1
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.js +10 -7
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.js.map +1 -1
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +6 -13
- package/dist/bot.js.map +1 -1
- package/dist/credential-daemon.d.ts.map +1 -1
- package/dist/credential-daemon.js +21 -22
- package/dist/credential-daemon.js.map +1 -1
- package/dist/dexbot.d.ts.map +1 -1
- package/dist/dexbot.js +16 -15
- package/dist/dexbot.js.map +1 -1
- package/dist/market_adapter/ama_signal_runner.d.ts +1 -1
- package/dist/market_adapter/ama_signal_runner.d.ts.map +1 -1
- package/dist/market_adapter/ama_signal_runner.js +8 -20
- package/dist/market_adapter/ama_signal_runner.js.map +1 -1
- package/dist/market_adapter/candle_utils.d.ts +2 -10
- package/dist/market_adapter/candle_utils.d.ts.map +1 -1
- package/dist/market_adapter/candle_utils.js +7 -8
- package/dist/market_adapter/candle_utils.js.map +1 -1
- package/dist/market_adapter/core/asymmetric_bounds.d.ts +12 -7
- package/dist/market_adapter/core/asymmetric_bounds.d.ts.map +1 -1
- package/dist/market_adapter/core/asymmetric_bounds.js +4 -5
- package/dist/market_adapter/core/asymmetric_bounds.js.map +1 -1
- package/dist/market_adapter/core/config_normalizers.d.ts +4 -9
- package/dist/market_adapter/core/config_normalizers.d.ts.map +1 -1
- package/dist/market_adapter/core/config_normalizers.js +9 -9
- package/dist/market_adapter/core/config_normalizers.js.map +1 -1
- package/dist/market_adapter/core/kibana_candles.d.ts +16 -20
- package/dist/market_adapter/core/kibana_candles.d.ts.map +1 -1
- package/dist/market_adapter/core/kibana_candles.js +16 -15
- package/dist/market_adapter/core/kibana_candles.js.map +1 -1
- package/dist/market_adapter/core/kibana_client.d.ts +8 -11
- package/dist/market_adapter/core/kibana_client.d.ts.map +1 -1
- package/dist/market_adapter/core/kibana_client.js +13 -11
- package/dist/market_adapter/core/kibana_client.js.map +1 -1
- package/dist/market_adapter/core/kibana_market_candles.d.ts +5 -12
- package/dist/market_adapter/core/kibana_market_candles.d.ts.map +1 -1
- package/dist/market_adapter/core/kibana_market_candles.js +12 -21
- package/dist/market_adapter/core/kibana_market_candles.js.map +1 -1
- package/dist/market_adapter/core/market_adapter_service.d.ts +75 -53
- package/dist/market_adapter/core/market_adapter_service.d.ts.map +1 -1
- package/dist/market_adapter/core/market_adapter_service.js +102 -98
- package/dist/market_adapter/core/market_adapter_service.js.map +1 -1
- package/dist/market_adapter/core/strategies/ama.d.ts +21 -1
- package/dist/market_adapter/core/strategies/ama.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/ama.js +10 -10
- package/dist/market_adapter/core/strategies/ama.js.map +1 -1
- package/dist/market_adapter/core/strategies/ama_slope_model.d.ts +7 -11
- package/dist/market_adapter/core/strategies/ama_slope_model.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/ama_slope_model.js +23 -30
- package/dist/market_adapter/core/strategies/ama_slope_model.js.map +1 -1
- package/dist/market_adapter/core/strategies/atr/calculator.d.ts +5 -4
- package/dist/market_adapter/core/strategies/atr/calculator.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/atr/calculator.js +5 -3
- package/dist/market_adapter/core/strategies/atr/calculator.js.map +1 -1
- package/dist/market_adapter/core/strategies/collateral_manager.d.ts +4 -7
- package/dist/market_adapter/core/strategies/collateral_manager.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/collateral_manager.js +5 -4
- package/dist/market_adapter/core/strategies/collateral_manager.js.map +1 -1
- package/dist/market_adapter/core/strategies/regime_gate.d.ts +11 -19
- package/dist/market_adapter/core/strategies/regime_gate.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/regime_gate.js +22 -22
- package/dist/market_adapter/core/strategies/regime_gate.js.map +1 -1
- package/dist/market_adapter/index.d.ts +24 -2
- package/dist/market_adapter/index.d.ts.map +1 -1
- package/dist/market_adapter/index.js +82 -56
- package/dist/market_adapter/index.js.map +1 -1
- package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js +26 -37
- package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js.map +1 -1
- package/dist/market_adapter/inputs/fetch_lp_data.d.ts +4 -12
- package/dist/market_adapter/inputs/fetch_lp_data.d.ts.map +1 -1
- package/dist/market_adapter/inputs/fetch_lp_data.js +100 -66
- package/dist/market_adapter/inputs/fetch_lp_data.js.map +1 -1
- package/dist/market_adapter/inputs/kibana_source.d.ts +4 -9
- package/dist/market_adapter/inputs/kibana_source.d.ts.map +1 -1
- package/dist/market_adapter/inputs/kibana_source.js +17 -18
- package/dist/market_adapter/inputs/kibana_source.js.map +1 -1
- package/dist/market_adapter/interval_utils.d.ts +1 -4
- package/dist/market_adapter/interval_utils.d.ts.map +1 -1
- package/dist/market_adapter/interval_utils.js +2 -3
- package/dist/market_adapter/interval_utils.js.map +1 -1
- package/dist/market_adapter/log_format.d.ts +1 -9
- package/dist/market_adapter/log_format.d.ts.map +1 -1
- package/dist/market_adapter/log_format.js +7 -8
- package/dist/market_adapter/log_format.js.map +1 -1
- package/dist/market_adapter/lp_chart_core.d.ts +1 -4
- package/dist/market_adapter/lp_chart_core.d.ts.map +1 -1
- package/dist/market_adapter/lp_chart_core.js +22 -20
- package/dist/market_adapter/lp_chart_core.js.map +1 -1
- package/dist/market_adapter/lp_chart_runner.d.ts +13 -24
- package/dist/market_adapter/lp_chart_runner.d.ts.map +1 -1
- package/dist/market_adapter/lp_chart_runner.js +58 -56
- package/dist/market_adapter/lp_chart_runner.js.map +1 -1
- package/dist/market_adapter/lp_chart_strategy_loader.d.ts +4 -17
- package/dist/market_adapter/lp_chart_strategy_loader.d.ts.map +1 -1
- package/dist/market_adapter/lp_chart_strategy_loader.js +36 -36
- package/dist/market_adapter/lp_chart_strategy_loader.js.map +1 -1
- package/dist/market_adapter/market_adapter.d.ts +51 -72
- package/dist/market_adapter/market_adapter.d.ts.map +1 -1
- package/dist/market_adapter/market_adapter.js +227 -192
- package/dist/market_adapter/market_adapter.js.map +1 -1
- package/dist/market_adapter/merge_lp_data.js +17 -16
- package/dist/market_adapter/merge_lp_data.js.map +1 -1
- package/dist/market_adapter/test_helpers.d.ts +9 -13
- package/dist/market_adapter/test_helpers.d.ts.map +1 -1
- package/dist/market_adapter/test_helpers.js +14 -14
- package/dist/market_adapter/test_helpers.js.map +1 -1
- package/dist/market_adapter/utils/adapter_client.d.ts +6 -14
- package/dist/market_adapter/utils/adapter_client.d.ts.map +1 -1
- package/dist/market_adapter/utils/adapter_client.js +16 -15
- package/dist/market_adapter/utils/adapter_client.js.map +1 -1
- package/dist/market_adapter/utils/atomic_write.d.ts +2 -5
- package/dist/market_adapter/utils/atomic_write.d.ts.map +1 -1
- package/dist/market_adapter/utils/atomic_write.js +5 -5
- package/dist/market_adapter/utils/atomic_write.js.map +1 -1
- package/dist/market_adapter/utils/chain.d.ts +19 -21
- package/dist/market_adapter/utils/chain.d.ts.map +1 -1
- package/dist/market_adapter/utils/chain.js +15 -16
- package/dist/market_adapter/utils/chain.js.map +1 -1
- package/dist/market_adapter/utils/data_discovery.d.ts +1 -4
- package/dist/market_adapter/utils/data_discovery.d.ts.map +1 -1
- package/dist/market_adapter/utils/data_discovery.js +10 -10
- package/dist/market_adapter/utils/data_discovery.js.map +1 -1
- package/dist/market_adapter/utils/dynamic_grid_snapshot.d.ts +1 -6
- package/dist/market_adapter/utils/dynamic_grid_snapshot.d.ts.map +1 -1
- package/dist/market_adapter/utils/dynamic_grid_snapshot.js +14 -14
- package/dist/market_adapter/utils/dynamic_grid_snapshot.js.map +1 -1
- package/dist/market_adapter/utils/file_lock.d.ts +1 -7
- package/dist/market_adapter/utils/file_lock.d.ts.map +1 -1
- package/dist/market_adapter/utils/file_lock.js +21 -25
- package/dist/market_adapter/utils/file_lock.js.map +1 -1
- package/dist/market_adapter/utils/native_history.d.ts +12 -12
- package/dist/market_adapter/utils/native_history.d.ts.map +1 -1
- package/dist/market_adapter/utils/native_history.js +15 -15
- package/dist/market_adapter/utils/native_history.js.map +1 -1
- package/dist/market_adapter/utils/paths.d.ts +2 -4
- package/dist/market_adapter/utils/paths.d.ts.map +1 -1
- package/dist/market_adapter/utils/paths.js +6 -5
- package/dist/market_adapter/utils/paths.js.map +1 -1
- package/dist/modules/account_bots.d.ts +7 -8
- package/dist/modules/account_bots.d.ts.map +1 -1
- package/dist/modules/account_bots.js +92 -114
- package/dist/modules/account_bots.js.map +1 -1
- package/dist/modules/account_orders.d.ts +5 -9
- package/dist/modules/account_orders.d.ts.map +1 -1
- package/dist/modules/account_orders.js +69 -32
- package/dist/modules/account_orders.js.map +1 -1
- package/dist/modules/authority_resolver.d.ts +32 -1
- package/dist/modules/authority_resolver.d.ts.map +1 -1
- package/dist/modules/authority_resolver.js +18 -12
- package/dist/modules/authority_resolver.js.map +1 -1
- package/dist/modules/bitshares-native/chain_client.d.ts +3 -8
- package/dist/modules/bitshares-native/chain_client.d.ts.map +1 -1
- package/dist/modules/bitshares-native/chain_client.js +21 -16
- package/dist/modules/bitshares-native/chain_client.js.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.browser.d.ts +21 -29
- package/dist/modules/bitshares-native/crypto/ecc.browser.d.ts.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.browser.js +72 -38
- package/dist/modules/bitshares-native/crypto/ecc.browser.js.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.d.ts +9 -36
- package/dist/modules/bitshares-native/crypto/ecc.d.ts.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.js +40 -83
- package/dist/modules/bitshares-native/crypto/ecc.js.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc_selector.d.ts +14 -1
- package/dist/modules/bitshares-native/crypto/ecc_selector.d.ts.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc_selector.js +5 -3
- package/dist/modules/bitshares-native/crypto/ecc_selector.js.map +1 -1
- package/dist/modules/bitshares-native/index.d.ts +10 -2
- package/dist/modules/bitshares-native/index.d.ts.map +1 -1
- package/dist/modules/bitshares-native/index.js +68 -31
- package/dist/modules/bitshares-native/index.js.map +1 -1
- package/dist/modules/bitshares-native/lru_cache.d.ts +1 -4
- package/dist/modules/bitshares-native/lru_cache.d.ts.map +1 -1
- package/dist/modules/bitshares-native/lru_cache.js +6 -3
- package/dist/modules/bitshares-native/lru_cache.js.map +1 -1
- package/dist/modules/bitshares-native/resolvers.d.ts +3 -6
- package/dist/modules/bitshares-native/resolvers.d.ts.map +1 -1
- package/dist/modules/bitshares-native/resolvers.js +11 -9
- package/dist/modules/bitshares-native/resolvers.js.map +1 -1
- package/dist/modules/bitshares-native/serial/chain_constants.d.ts +53 -55
- package/dist/modules/bitshares-native/serial/chain_constants.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/chain_constants.js +28 -27
- package/dist/modules/bitshares-native/serial/chain_constants.js.map +1 -1
- package/dist/modules/bitshares-native/serial/index.d.ts +5 -9
- package/dist/modules/bitshares-native/serial/index.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/index.js +46 -12
- package/dist/modules/bitshares-native/serial/index.js.map +1 -1
- package/dist/modules/bitshares-native/serial/operations.d.ts +102 -100
- package/dist/modules/bitshares-native/serial/operations.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/operations.js +473 -471
- package/dist/modules/bitshares-native/serial/operations.js.map +1 -1
- package/dist/modules/bitshares-native/serial/serializer.d.ts +2 -7
- package/dist/modules/bitshares-native/serial/serializer.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/serializer.js +8 -3
- package/dist/modules/bitshares-native/serial/serializer.js.map +1 -1
- package/dist/modules/bitshares-native/serial/types.d.ts +26 -41
- package/dist/modules/bitshares-native/serial/types.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/types.js +76 -42
- package/dist/modules/bitshares-native/serial/types.js.map +1 -1
- package/dist/modules/bitshares-native/signing_client.d.ts +1 -5
- package/dist/modules/bitshares-native/signing_client.d.ts.map +1 -1
- package/dist/modules/bitshares-native/signing_client.js +49 -11
- package/dist/modules/bitshares-native/signing_client.js.map +1 -1
- package/dist/modules/bitshares-native/subscriptions.d.ts +1 -4
- package/dist/modules/bitshares-native/subscriptions.d.ts.map +1 -1
- package/dist/modules/bitshares-native/subscriptions.js +47 -84
- package/dist/modules/bitshares-native/subscriptions.js.map +1 -1
- package/dist/modules/bitshares-native/transport.d.ts +1 -8
- package/dist/modules/bitshares-native/transport.d.ts.map +1 -1
- package/dist/modules/bitshares-native/transport.js +22 -15
- package/dist/modules/bitshares-native/transport.js.map +1 -1
- package/dist/modules/bitshares-native/tx/builder.d.ts +3 -8
- package/dist/modules/bitshares-native/tx/builder.d.ts.map +1 -1
- package/dist/modules/bitshares-native/tx/builder.js +61 -23
- package/dist/modules/bitshares-native/tx/builder.js.map +1 -1
- package/dist/modules/bitshares-native/tx/tx_cache.d.ts +1 -8
- package/dist/modules/bitshares-native/tx/tx_cache.d.ts.map +1 -1
- package/dist/modules/bitshares-native/tx/tx_cache.js +21 -17
- package/dist/modules/bitshares-native/tx/tx_cache.js.map +1 -1
- package/dist/modules/bitshares_client.d.ts +12 -23
- package/dist/modules/bitshares_client.d.ts.map +1 -1
- package/dist/modules/bitshares_client.js +109 -56
- package/dist/modules/bitshares_client.js.map +1 -1
- package/dist/modules/bot_settings.d.ts +1 -13
- package/dist/modules/bot_settings.d.ts.map +1 -1
- package/dist/modules/bot_settings.js +34 -34
- package/dist/modules/bot_settings.js.map +1 -1
- package/dist/modules/bots_file_lock.d.ts +3 -9
- package/dist/modules/bots_file_lock.d.ts.map +1 -1
- package/dist/modules/bots_file_lock.js +8 -9
- package/dist/modules/bots_file_lock.js.map +1 -1
- package/dist/modules/chain_keys.d.ts +7 -39
- package/dist/modules/chain_keys.d.ts.map +1 -1
- package/dist/modules/chain_keys.js +126 -90
- package/dist/modules/chain_keys.js.map +1 -1
- package/dist/modules/chain_orders.d.ts +46 -52
- package/dist/modules/chain_orders.d.ts.map +1 -1
- package/dist/modules/chain_orders.js +152 -104
- package/dist/modules/chain_orders.js.map +1 -1
- package/dist/modules/config.d.ts +50 -57
- package/dist/modules/config.d.ts.map +1 -1
- package/dist/modules/config.js +28 -24
- package/dist/modules/config.js.map +1 -1
- package/dist/modules/constants.d.ts +492 -494
- package/dist/modules/constants.d.ts.map +1 -1
- package/dist/modules/constants.js +69 -39
- package/dist/modules/constants.js.map +1 -1
- package/dist/modules/cr_planner.d.ts +1 -13
- package/dist/modules/cr_planner.d.ts.map +1 -1
- package/dist/modules/cr_planner.js +28 -28
- package/dist/modules/cr_planner.js.map +1 -1
- package/dist/modules/credential_policy.d.ts +18 -33
- package/dist/modules/credential_policy.d.ts.map +1 -1
- package/dist/modules/credential_policy.js +114 -87
- package/dist/modules/credential_policy.js.map +1 -1
- package/dist/modules/credential_runtime.d.ts +11 -21
- package/dist/modules/credential_runtime.d.ts.map +1 -1
- package/dist/modules/credential_runtime.js +40 -40
- package/dist/modules/credential_runtime.js.map +1 -1
- package/dist/modules/credential_session_cache.d.ts +8 -8
- package/dist/modules/credential_session_cache.d.ts.map +1 -1
- package/dist/modules/credential_session_cache.js +41 -8
- package/dist/modules/credential_session_cache.js.map +1 -1
- package/dist/modules/credit_runtime.d.ts +51 -316
- package/dist/modules/credit_runtime.d.ts.map +1 -1
- package/dist/modules/credit_runtime.js +257 -183
- package/dist/modules/credit_runtime.js.map +1 -1
- package/dist/modules/crypto/browser_provider.js +6 -6
- package/dist/modules/crypto/browser_provider.js.map +1 -1
- package/dist/modules/crypto/index.d.ts.map +1 -1
- package/dist/modules/crypto/index.js +2 -0
- package/dist/modules/crypto/index.js.map +1 -1
- package/dist/modules/crypto/sync.js +3 -3
- package/dist/modules/crypto/sync.js.map +1 -1
- package/dist/modules/dexbot_class.d.ts +262 -81
- package/dist/modules/dexbot_class.d.ts.map +1 -1
- package/dist/modules/dexbot_class.js +156 -123
- package/dist/modules/dexbot_class.js.map +1 -1
- package/dist/modules/dexbot_cow_runtime.d.ts +12 -9
- package/dist/modules/dexbot_cow_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_cow_runtime.js +132 -60
- package/dist/modules/dexbot_cow_runtime.js.map +1 -1
- package/dist/modules/dexbot_credential_client.d.ts +5 -11
- package/dist/modules/dexbot_credential_client.d.ts.map +1 -1
- package/dist/modules/dexbot_credential_client.js +32 -30
- package/dist/modules/dexbot_credential_client.js.map +1 -1
- package/dist/modules/dexbot_fill_runtime.d.ts +5 -20
- package/dist/modules/dexbot_fill_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_fill_runtime.js +55 -116
- package/dist/modules/dexbot_fill_runtime.js.map +1 -1
- package/dist/modules/dexbot_maintenance_runtime.d.ts +12 -12
- package/dist/modules/dexbot_maintenance_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_maintenance_runtime.js +55 -45
- package/dist/modules/dexbot_maintenance_runtime.js.map +1 -1
- package/dist/modules/dexbot_startup_runtime.d.ts +2 -6
- package/dist/modules/dexbot_startup_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_startup_runtime.js +115 -79
- package/dist/modules/dexbot_startup_runtime.js.map +1 -1
- package/dist/modules/dexbot_state_recovery.d.ts +11 -24
- package/dist/modules/dexbot_state_recovery.d.ts.map +1 -1
- package/dist/modules/dexbot_state_recovery.js +62 -28
- package/dist/modules/dexbot_state_recovery.js.map +1 -1
- package/dist/modules/fund_registry.d.ts +1 -13
- package/dist/modules/fund_registry.d.ts.map +1 -1
- package/dist/modules/fund_registry.js +23 -21
- package/dist/modules/fund_registry.js.map +1 -1
- package/dist/modules/general_settings.d.ts +3 -7
- package/dist/modules/general_settings.d.ts.map +1 -1
- package/dist/modules/general_settings.js +15 -14
- package/dist/modules/general_settings.js.map +1 -1
- package/dist/modules/graceful_shutdown.d.ts +1 -6
- package/dist/modules/graceful_shutdown.d.ts.map +1 -1
- package/dist/modules/graceful_shutdown.js +19 -16
- package/dist/modules/graceful_shutdown.js.map +1 -1
- package/dist/modules/key_store.d.ts.map +1 -1
- package/dist/modules/key_store.js +53 -19
- package/dist/modules/key_store.js.map +1 -1
- package/dist/modules/launcher/bot_supervisor.d.ts +23 -66
- package/dist/modules/launcher/bot_supervisor.d.ts.map +1 -1
- package/dist/modules/launcher/bot_supervisor.js +115 -107
- package/dist/modules/launcher/bot_supervisor.js.map +1 -1
- package/dist/modules/launcher/child_env.d.ts +2 -5
- package/dist/modules/launcher/child_env.d.ts.map +1 -1
- package/dist/modules/launcher/child_env.js +4 -4
- package/dist/modules/launcher/child_env.js.map +1 -1
- package/dist/modules/launcher/credential_bootstrap.d.ts +4 -8
- package/dist/modules/launcher/credential_bootstrap.d.ts.map +1 -1
- package/dist/modules/launcher/credential_bootstrap.js +30 -26
- package/dist/modules/launcher/credential_bootstrap.js.map +1 -1
- package/dist/modules/launcher/credential_daemon.d.ts +8 -15
- package/dist/modules/launcher/credential_daemon.d.ts.map +1 -1
- package/dist/modules/launcher/credential_daemon.js +72 -41
- package/dist/modules/launcher/credential_daemon.js.map +1 -1
- package/dist/modules/launcher/credential_secret.d.ts +1 -4
- package/dist/modules/launcher/credential_secret.d.ts.map +1 -1
- package/dist/modules/launcher/credential_secret.js +36 -4
- package/dist/modules/launcher/credential_secret.js.map +1 -1
- package/dist/modules/launcher/foreign_cred_daemon.d.ts +32 -1
- package/dist/modules/launcher/foreign_cred_daemon.d.ts.map +1 -1
- package/dist/modules/launcher/foreign_cred_daemon.js +25 -28
- package/dist/modules/launcher/foreign_cred_daemon.js.map +1 -1
- package/dist/modules/launcher/headless_password.d.ts +1 -4
- package/dist/modules/launcher/headless_password.d.ts.map +1 -1
- package/dist/modules/launcher/headless_password.js +11 -11
- package/dist/modules/launcher/headless_password.js.map +1 -1
- package/dist/modules/launcher/launch_modes.d.ts +15 -14
- package/dist/modules/launcher/launch_modes.d.ts.map +1 -1
- package/dist/modules/launcher/launch_modes.js +8 -8
- package/dist/modules/launcher/launch_modes.js.map +1 -1
- package/dist/modules/launcher/market_adapter_runtime.d.ts +10 -19
- package/dist/modules/launcher/market_adapter_runtime.d.ts.map +1 -1
- package/dist/modules/launcher/market_adapter_runtime.js +33 -33
- package/dist/modules/launcher/market_adapter_runtime.js.map +1 -1
- package/dist/modules/launcher/market_adapter_watchdog.d.ts +10 -17
- package/dist/modules/launcher/market_adapter_watchdog.d.ts.map +1 -1
- package/dist/modules/launcher/market_adapter_watchdog.js +42 -38
- package/dist/modules/launcher/market_adapter_watchdog.js.map +1 -1
- package/dist/modules/launcher/monolithic_runtime.d.ts +28 -57
- package/dist/modules/launcher/monolithic_runtime.d.ts.map +1 -1
- package/dist/modules/launcher/monolithic_runtime.js +135 -108
- package/dist/modules/launcher/monolithic_runtime.js.map +1 -1
- package/dist/modules/launcher/runtime_entry.d.ts +5 -10
- package/dist/modules/launcher/runtime_entry.d.ts.map +1 -1
- package/dist/modules/launcher/runtime_entry.js +14 -14
- package/dist/modules/launcher/runtime_entry.js.map +1 -1
- package/dist/modules/launcher/status_reporting.d.ts +17 -37
- package/dist/modules/launcher/status_reporting.d.ts.map +1 -1
- package/dist/modules/launcher/status_reporting.js +35 -34
- package/dist/modules/launcher/status_reporting.js.map +1 -1
- package/dist/modules/launcher/supervisor_control.d.ts +1 -4
- package/dist/modules/launcher/supervisor_control.d.ts.map +1 -1
- package/dist/modules/launcher/supervisor_control.js +9 -4
- package/dist/modules/launcher/supervisor_control.js.map +1 -1
- package/dist/modules/logger.d.ts +3 -1
- package/dist/modules/logger.d.ts.map +1 -1
- package/dist/modules/logger.js +38 -28
- package/dist/modules/logger.js.map +1 -1
- package/dist/modules/market_adapter_whitelist.d.ts +2 -10
- package/dist/modules/market_adapter_whitelist.d.ts.map +1 -1
- package/dist/modules/market_adapter_whitelist.js +18 -16
- package/dist/modules/market_adapter_whitelist.js.map +1 -1
- package/dist/modules/node_health_cache.d.ts +2 -12
- package/dist/modules/node_health_cache.d.ts.map +1 -1
- package/dist/modules/node_health_cache.js +24 -24
- package/dist/modules/node_health_cache.js.map +1 -1
- package/dist/modules/node_manager.d.ts +1 -1
- package/dist/modules/node_manager.d.ts.map +1 -1
- package/dist/modules/node_manager.js +44 -38
- package/dist/modules/node_manager.js.map +1 -1
- package/dist/modules/order/accounting.d.ts +12 -12
- package/dist/modules/order/accounting.d.ts.map +1 -1
- package/dist/modules/order/accounting.js +111 -76
- package/dist/modules/order/accounting.js.map +1 -1
- package/dist/modules/order/async_lock.d.ts +1 -2
- package/dist/modules/order/async_lock.d.ts.map +1 -1
- package/dist/modules/order/async_lock.js +4 -4
- package/dist/modules/order/async_lock.js.map +1 -1
- package/dist/modules/order/export.d.ts +8 -14
- package/dist/modules/order/export.d.ts.map +1 -1
- package/dist/modules/order/export.js +77 -42
- package/dist/modules/order/export.js.map +1 -1
- package/dist/modules/order/format.d.ts +17 -22
- package/dist/modules/order/format.d.ts.map +1 -1
- package/dist/modules/order/format.js +25 -31
- package/dist/modules/order/format.js.map +1 -1
- package/dist/modules/order/grid.d.ts +18 -104
- package/dist/modules/order/grid.d.ts.map +1 -1
- package/dist/modules/order/grid.js +246 -188
- package/dist/modules/order/grid.js.map +1 -1
- package/dist/modules/order/grid_reconcile.d.ts +8 -8
- package/dist/modules/order/grid_reconcile.d.ts.map +1 -1
- package/dist/modules/order/grid_reconcile.js +24 -23
- package/dist/modules/order/grid_reconcile.js.map +1 -1
- package/dist/modules/order/grid_reconcile_internal.d.ts +224 -1
- package/dist/modules/order/grid_reconcile_internal.d.ts.map +1 -1
- package/dist/modules/order/grid_reconcile_internal.js +145 -72
- package/dist/modules/order/grid_reconcile_internal.js.map +1 -1
- package/dist/modules/order/index.d.ts +1 -1
- package/dist/modules/order/index.d.ts.map +1 -1
- package/dist/modules/order/index.js +42 -7
- package/dist/modules/order/index.js.map +1 -1
- package/dist/modules/order/logger.d.ts +6 -16
- package/dist/modules/order/logger.d.ts.map +1 -1
- package/dist/modules/order/logger.js +76 -53
- package/dist/modules/order/logger.js.map +1 -1
- package/dist/modules/order/logger_state.d.ts +4 -4
- package/dist/modules/order/logger_state.d.ts.map +1 -1
- package/dist/modules/order/logger_state.js +3 -1
- package/dist/modules/order/logger_state.js.map +1 -1
- package/dist/modules/order/manager.d.ts +160 -37
- package/dist/modules/order/manager.d.ts.map +1 -1
- package/dist/modules/order/manager.js +166 -128
- package/dist/modules/order/manager.js.map +1 -1
- package/dist/modules/order/processed_fill_store.d.ts +6 -10
- package/dist/modules/order/processed_fill_store.d.ts.map +1 -1
- package/dist/modules/order/processed_fill_store.js +10 -9
- package/dist/modules/order/processed_fill_store.js.map +1 -1
- package/dist/modules/order/strategy.d.ts +3 -3
- package/dist/modules/order/strategy.d.ts.map +1 -1
- package/dist/modules/order/strategy.js +29 -27
- package/dist/modules/order/strategy.js.map +1 -1
- package/dist/modules/order/sync_engine.d.ts +9 -19
- package/dist/modules/order/sync_engine.d.ts.map +1 -1
- package/dist/modules/order/sync_engine.js +176 -126
- package/dist/modules/order/sync_engine.js.map +1 -1
- package/dist/modules/order/utils/math.d.ts +55 -85
- package/dist/modules/order/utils/math.d.ts.map +1 -1
- package/dist/modules/order/utils/math.js +155 -88
- package/dist/modules/order/utils/math.js.map +1 -1
- package/dist/modules/order/utils/order.d.ts +27 -72
- package/dist/modules/order/utils/order.d.ts.map +1 -1
- package/dist/modules/order/utils/order.js +144 -105
- package/dist/modules/order/utils/order.js.map +1 -1
- package/dist/modules/order/utils/system.d.ts +74 -44
- package/dist/modules/order/utils/system.d.ts.map +1 -1
- package/dist/modules/order/utils/system.js +188 -149
- package/dist/modules/order/utils/system.js.map +1 -1
- package/dist/modules/order/utils/validate.d.ts +21 -43
- package/dist/modules/order/utils/validate.d.ts.map +1 -1
- package/dist/modules/order/utils/validate.js +140 -109
- package/dist/modules/order/utils/validate.js.map +1 -1
- package/dist/modules/order/working_grid.d.ts +1 -4
- package/dist/modules/order/working_grid.d.ts.map +1 -1
- package/dist/modules/order/working_grid.js +9 -7
- package/dist/modules/order/working_grid.js.map +1 -1
- package/dist/modules/path_api.js +2 -2
- package/dist/modules/path_api.js.map +1 -1
- package/dist/modules/paths.d.ts +50 -56
- package/dist/modules/paths.d.ts.map +1 -1
- package/dist/modules/paths.js +66 -57
- package/dist/modules/paths.js.map +1 -1
- package/dist/modules/process_discovery.d.ts +1 -1
- package/dist/modules/process_discovery.d.ts.map +1 -1
- package/dist/modules/process_discovery.js +7 -7
- package/dist/modules/process_discovery.js.map +1 -1
- package/dist/modules/runtime.d.ts +1 -1
- package/dist/modules/runtime.d.ts.map +1 -1
- package/dist/modules/runtime.js +4 -4
- package/dist/modules/runtime.js.map +1 -1
- package/dist/modules/runtime_settings.d.ts +1 -0
- package/dist/modules/runtime_settings.d.ts.map +1 -1
- package/dist/modules/runtime_settings.js +15 -10
- package/dist/modules/runtime_settings.js.map +1 -1
- package/dist/modules/settings_merge.d.ts +1 -4
- package/dist/modules/settings_merge.d.ts.map +1 -1
- package/dist/modules/settings_merge.js +2 -1
- package/dist/modules/settings_merge.js.map +1 -1
- package/dist/modules/storage/browser_adapter.d.ts +7 -3
- package/dist/modules/storage/browser_adapter.d.ts.map +1 -1
- package/dist/modules/storage/browser_adapter.js +2 -0
- package/dist/modules/storage/browser_adapter.js.map +1 -1
- package/dist/modules/storage/index.d.ts +2 -2
- package/dist/modules/storage/index.d.ts.map +1 -1
- package/dist/modules/storage/index.js +2 -5
- package/dist/modules/storage/index.js.map +1 -1
- package/dist/modules/storage/node_adapter.d.ts +3 -3
- package/dist/modules/storage/node_adapter.d.ts.map +1 -1
- package/dist/modules/storage/node_adapter.js +9 -7
- package/dist/modules/storage/node_adapter.js.map +1 -1
- package/dist/modules/storage/types.d.ts +13 -10
- package/dist/modules/storage/types.d.ts.map +1 -1
- package/dist/modules/types.d.ts +0 -2
- package/dist/modules/types.d.ts.map +1 -1
- package/dist/modules/utils/base58check.d.ts +1 -9
- package/dist/modules/utils/base58check.d.ts.map +1 -1
- package/dist/modules/utils/base58check.js +14 -16
- package/dist/modules/utils/base58check.js.map +1 -1
- package/dist/modules/utils/build_dir.d.ts +2 -5
- package/dist/modules/utils/build_dir.d.ts.map +1 -1
- package/dist/modules/utils/build_dir.js +6 -3
- package/dist/modules/utils/build_dir.js.map +1 -1
- package/dist/modules/utils/errors.d.ts +2 -0
- package/dist/modules/utils/errors.d.ts.map +1 -0
- package/dist/modules/utils/errors.js +12 -0
- package/dist/modules/utils/errors.js.map +1 -0
- package/dist/modules/utils/fs_utils.d.ts +1 -8
- package/dist/modules/utils/fs_utils.d.ts.map +1 -1
- package/dist/modules/utils/fs_utils.js +8 -3
- package/dist/modules/utils/fs_utils.js.map +1 -1
- package/dist/modules/utils/math_utils.d.ts +2 -6
- package/dist/modules/utils/math_utils.d.ts.map +1 -1
- package/dist/modules/utils/math_utils.js +6 -2
- package/dist/modules/utils/math_utils.js.map +1 -1
- package/dist/modules/validate_profiles.d.ts +1 -11
- package/dist/modules/validate_profiles.d.ts.map +1 -1
- package/dist/modules/validate_profiles.js +25 -27
- package/dist/modules/validate_profiles.js.map +1 -1
- package/dist/pm2.d.ts +7 -6
- package/dist/pm2.d.ts.map +1 -1
- package/dist/pm2.js +132 -106
- package/dist/pm2.js.map +1 -1
- package/dist/scripts/analyze-git.d.ts.map +1 -1
- package/dist/scripts/analyze-git.js +15 -11
- package/dist/scripts/analyze-git.js.map +1 -1
- package/dist/scripts/analyze-orders.d.ts +146 -1
- package/dist/scripts/analyze-orders.d.ts.map +1 -1
- package/dist/scripts/analyze-orders.js +81 -105
- package/dist/scripts/analyze-orders.js.map +1 -1
- package/dist/scripts/diagnose-pool-history.d.ts.map +1 -1
- package/dist/scripts/diagnose-pool-history.js +9 -8
- package/dist/scripts/diagnose-pool-history.js.map +1 -1
- package/dist/scripts/divergence-calc.d.ts.map +1 -1
- package/dist/scripts/divergence-calc.js +11 -8
- package/dist/scripts/divergence-calc.js.map +1 -1
- package/dist/scripts/fix-err-message.d.ts +3 -0
- package/dist/scripts/fix-err-message.d.ts.map +1 -0
- package/dist/scripts/fix-err-message.js +198 -0
- package/dist/scripts/fix-err-message.js.map +1 -0
- package/dist/scripts/generate_lp_chart.d.ts +2 -9
- package/dist/scripts/generate_lp_chart.d.ts.map +1 -1
- package/dist/scripts/generate_lp_chart.js +14 -10
- package/dist/scripts/generate_lp_chart.js.map +1 -1
- package/dist/scripts/generate_mainnet_corpus_report.js +4 -4
- package/dist/scripts/generate_mainnet_corpus_report.js.map +1 -1
- package/dist/scripts/generate_market_adapter_whitelist.d.ts +17 -1
- package/dist/scripts/generate_market_adapter_whitelist.d.ts.map +1 -1
- package/dist/scripts/generate_market_adapter_whitelist.js +23 -20
- package/dist/scripts/generate_market_adapter_whitelist.js.map +1 -1
- package/dist/scripts/migrate_bot_keys.d.ts +1 -4
- package/dist/scripts/migrate_bot_keys.d.ts.map +1 -1
- package/dist/scripts/migrate_bot_keys.js +48 -124
- package/dist/scripts/migrate_bot_keys.js.map +1 -1
- package/dist/scripts/native_release_gates.d.ts.map +1 -1
- package/dist/scripts/native_release_gates.js +18 -14
- package/dist/scripts/native_release_gates.js.map +1 -1
- package/dist/scripts/print_grid.js +1 -1
- package/dist/scripts/print_grid.js.map +1 -1
- package/dist/scripts/run-tests.js +1 -0
- package/dist/scripts/run-tests.js.map +1 -1
- package/dist/scripts/runner.d.ts +1 -11
- package/dist/scripts/runner.d.ts.map +1 -1
- package/dist/scripts/runner.js +21 -19
- package/dist/scripts/runner.js.map +1 -1
- package/dist/scripts/test-credit-renewal.d.ts.map +1 -1
- package/dist/scripts/test-credit-renewal.js +2 -1
- package/dist/scripts/test-credit-renewal.js.map +1 -1
- package/dist/scripts/update.d.ts.map +1 -1
- package/dist/scripts/update.js +85 -79
- package/dist/scripts/update.js.map +1 -1
- package/dist/scripts/validate_bots.js +2 -2
- package/dist/scripts/validate_bots.js.map +1 -1
- package/dist/unlock.d.ts +4 -17
- package/dist/unlock.d.ts.map +1 -1
- package/dist/unlock.js +141 -108
- package/dist/unlock.js.map +1 -1
- package/package.json +1 -1
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.d.ts +0 -3
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.js +0 -149
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.js.map +0 -1
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.d.ts +0 -3
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.js +0 -387
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.js.map +0 -1
- package/dist/analysis/ama_fitting/calibrate_convergence_er.d.ts +0 -3
- package/dist/analysis/ama_fitting/calibrate_convergence_er.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/calibrate_convergence_er.js +0 -200
- package/dist/analysis/ama_fitting/calibrate_convergence_er.js.map +0 -1
- package/dist/analysis/ama_fitting/fetch_lp_candles.d.ts +0 -3
- package/dist/analysis/ama_fitting/fetch_lp_candles.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/fetch_lp_candles.js +0 -212
- package/dist/analysis/ama_fitting/fetch_lp_candles.js.map +0 -1
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.d.ts +0 -31
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.js +0 -249
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.js.map +0 -1
- package/dist/analysis/ama_fitting/optimizer_high_resolution.d.ts +0 -2
- package/dist/analysis/ama_fitting/optimizer_high_resolution.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/optimizer_high_resolution.js +0 -782
- package/dist/analysis/ama_fitting/optimizer_high_resolution.js.map +0 -1
- package/dist/analysis/analyze_derivatives.d.ts +0 -95
- package/dist/analysis/analyze_derivatives.d.ts.map +0 -1
- package/dist/analysis/analyze_derivatives.js +0 -295
- package/dist/analysis/analyze_derivatives.js.map +0 -1
- package/dist/analysis/analyze_dynamic_weight.d.ts +0 -14
- package/dist/analysis/analyze_dynamic_weight.d.ts.map +0 -1
- package/dist/analysis/analyze_dynamic_weight.js +0 -207
- package/dist/analysis/analyze_dynamic_weight.js.map +0 -1
- package/dist/analysis/analyze_kalman.d.ts +0 -13
- package/dist/analysis/analyze_kalman.d.ts.map +0 -1
- package/dist/analysis/analyze_kalman.js +0 -123
- package/dist/analysis/analyze_kalman.js.map +0 -1
- package/dist/analysis/analyze_regime.d.ts +0 -20
- package/dist/analysis/analyze_regime.d.ts.map +0 -1
- package/dist/analysis/analyze_regime.js +0 -139
- package/dist/analysis/analyze_regime.js.map +0 -1
- package/dist/analysis/analyze_regime_windows.d.ts +0 -19
- package/dist/analysis/analyze_regime_windows.d.ts.map +0 -1
- package/dist/analysis/analyze_regime_windows.js +0 -413
- package/dist/analysis/analyze_regime_windows.js.map +0 -1
- package/dist/analysis/analyze_risk_profile.d.ts +0 -3
- package/dist/analysis/analyze_risk_profile.d.ts.map +0 -1
- package/dist/analysis/analyze_risk_profile.js +0 -159
- package/dist/analysis/analyze_risk_profile.js.map +0 -1
- package/dist/analysis/analyze_trade_heatmap.d.ts +0 -3
- package/dist/analysis/analyze_trade_heatmap.d.ts.map +0 -1
- package/dist/analysis/analyze_trade_heatmap.js +0 -367
- package/dist/analysis/analyze_trade_heatmap.js.map +0 -1
- package/dist/analysis/analyze_volatility.d.ts +0 -22
- package/dist/analysis/analyze_volatility.d.ts.map +0 -1
- package/dist/analysis/analyze_volatility.js +0 -172
- package/dist/analysis/analyze_volatility.js.map +0 -1
- package/dist/analysis/bot_fitting/backtest_ama_sweep.d.ts +0 -99
- package/dist/analysis/bot_fitting/backtest_ama_sweep.d.ts.map +0 -1
- package/dist/analysis/bot_fitting/backtest_ama_sweep.js +0 -804
- package/dist/analysis/bot_fitting/backtest_ama_sweep.js.map +0 -1
- package/dist/analysis/bot_fitting/backtest_bot_fitting.d.ts +0 -2
- package/dist/analysis/bot_fitting/backtest_bot_fitting.d.ts.map +0 -1
- package/dist/analysis/bot_fitting/backtest_bot_fitting.js +0 -347
- package/dist/analysis/bot_fitting/backtest_bot_fitting.js.map +0 -1
- package/dist/analysis/bot_fitting/shared_utils.d.ts +0 -15
- package/dist/analysis/bot_fitting/shared_utils.d.ts.map +0 -1
- package/dist/analysis/bot_fitting/shared_utils.js +0 -48
- package/dist/analysis/bot_fitting/shared_utils.js.map +0 -1
- package/dist/analysis/bot_key_utils.d.ts +0 -22
- package/dist/analysis/bot_key_utils.d.ts.map +0 -1
- package/dist/analysis/bot_key_utils.js +0 -162
- package/dist/analysis/bot_key_utils.js.map +0 -1
- package/dist/analysis/bot_usage/discover_bot_accounts.d.ts +0 -3
- package/dist/analysis/bot_usage/discover_bot_accounts.d.ts.map +0 -1
- package/dist/analysis/bot_usage/discover_bot_accounts.js +0 -498
- package/dist/analysis/bot_usage/discover_bot_accounts.js.map +0 -1
- package/dist/analysis/bot_usage/kibana_bot_queries.d.ts +0 -546
- package/dist/analysis/bot_usage/kibana_bot_queries.d.ts.map +0 -1
- package/dist/analysis/bot_usage/kibana_bot_queries.js +0 -427
- package/dist/analysis/bot_usage/kibana_bot_queries.js.map +0 -1
- package/dist/analysis/derivative_chart_generator.d.ts +0 -18
- package/dist/analysis/derivative_chart_generator.d.ts.map +0 -1
- package/dist/analysis/derivative_chart_generator.js +0 -896
- package/dist/analysis/derivative_chart_generator.js.map +0 -1
- package/dist/analysis/price_sources.d.ts +0 -34
- package/dist/analysis/price_sources.d.ts.map +0 -1
- package/dist/analysis/price_sources.js +0 -103
- package/dist/analysis/price_sources.js.map +0 -1
- package/dist/analysis/trade_profitability.d.ts +0 -115
- package/dist/analysis/trade_profitability.d.ts.map +0 -1
- package/dist/analysis/trade_profitability.js +0 -1247
- package/dist/analysis/trade_profitability.js.map +0 -1
- package/dist/analysis/tradingview/analyze_tradingview.d.ts +0 -36
- package/dist/analysis/tradingview/analyze_tradingview.d.ts.map +0 -1
- package/dist/analysis/tradingview/analyze_tradingview.js +0 -172
- package/dist/analysis/tradingview/analyze_tradingview.js.map +0 -1
- package/dist/analysis/trend_detection/derivative_analyzer.d.ts +0 -250
- package/dist/analysis/trend_detection/derivative_analyzer.d.ts.map +0 -1
- package/dist/analysis/trend_detection/derivative_analyzer.js +0 -903
- package/dist/analysis/trend_detection/derivative_analyzer.js.map +0 -1
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.d.ts +0 -6
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.d.ts.map +0 -1
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.js +0 -1450
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.js.map +0 -1
- package/dist/analysis/trend_detection/kalman_chart_generator.d.ts +0 -6
- package/dist/analysis/trend_detection/kalman_chart_generator.d.ts.map +0 -1
- package/dist/analysis/trend_detection/kalman_chart_generator.js +0 -408
- package/dist/analysis/trend_detection/kalman_chart_generator.js.map +0 -1
- package/dist/analysis/trend_detection/regime_chart_generator.d.ts +0 -6
- package/dist/analysis/trend_detection/regime_chart_generator.d.ts.map +0 -1
- package/dist/analysis/trend_detection/regime_chart_generator.js +0 -345
- package/dist/analysis/trend_detection/regime_chart_generator.js.map +0 -1
- package/dist/analysis/trend_detection/tests/test_kalman_trend.d.ts +0 -2
- package/dist/analysis/trend_detection/tests/test_kalman_trend.d.ts.map +0 -1
- package/dist/analysis/trend_detection/tests/test_kalman_trend.js +0 -130
- package/dist/analysis/trend_detection/tests/test_kalman_trend.js.map +0 -1
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.d.ts +0 -2
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.d.ts.map +0 -1
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.js +0 -38
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.js.map +0 -1
- package/dist/analysis/trend_detection/volatility_chart_generator.d.ts +0 -6
- package/dist/analysis/trend_detection/volatility_chart_generator.d.ts.map +0 -1
- package/dist/analysis/trend_detection/volatility_chart_generator.js +0 -732
- package/dist/analysis/trend_detection/volatility_chart_generator.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dexbot_maintenance_runtime.d.ts","sourceRoot":"","sources":["../../modules/dexbot_maintenance_runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dexbot_maintenance_runtime.d.ts","sourceRoot":"","sources":["../../modules/dexbot_maintenance_runtime.ts"],"names":[],"mappings":"AA4FA;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,GAAG,EAAE,GAAG,WAGjC;AAED;;;;;;GAMG;AACH,iBAAS,+BAA+B,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAalE;AAED;;;;;GAKG;AACH,iBAAS,+BAA+B,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,WAMlE;AA6HD;;;GAGG;AACH,iBAAS,sBAAsB;;;;;;;;;;;;EAgC9B;AAuGD;;;GAGG;AACH,iBAAe,oBAAoB,kBAElC;AAED;;;;;;GAMG;AACH,iBAAe,sCAAsC,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,GAAE,GAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4IxF;AAED;;;;;;GAMG;AACH,iBAAS,gCAAgC,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,GAAE,GAAe;;;;;;;;;;EA+D3E;AAyHD;;;;;;;GAOG;AACH,iBAAS,0BAA0B,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,OA0BxG;AAED;;;;;;GAMG;AACH,iBAAS,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,GAAE;IAC1C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACnB,oBAwHL;AAED;;;;;GAKG;AACH,iBAAe,yBAAyB,CAAC,GAAG,EAAE,GAAG,oBAkBhD;AAED;;;;;GAKG;AACH,iBAAe,yBAAyB,CAAC,GAAG,EAAE,GAAG,iBAiDhD;AAED;;;;;GAKG;AACH,iBAAe,yBAAyB,CAAC,GAAG,EAAE,GAAG,iBAMhD;AAED;;;;GAIG;AACH,iBAAS,2BAA2B,CAAC,GAAG,EAAE,GAAG,WAK5C;AAED;;;;GAIG;AACH,iBAAS,uBAAuB,CAAC,GAAG,EAAE,GAAG,QA0DxC;AAED;;;;GAIG;AACH,iBAAe,sBAAsB,CAAC,GAAG,EAAE,GAAG,iBAK7C;AAED;;;;GAIG;AACH,iBAAS,4BAA4B,CAAC,GAAG,EAAE,GAAG,QAuH7C;AAED;;;GAGG;AACH,iBAAS,2BAA2B,CAAC,GAAG,EAAE,GAAG,QAM5C;AAED;;;;;;;GAOG;AACH,iBAAe,2BAA2B,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,GAAE,GAAgB,gBAiB1F;AAID;;;;;GAKG;AACH,iBAAS,wBAAwB,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,WAY3D;AAiGD;;;;;;;GAOG;AACH,iBAAe,uBAAuB,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,iBAoN5D;AA2CD;;;;;;;;;;GAUG;AACH,iBAAe,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,OAAY,EAAE,IAAI,EAAE,QAAa,EAAE,GAAE,GAAQ;;;;;;;;GAyC7F;AAED;;;;;;;;GAQG;AACH,iBAAe,kBAAkB,CAC7B,GAAG,EAAE,GAAG,EACR,OAAO,GAAE,GAAgB,EACzB,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,iBAmCvC;AAID;;;;;;GAMG;AACH,iBAAe,yBAAyB,CAAC,GAAG,EAAE,GAAG,iBAoDhD;AAED;;;;;;GAMG;AACH,iBAAe,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,iBAmF/C;AAED;;;GAGG;AACH,iBAAe,kBAAkB,CAAC,GAAG,EAAE,GAAG,iBAkCzC;AAED;;;GAGG;AACH,iBAAS,4BAA4B,CAAC,GAAG,EAAE,GAAG,QAO7C;AAED;;;;;;GAMG;AACH,iBAAe,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,GAAE,GAAyB,EAAE,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAAO,gBAiB1H;AAED;;;GAGG;AACH,iBAAS,+BAA+B,CAAC,GAAG,EAAE,GAAG,QAiDhD;AAED;;;;GAIG;AACH,iBAAS,kBAAkB,CAAC,GAAG,EAAE,GAAG;;;;;;EASnC;AAED;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,GAAE,GAAgB,QAG3D;AAED;;;;GAIG;AACH,iBAAS,UAAU,CAAC,GAAG,EAAE,GAAG,OAW3B;AAED;;;;;GAKG;AACH,iBAAe,6BAA6B,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;;;;;GAgC9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,kBAiCE"}
|
|
@@ -21,7 +21,6 @@ function getOpenOrdersSyncLoopMs(...args) { return require('./config').getOpenOr
|
|
|
21
21
|
function isGridBloated(...args) { return grid.isGridBloated(...args); }
|
|
22
22
|
function isGridBloatGraceActive(...args) { return grid.isGridBloatGraceActive(...args); }
|
|
23
23
|
function clearGridBloatFlag(...args) { return grid.clearGridBloatFlag(...args); }
|
|
24
|
-
function loadGrid(...args) { return grid.loadGrid(...args); }
|
|
25
24
|
function recalculateGrid(...args) { return grid.recalculateGrid(...args); }
|
|
26
25
|
function buildRuntimeScriptPath(...args) { return require('./launcher/runtime_entry').buildRuntimeScriptPath(...args); }
|
|
27
26
|
function isDistCodeRoot(...args) { return require('./launcher/runtime_entry').isDistCodeRoot(...args); }
|
|
@@ -33,6 +32,7 @@ function isPm2Runtime(...args) { return require('./order/logger').isPm2Runtime(.
|
|
|
33
32
|
function getSharedMarketAdapterRuntime(...args) { return require('./launcher/market_adapter_runtime').getSharedMarketAdapterRuntime(...args); }
|
|
34
33
|
function resetMarketAdapterWhitelistCache(...args) { return require('./market_adapter_whitelist').resetMarketAdapterWhitelistCache(...args); }
|
|
35
34
|
function isBotDynamicWeightWhitelisted(...args) { return require('./market_adapter_whitelist').isBotDynamicWeightWhitelisted(...args); }
|
|
35
|
+
function getRuntimeSettingsKeys() { return require('./runtime_settings').RUNTIME_SETTINGS_KEYS; }
|
|
36
36
|
function cloneWeightDistribution(...args) { return require('./order/utils/math').cloneWeightDistribution(...args); }
|
|
37
37
|
function calculateOrderCreationFees(...args) { return require('./order/utils/math').calculateOrderCreationFees(...args); }
|
|
38
38
|
function calculateSwapInAmount(...args) { return require('./order/utils/math').calculateSwapInAmount(...args); }
|
|
@@ -46,6 +46,7 @@ function correctAllPriceMismatches(...args) { return require('./order/utils/orde
|
|
|
46
46
|
function isOrderOnChain(...args) { return require('./order/utils/order').isOrderOnChain(...args); }
|
|
47
47
|
function parseChainOrder(...args) { return require('./order/utils/order').parseChainOrder(...args); }
|
|
48
48
|
const { ensureDir, safeUnlink } = require('./utils/fs_utils');
|
|
49
|
+
const { getErrorMessage } = require('./utils/errors');
|
|
49
50
|
const CODE_ROOT = path.join(__dirname, '..');
|
|
50
51
|
const PROFILES_DIR = PATHS.PROFILES_DIR;
|
|
51
52
|
const PROFILES_BOTS_FILE = PATHS.PROFILES.BOTS_JSON;
|
|
@@ -137,7 +138,7 @@ function countLiveGridOrders(manager, type) {
|
|
|
137
138
|
return 0;
|
|
138
139
|
const active = manager.getOrdersByTypeAndState?.(type, ORDER_STATES.ACTIVE) || [];
|
|
139
140
|
const partial = manager.getOrdersByTypeAndState?.(type, ORDER_STATES.PARTIAL) || [];
|
|
140
|
-
return active.concat(partial).filter(o => o?.orderId).length;
|
|
141
|
+
return active.concat(partial).filter((o) => o?.orderId).length;
|
|
141
142
|
}
|
|
142
143
|
function getTargetActiveOrders(config, side) {
|
|
143
144
|
const configured = Number(config?.activeOrders?.[side]);
|
|
@@ -238,7 +239,7 @@ async function maybeRunTargetedDriftReconciliation(bot, context) {
|
|
|
238
239
|
return true;
|
|
239
240
|
}
|
|
240
241
|
catch (err) {
|
|
241
|
-
bot._warn(`[TARGETED-SYNC] Failed during ${context}: ${err
|
|
242
|
+
bot._warn(`[TARGETED-SYNC] Failed during ${context}: ${getErrorMessage(err)}`);
|
|
242
243
|
return false;
|
|
243
244
|
}
|
|
244
245
|
}
|
|
@@ -428,7 +429,7 @@ async function syncMarketAdapterOnPeriodicConfigCheck(bot, context = 'periodic')
|
|
|
428
429
|
}
|
|
429
430
|
catch (err) {
|
|
430
431
|
pm2QueryFailed = true;
|
|
431
|
-
bot._warn(`Could not query PM2 for ${MARKET_ADAPTER_APP_NAME}: ${err
|
|
432
|
+
bot._warn(`Could not query PM2 for ${MARKET_ADAPTER_APP_NAME}: ${getErrorMessage(err)}. Using a direct PM2 action.`);
|
|
432
433
|
}
|
|
433
434
|
// Cross-reference config-active bots against actually running PM2 processes
|
|
434
435
|
// so we don't start the adapter for configured AMA bots that aren't running.
|
|
@@ -481,14 +482,14 @@ async function syncMarketAdapterOnPeriodicConfigCheck(bot, context = 'periodic')
|
|
|
481
482
|
};
|
|
482
483
|
}
|
|
483
484
|
catch (err) {
|
|
484
|
-
bot._warn(`Market adapter watchdog failed during ${context}: ${err
|
|
485
|
+
bot._warn(`Market adapter watchdog failed during ${context}: ${getErrorMessage(err)}`);
|
|
485
486
|
return {
|
|
486
487
|
changed: false,
|
|
487
488
|
required: false,
|
|
488
489
|
running: false,
|
|
489
490
|
started: false,
|
|
490
491
|
stopped: false,
|
|
491
|
-
error: err
|
|
492
|
+
error: getErrorMessage(err),
|
|
492
493
|
};
|
|
493
494
|
}
|
|
494
495
|
finally {
|
|
@@ -608,7 +609,7 @@ function buildGridResyncMetadata(reason) {
|
|
|
608
609
|
return {
|
|
609
610
|
...defaults,
|
|
610
611
|
...marketAdapterUnknown,
|
|
611
|
-
...GRID_RESYNC_REASONS[resetSource],
|
|
612
|
+
...(GRID_RESYNC_REASONS[resetSource] || {}),
|
|
612
613
|
resetSource,
|
|
613
614
|
};
|
|
614
615
|
}
|
|
@@ -728,19 +729,28 @@ function performGridResync(bot, options = {}) {
|
|
|
728
729
|
const content = storage.readFile(PROFILES_BOTS_FILE);
|
|
729
730
|
const allBotsConfig = parseJsonWithComments(content).bots || [];
|
|
730
731
|
const myName = self.config.name;
|
|
731
|
-
const updatedBot = allBotsConfig.find(b => b.name === myName);
|
|
732
|
+
const updatedBot = allBotsConfig.find((b) => b.name === myName);
|
|
732
733
|
if (updatedBot) {
|
|
733
734
|
self._log(`Reloaded configuration for bot '${myName}'`);
|
|
734
735
|
const oldKey = self.config.botKey;
|
|
735
736
|
const oldIndex = self.config.botIndex;
|
|
736
|
-
|
|
737
|
+
// Preserve runtime-only properties set by the constructor
|
|
738
|
+
// (timing, gridLimits, feeParams, etc.) that are not present
|
|
739
|
+
// in the raw profile from bots.json.
|
|
740
|
+
const runtimeProps = {};
|
|
741
|
+
for (const key of getRuntimeSettingsKeys()) {
|
|
742
|
+
if (self.config[key] !== undefined) {
|
|
743
|
+
runtimeProps[key] = self.config[key];
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
self.config = { ...updatedBot, botKey: oldKey, botIndex: oldIndex, ...runtimeProps };
|
|
737
747
|
self.manager.config = { ...self.manager.config, ...self.config };
|
|
738
748
|
self._baseWeightDistribution = cloneWeightDistribution(updatedBot.weightDistribution, self._baseWeightDistribution);
|
|
739
749
|
refreshDynamicWeightDistribution(self, 'grid resync');
|
|
740
750
|
}
|
|
741
751
|
}
|
|
742
752
|
catch (e) {
|
|
743
|
-
self._warn(`Failed to reload config during resync (using current settings): ${e
|
|
753
|
+
self._warn(`Failed to reload config during resync (using current settings): ${getErrorMessage(e)}`);
|
|
744
754
|
}
|
|
745
755
|
if (refreshCenterPrice) {
|
|
746
756
|
if (promoteAmaCenterSnapshotForGridReset(self.config?.botKey)) {
|
|
@@ -785,7 +795,7 @@ function performGridResync(bot, options = {}) {
|
|
|
785
795
|
});
|
|
786
796
|
}
|
|
787
797
|
catch (_dustErr) {
|
|
788
|
-
self._warn(`[DUST] Post-resync dust cancel failed: ${_dustErr
|
|
798
|
+
self._warn(`[DUST] Post-resync dust cancel failed: ${getErrorMessage(_dustErr)}`);
|
|
789
799
|
}
|
|
790
800
|
}
|
|
791
801
|
// Clear unmatched chain orders after a successful rebuild.
|
|
@@ -799,7 +809,7 @@ function performGridResync(bot, options = {}) {
|
|
|
799
809
|
}
|
|
800
810
|
}
|
|
801
811
|
catch (err) {
|
|
802
|
-
self._log(`Error during triggered resync: ${err
|
|
812
|
+
self._log(`Error during triggered resync: ${getErrorMessage(err)}`, 'error');
|
|
803
813
|
}
|
|
804
814
|
finally {
|
|
805
815
|
self.manager.finishBootstrap();
|
|
@@ -870,8 +880,8 @@ async function setupTriggerFileDetection(bot) {
|
|
|
870
880
|
if (!ok) {
|
|
871
881
|
bot._warn('Runtime trigger reset failed; retaining existing grid state.');
|
|
872
882
|
}
|
|
873
|
-
}).catch(err => {
|
|
874
|
-
bot._warn(`Trigger reset lock error: ${err
|
|
883
|
+
}).catch((err) => {
|
|
884
|
+
bot._warn(`Trigger reset lock error: ${getErrorMessage(err)}`);
|
|
875
885
|
bot.manager._recoveryState = { ...bot.manager._recoveryState, lastFailureAt: Date.now() };
|
|
876
886
|
});
|
|
877
887
|
}, 200);
|
|
@@ -879,12 +889,12 @@ async function setupTriggerFileDetection(bot) {
|
|
|
879
889
|
}
|
|
880
890
|
}
|
|
881
891
|
catch (err) {
|
|
882
|
-
bot._warn(`fs.watch handler error: ${err && err
|
|
892
|
+
bot._warn(`fs.watch handler error: ${err && getErrorMessage(err) ? getErrorMessage(err) : err}`);
|
|
883
893
|
}
|
|
884
894
|
});
|
|
885
895
|
}
|
|
886
896
|
catch (err) {
|
|
887
|
-
bot._warn(`Failed to setup file watcher: ${err
|
|
897
|
+
bot._warn(`Failed to setup file watcher: ${getErrorMessage(err)}`);
|
|
888
898
|
}
|
|
889
899
|
}
|
|
890
900
|
/**
|
|
@@ -960,12 +970,12 @@ function startOpenOrdersSyncLoop(bot) {
|
|
|
960
970
|
}
|
|
961
971
|
}
|
|
962
972
|
catch (err) {
|
|
963
|
-
bot._warn(`Order manager loop error: ${err
|
|
973
|
+
bot._warn(`Order manager loop error: ${getErrorMessage(err)}`);
|
|
964
974
|
}
|
|
965
975
|
await sleep(loopDelayMs);
|
|
966
976
|
}
|
|
967
|
-
})().catch(err => {
|
|
968
|
-
bot._warn(`Open-orders sync loop failed: ${err && err
|
|
977
|
+
})().catch((err) => {
|
|
978
|
+
bot._warn(`Open-orders sync loop failed: ${err && getErrorMessage(err) ? getErrorMessage(err) : err}`);
|
|
969
979
|
}).finally(() => {
|
|
970
980
|
bot._mainLoopPromise = null;
|
|
971
981
|
});
|
|
@@ -1001,12 +1011,12 @@ function setupBlockchainFetchInterval(bot) {
|
|
|
1001
1011
|
}
|
|
1002
1012
|
}
|
|
1003
1013
|
catch (_err) {
|
|
1004
|
-
bot?._warn?.(`Registry unavailable for shared-account interval check: ${_err
|
|
1014
|
+
bot?._warn?.(`Registry unavailable for shared-account interval check: ${getErrorMessage(_err)}`);
|
|
1005
1015
|
}
|
|
1006
1016
|
}
|
|
1007
1017
|
syncMarketAdapterOnPeriodicConfigCheck(bot, 'startup blockchain fetch setup')
|
|
1008
1018
|
.catch((err) => {
|
|
1009
|
-
bot._warn(`Market adapter watchdog failed during startup blockchain fetch setup: ${err
|
|
1019
|
+
bot._warn(`Market adapter watchdog failed during startup blockchain fetch setup: ${getErrorMessage(err)}`);
|
|
1010
1020
|
});
|
|
1011
1021
|
if (bot._blockchainFetchInterval !== null && bot._blockchainFetchInterval !== undefined) {
|
|
1012
1022
|
stopBlockchainFetchInterval(bot);
|
|
@@ -1077,14 +1087,14 @@ function setupBlockchainFetchInterval(bot) {
|
|
|
1077
1087
|
}
|
|
1078
1088
|
}
|
|
1079
1089
|
catch (err) {
|
|
1080
|
-
bot._warn(`Error reading open orders during periodic fetch: ${err
|
|
1090
|
+
bot._warn(`Error reading open orders during periodic fetch: ${getErrorMessage(err)}`);
|
|
1081
1091
|
}
|
|
1082
1092
|
}
|
|
1083
1093
|
await performPeriodicGridChecks(bot);
|
|
1084
1094
|
});
|
|
1085
1095
|
}
|
|
1086
1096
|
catch (err) {
|
|
1087
|
-
bot._warn(`Error during periodic blockchain fetch: ${err && err
|
|
1097
|
+
bot._warn(`Error during periodic blockchain fetch: ${err && getErrorMessage(err) ? getErrorMessage(err) : err}`);
|
|
1088
1098
|
}
|
|
1089
1099
|
}
|
|
1090
1100
|
finally {
|
|
@@ -1115,7 +1125,7 @@ function stopBlockchainFetchInterval(bot) {
|
|
|
1115
1125
|
* @param {string} [context='shutdown'] - Context label for logging
|
|
1116
1126
|
* @returns {Promise<import('./types').MarketAdapterReleaseResult>}
|
|
1117
1127
|
*/
|
|
1118
|
-
async function releaseMarketAdapterRuntime(
|
|
1128
|
+
async function releaseMarketAdapterRuntime(_bot, botId, context = 'shutdown') {
|
|
1119
1129
|
if (isPm2Runtime()) {
|
|
1120
1130
|
return { released: false, mode: 'pm2' };
|
|
1121
1131
|
}
|
|
@@ -1193,8 +1203,8 @@ function scheduleMaintenanceAfterIdle(ctx, context, options = {}) {
|
|
|
1193
1203
|
if (ctx._shuttingDown)
|
|
1194
1204
|
return;
|
|
1195
1205
|
ctx._runGridMaintenance(context, timerOptions)
|
|
1196
|
-
.catch(err => {
|
|
1197
|
-
ctx._warn(`Deferred ${context} grid maintenance failed: ${err
|
|
1206
|
+
.catch((err) => {
|
|
1207
|
+
ctx._warn(`Deferred ${context} grid maintenance failed: ${getErrorMessage(err)}`);
|
|
1198
1208
|
if (ctx.manager) {
|
|
1199
1209
|
ctx.manager._recoveryState = { ...ctx.manager._recoveryState, lastFailureAt: Date.now() };
|
|
1200
1210
|
}
|
|
@@ -1236,8 +1246,8 @@ function scheduleDeferredGridResync(ctx, options = {}) {
|
|
|
1236
1246
|
: 'grid resync rejected or failed';
|
|
1237
1247
|
ctx._warn(`Deferred trigger reset blocked: ${reason}; retaining existing grid state.`);
|
|
1238
1248
|
}
|
|
1239
|
-
}).catch(err => {
|
|
1240
|
-
ctx._warn(`Deferred trigger reset lock error: ${err
|
|
1249
|
+
}).catch((err) => {
|
|
1250
|
+
ctx._warn(`Deferred trigger reset lock error: ${getErrorMessage(err)}`);
|
|
1241
1251
|
if (ctx.manager) {
|
|
1242
1252
|
ctx.manager._recoveryState = { ...ctx.manager._recoveryState, lastFailureAt: Date.now() };
|
|
1243
1253
|
}
|
|
@@ -1292,7 +1302,7 @@ async function executeMaintenanceLogic(bot, context) {
|
|
|
1292
1302
|
bot._log(`[GRID-BLOAT] Grid size ${d.gridSize} still exceeds expected maximum ${d.maxAllowed} ` +
|
|
1293
1303
|
`after grace period (${grace.graceMs}ms). Triggering structural resync.`, 'warn');
|
|
1294
1304
|
bot.manager.requestStructuralGridResync('grid-bloat-persistent', { reason: `Grid size ${d.gridSize} still exceeds max ${d.maxAllowed} after grace` }).catch((err) => {
|
|
1295
|
-
bot.manager?.logger?.log?.(`[GRID-BLOAT] Structural resync request failed: ${err
|
|
1305
|
+
bot.manager?.logger?.log?.(`[GRID-BLOAT] Structural resync request failed: ${getErrorMessage(err)}`, 'error');
|
|
1296
1306
|
});
|
|
1297
1307
|
}
|
|
1298
1308
|
else {
|
|
@@ -1318,7 +1328,7 @@ async function executeMaintenanceLogic(bot, context) {
|
|
|
1318
1328
|
bot._log('[LIGHTWEIGHT-SYNC] Skipped: manager assets not available', 'debug');
|
|
1319
1329
|
}
|
|
1320
1330
|
else {
|
|
1321
|
-
const chainOrdersCount = chainOpenOrdersResult.filter(o => parseChainOrder(o, assets) !== null).length;
|
|
1331
|
+
const chainOrdersCount = chainOpenOrdersResult.filter((o) => parseChainOrder(o, assets) !== null).length;
|
|
1322
1332
|
const gridActive = Array.from(bot.manager.orders.values()).filter((o) => isOrderOnChain(o)).length;
|
|
1323
1333
|
const diff = Math.abs(chainOrdersCount - gridActive);
|
|
1324
1334
|
if (diff > 2) {
|
|
@@ -1335,7 +1345,7 @@ async function executeMaintenanceLogic(bot, context) {
|
|
|
1335
1345
|
}
|
|
1336
1346
|
}
|
|
1337
1347
|
catch (e) {
|
|
1338
|
-
bot._log(`[LIGHTWEIGHT-SYNC] Check failed: ${e
|
|
1348
|
+
bot._log(`[LIGHTWEIGHT-SYNC] Check failed: ${getErrorMessage(e)}`, 'debug');
|
|
1339
1349
|
}
|
|
1340
1350
|
}
|
|
1341
1351
|
// Process any price corrections queued by prior sync operations before
|
|
@@ -1407,12 +1417,12 @@ async function executeMaintenanceLogic(bot, context) {
|
|
|
1407
1417
|
bot._log(`Grid divergence corrections applied during ${context}`);
|
|
1408
1418
|
}
|
|
1409
1419
|
catch (err) {
|
|
1410
|
-
bot._warn(`Error applying divergence corrections during ${context}: ${err
|
|
1420
|
+
bot._warn(`Error applying divergence corrections during ${context}: ${getErrorMessage(err)}`);
|
|
1411
1421
|
}
|
|
1412
1422
|
}
|
|
1413
1423
|
}
|
|
1414
1424
|
catch (err) {
|
|
1415
|
-
bot._warn(`Error running divergence check during ${context}: ${err
|
|
1425
|
+
bot._warn(`Error running divergence check during ${context}: ${getErrorMessage(err)}`);
|
|
1416
1426
|
}
|
|
1417
1427
|
const spreadResult = await bot.manager.checkSpreadCondition(BitShares, bot.updateOrdersOnChainPlan.bind(bot));
|
|
1418
1428
|
if (await bot._abortFlowIfIllegalState(`${context} spread check`))
|
|
@@ -1450,7 +1460,7 @@ async function executeMaintenanceLogic(bot, context) {
|
|
|
1450
1460
|
async function cancelOrderWithNodeFallback(bot, order) {
|
|
1451
1461
|
try {
|
|
1452
1462
|
const nodeManager = getNodeManager();
|
|
1453
|
-
const nodes = nodeManager
|
|
1463
|
+
const nodes = nodeManager?.getHealthyNodes() ?? [];
|
|
1454
1464
|
const fallbackNodes = nodes.length > 1 ? nodes.slice(1) : undefined;
|
|
1455
1465
|
return await chainOrders.cancelOrder(bot.account, bot.privateKey, order.orderId, fallbackNodes
|
|
1456
1466
|
? {
|
|
@@ -1500,13 +1510,13 @@ async function cancelDustOrders(bot, { buy: buyDust = [], sell: sellDust = [] }
|
|
|
1500
1510
|
}
|
|
1501
1511
|
}
|
|
1502
1512
|
catch (refetchErr) {
|
|
1503
|
-
bot._warn(`[DUST] Cancel succeeded but refetch failed for ${order.id} (${order.orderId}): ${refetchErr
|
|
1513
|
+
bot._warn(`[DUST] Cancel succeeded but refetch failed for ${order.id} (${order.orderId}): ${getErrorMessage(refetchErr)}`);
|
|
1504
1514
|
}
|
|
1505
1515
|
syntheticFills.push({ ...order, isPartial: true, isDelayedRotationTrigger: true });
|
|
1506
1516
|
bot._log(`[DUST] Cancelled ${order.id} (${order.orderId}) size=${order.size}`, 'debug');
|
|
1507
1517
|
}
|
|
1508
1518
|
catch (err) {
|
|
1509
|
-
const errMsg = err
|
|
1519
|
+
const errMsg = getErrorMessage(err) || '';
|
|
1510
1520
|
if (isOrderDoesNotExistError(errMsg, order.orderId)) {
|
|
1511
1521
|
syntheticFills.push({ ...order, isPartial: true, isDelayedRotationTrigger: true });
|
|
1512
1522
|
bot._log(`[DUST] Order ${order.id} (${order.orderId}) already gone from chain`, 'debug');
|
|
@@ -1518,7 +1528,7 @@ async function cancelDustOrders(bot, { buy: buyDust = [], sell: sellDust = [] }
|
|
|
1518
1528
|
}
|
|
1519
1529
|
if (syntheticFills.length === 0)
|
|
1520
1530
|
return { cancelledCount: 0, batchResult: null };
|
|
1521
|
-
const result = await bot._processFillsWithBatching(syntheticFills, new Set(), `dust cancel [${syntheticFills.map(o => o.id).join(', ')}]`);
|
|
1531
|
+
const result = await bot._processFillsWithBatching(syntheticFills, new Set(), `dust cancel [${syntheticFills.map((o) => o.id).join(', ')}]`);
|
|
1522
1532
|
if (!result.aborted) {
|
|
1523
1533
|
await bot.manager.persistGrid();
|
|
1524
1534
|
}
|
|
@@ -1561,7 +1571,7 @@ async function runGridMaintenance(bot, context = 'periodic', options = {}) {
|
|
|
1561
1571
|
});
|
|
1562
1572
|
}
|
|
1563
1573
|
catch (err) {
|
|
1564
|
-
bot._warn(`Error during ${context} grid maintenance: ${err
|
|
1574
|
+
bot._warn(`Error during ${context} grid maintenance: ${getErrorMessage(err)}`);
|
|
1565
1575
|
throw err;
|
|
1566
1576
|
}
|
|
1567
1577
|
}
|
|
@@ -1642,7 +1652,7 @@ async function acquireBts(bot, deficit) {
|
|
|
1642
1652
|
continue;
|
|
1643
1653
|
try {
|
|
1644
1654
|
const pools = await BitShares.db.get_liquidity_pools_by_both_assets(asset.id, coreAssetId);
|
|
1645
|
-
const validPools = Array.isArray(pools) ? pools.filter(p => p?.id) : [];
|
|
1655
|
+
const validPools = Array.isArray(pools) ? pools.filter((p) => p?.id) : [];
|
|
1646
1656
|
const poolData = validPools.length
|
|
1647
1657
|
? validPools.sort((a, b) => {
|
|
1648
1658
|
const getBtsBal = (p) => {
|
|
@@ -1668,7 +1678,7 @@ async function acquireBts(bot, deficit) {
|
|
|
1668
1678
|
candidates.push({ asset, poolId: poolData.id, sellAmount, expectedReceive, priceImpact: sellAmount / assetReserve });
|
|
1669
1679
|
}
|
|
1670
1680
|
catch (e) {
|
|
1671
|
-
bot._log(`[BTS-ACQ] Pool lookup failed for ${asset?.symbol}: ${e
|
|
1681
|
+
bot._log(`[BTS-ACQ] Pool lookup failed for ${asset?.symbol}: ${getErrorMessage(e)}`, 'debug');
|
|
1672
1682
|
}
|
|
1673
1683
|
}
|
|
1674
1684
|
if (candidates.length === 0) {
|
|
@@ -1692,7 +1702,7 @@ async function acquireBts(bot, deficit) {
|
|
|
1692
1702
|
}
|
|
1693
1703
|
}
|
|
1694
1704
|
catch (err) {
|
|
1695
|
-
bot._log(`[BTS-ACQ] Swap broadcast failed: ${err
|
|
1705
|
+
bot._log(`[BTS-ACQ] Swap broadcast failed: ${getErrorMessage(err)}`, 'error');
|
|
1696
1706
|
return;
|
|
1697
1707
|
}
|
|
1698
1708
|
const orderType = (best.asset.id === bot.assets?.assetA?.id) ? 'sell' : 'buy';
|
|
@@ -1740,11 +1750,11 @@ async function runDustHealthCheck(bot) {
|
|
|
1740
1750
|
}
|
|
1741
1751
|
}
|
|
1742
1752
|
catch (err) {
|
|
1743
|
-
if (err
|
|
1753
|
+
if (getErrorMessage(err).includes('Lock acquisition timeout')) {
|
|
1744
1754
|
bot._warn('[DUST] Lock busy, skipping dust cancel this cycle (retry in 5 min)');
|
|
1745
1755
|
}
|
|
1746
1756
|
else {
|
|
1747
|
-
bot._warn(`[DUST] Health check error (retry in 5 min): ${err
|
|
1757
|
+
bot._warn(`[DUST] Health check error (retry in 5 min): ${getErrorMessage(err)}`);
|
|
1748
1758
|
}
|
|
1749
1759
|
}
|
|
1750
1760
|
}
|
|
@@ -1822,7 +1832,7 @@ function wireStructuralGridResyncRequest(bot) {
|
|
|
1822
1832
|
}
|
|
1823
1833
|
}
|
|
1824
1834
|
catch (err) {
|
|
1825
|
-
bot._warn(`[RECOVERY] Structural full grid resync failed: ${err
|
|
1835
|
+
bot._warn(`[RECOVERY] Structural full grid resync failed: ${getErrorMessage(err)}`);
|
|
1826
1836
|
}
|
|
1827
1837
|
finally {
|
|
1828
1838
|
bot._structuralGridResyncRunning = false;
|
|
@@ -1905,7 +1915,7 @@ async function syncOpenOrdersAndProcessFills(bot, tag) {
|
|
|
1905
1915
|
return { syncResult, aborted, hasUnmatched, openOrders };
|
|
1906
1916
|
}
|
|
1907
1917
|
catch (err) {
|
|
1908
|
-
bot._warn(`[SYNC-CHAIN] Open-orders sync failed during ${tag}: ${err
|
|
1918
|
+
bot._warn(`[SYNC-CHAIN] Open-orders sync failed during ${tag}: ${getErrorMessage(err)}`);
|
|
1909
1919
|
return { syncResult: null, aborted: true, hasUnmatched: -1, openOrders: null };
|
|
1910
1920
|
}
|
|
1911
1921
|
}
|