Releases: enarjord/passivbot
Release list
Passivbot v8.1.0
Passivbot v8.1.0
Released 2026-08-10.
V8.1 consolidates the first month of production hardening after the v8 mainline cutover. It keeps
the v8 strategy and configuration family while adding exchanges, configuration capabilities,
data-path improvements, and stricter live execution contracts.
Highlights
- Added live USDT perpetual-futures support for Bitunix through a native connector and for WEEX
through CCXT, including market metadata, account state, orders, fills, PnL, live candles, and
exchange-specific safety handling. - Made Rust orchestrator output an atomic live-trading contract. Malformed order or diagnostic
output now fails before reconciliation, while quantity, price-step, minimum-cost, execution-type,
mode, risk-gate, and protective-order invariants receive stricter boundary validation. - Scoped candle, EMA, trailing, and fill-history readiness to the Rust actions that consume each
input, preserving independent protective paths without fabricating missing values. - Reworked coin overrides as explicit typed patches with deterministic file/inline precedence,
canonical validation, selected per-coin risk and unstuck controls, and conditional per-coin HSL
groups when the global signal mode iscoin. - Unified fill-history coverage and realized-PnL readiness, hardened restart reconstruction, and
added multi-resolution candle ladders for HSL and trailing episodes older than an exchange's 1m
retention window. - Added verified public 1m WebSocket candle persistence for flat forager candidates and hardened
combined-exchange selection, coverage, provenance, and robust volume normalization. - Reduced backtest and optimizer-suite preparation time and peak memory through chunked
materialization, direct shared-memory copies, and earlier release of candidate datasets. - Expanded structured live events, runtime attribution, incident bundles, event queries,
performance reports, restart-smoke evidence, and offline diagnostic tooling.
Configuration And Compatibility
- The canonical config schema is now
v8.1.0. Existingv8.0.0configs are accepted and
normalized to the current v8 schema; source files are not rewritten automatically. Unreleased
or unrecognized same-major schema versions are rejected instead of guessed compatible. - New configs should start from a maintained file under
configs/examples/, all of which now carry
config_version: "v8.1.0". - The v7 migration boundary is unchanged.
trailing_grid_v7remains the explicit compatibility
strategy, while new strategy work should usetrailing_martingaleorema_anchor. - Coin overrides now reject malformed, ambiguous, strategy-mismatched, or unsupported patches
instead of silently hydrating them into a usable-looking config. - Canonical defaults have changed since v8.0.0. Operators whose configs omit fields should inspect
the normalized configuration and review exposure, HSL, unstuck, forager, and approved-coin
settings before restarting.
Upgrade Checklist
- Back up the running config and retain the exact prior revision needed for reproduction.
- Pull v8.1.0, reinstall the Python package, and rebuild the Rust extension.
- Normalize and inspect each config, paying particular attention to coin overrides and fields that
previously relied on defaults. - Run representative backtests and the normal offline/preflight checks for the deployment.
- Use the established operational rollout process for live bots; this release does not authorize
or perform exchange requests, bot restarts, or order actions by itself.
The complete detailed change ledger is in CHANGELOG.md. The original v7-to-v8
migration boundary remains documented in the v8.0.0 release notes.
Passivbot v8.0.0
Passivbot v8.0.0
Passivbot v8 is a major, breaking release. It replaces the v7 strategy and
configuration contract, moves substantially more trading and risk behavior
into the shared Rust runtime, and makes the long-developed v8 branch the
mainline release.
Before upgrading
- Use Python 3.12 and a current stable Rust toolchain.
- Back up the config you currently run and keep the exact v7 revision needed
to reproduce its behavior. - Do not point v8 at an unreviewed v7 config. Normal v8 loading does not
silently convert removed v7 strategy fields. - Treat migration as a new deployment: inspect the normalized config, run
backtests, and review live-mode, risk, approved-coin, and exchange settings
before starting a bot.
Config migration
The canonical v8 strategy is trailing_martingale. Its threshold,
retracement, quantity, and close-recursion parameters are not aliases for the
old v7 trailing-grid fields.
For users who want to preserve v7 trailing-grid semantics during the upgrade,
v8 includes the deprecated compatibility strategy trailing_grid_v7 and an
explicit migration tool:
passivbot tool migrate-config-v7 \
path/to/config_v7.json \
path/to/config_v8_trailing_grid_v7.json \
--report path/to/v7_migration_report.jsonA clean migration writes canonical config_version: "v8.0.0" shape with
live.strategy_kind = "trailing_grid_v7". The tool does not reinterpret the
config as trailing_martingale.
If the report contains dropped, unsupported, or manual-review fields, the
command returns nonzero and does not write the output by default. The
--allow-manual-review-output option writes a best-effort artifact for manual
work; it is not an assertion that the result is ready for live trading.
For new configs, copy:
cp configs/examples/default_trailing_martingale_long.json my_v8_config.jsonSee Config Workflow and
Configuration Reference for the canonical v8 shape.
Major changes
Shared Rust trading runtime
- Live trading, backtesting, and optimization use the Rust orchestrator for
strategy planning and order intent. - Strategy, order, risk, unstuck, HSL transition, and backtest behavior have
stronger shared ownership and parity coverage. - Required trading inputs fail closed or become explicitly unavailable rather
than being replaced with fabricated neutral defaults.
Strategies and portfolio controls
trailing_martingaleis the canonical recursive entry and close strategy.ema_anchoris available as an additional canonical strategy.- Forager selection, wallet-exposure controls, total-wallet-exposure controls,
unstucking, and realized-loss gates have been consolidated and hardened. - EMA spans remain floating-point values throughout config derivation and
runtime preparation.
Equity Hard Stop Loss
- HSL supports unified, position-side, and per-coin signal scopes with explicit
RED episode, cooldown, restart, and no-restart policies. - Coin-mode startup reconstructs exchange-derived history, prioritizes held
positions for protective readiness, and may continue non-blocking replay work
in the background. - Panic-close and protective management paths use dedicated readiness
boundaries; incomplete required history remains visible and fail-closed.
Review Equity Hard Stop Loss and its risk warnings
before enabling or changing HSL settings.
Live readiness and exchange safety
- Account and market inputs are tracked through staged freshness and planning
snapshots before normal order planning and execution. - Ambiguous exchange writes require authoritative confirmation before unsafe
retries. - Exchange adapters and fill/PnL normalization have expanded coverage,
including Bitget UTA behavior and Hyperliquid HIP-3 stock perpetuals.
Logging, monitoring, and events
- V8 introduces a structured live-event pipeline with bounded console, text,
monitor, and structured-data projections. - Events carry stable types, reason codes, correlation identifiers, redaction,
and sink-isolation behavior for operational queries and incident analysis. - The event architecture is part of v8. Console ownership and performance
refinements may continue after v8.0.0 without making observability a trading
control plane.
Backtesting, optimization, and data
- Backtesting and optimization use the shared Rust behavior contract and the
current nested v8 config schema. - OHLCV preparation, coverage validation, cache integrity, suite execution,
optimizer checkpointing, deterministic seeds, stepped bounds, and Pareto
result handling have been expanded and hardened. - The unified
passivbotCLI is the preferred entry point for live,
backtest, optimize, download, and tool commands.
Upgrade checklist
- Install v8 in a Python 3.12 virtual environment and rebuild the Rust
extension. - Migrate the v7 config or start from the canonical v8 example.
- Resolve every migration report item; do not rely on best-effort output as a
live-readiness signal. - Re-check API account selection, exchange mode, leverage, approved and
ignored coins, exposure limits, HSL, unstuck, and logging settings. - Run a bounded backtest and inspect its fills and analysis artifacts.
- Start live trading only through the normal operational process, with logs
and monitor output observed closely during the first cycles.
The complete detailed change ledger is in CHANGELOG.md.
v7.11.0
Passivbot v7.11.0
Released 2026-05-13.
Highlights
- Live authoritative state now always uses the staged account-state pipeline. The legacy live refresh selector was removed; use the
v7.10branch if you need to compare old behavior. - Staged live planning now requires explicit freshness for account state, completed candles, and market snapshots before Rust order calculation.
- Live market prices now come from a dedicated market snapshot provider instead of incomplete candle paths, with strict retry/fail behavior for missing ticker data.
- Live fill events now distinguish detected fills from realized-PnL enrichment. Close fills can log
pnl=pending, PnL-dependent logic waits for enrichment, and an enrichment log is emitted when authoritative PnL arrives. - Rust order orchestration now emits only the next most-likely flat entry order for live symbols without a position, while preserving full grid expansion once a position exists.
- Live initial-entry posting has an optional executor-side distance gate to reduce far-from-market EMA-driven order churn.
- Forager selection now supports score hysteresis and improved INFO/DEBUG diagnostics.
- Candle refreshes now prioritize active symbols, defer broad background warmup by default, cap forager refresh wall time, and tolerate bounded open-ended 1m tail gaps.
- Hyperliquid startup now detects account abstraction mode, treats
portfolioMarginas unified-compatible for HIP-3/non-standard perps, and limits non-unified accounts to vanilla perps. - Live logs were tuned to keep normal operation readable while preserving slow-path, order-wave, freshness, and exchange-error diagnostics.
New Tools
passivbot tool ticker-probepassivbot tool ticker-endpoint-probepassivbot tool hyperliquid-abstraction-probe
Configuration Notes
live.authoritative_refresh_modewas removed.live.price_distance_thresholdwas removed.live.initial_entry_exec_max_market_dist_pctcontrols the narrower live-only initial-entry posting economy gate.live.forager_score_hysteresis_pctdefaults to0.02.live.max_active_candle_tail_gap_minutesdefaults to10.live.max_forager_candle_refresh_secondsdefaults to45.live.max_ohlcv_fetches_per_minutedefaults to24.live.recv_window_msdefaults to10000.live.max_n_cancellations_per_batchmust be greater thanlive.max_n_creations_per_batch.
Upgrade Notes
- Reinstall after pulling so the Python package and Rust extension are rebuilt for
7.11.0. - Operators running live bots should expect the first startup after update to rebuild the Rust extension if stale.
- Review configs for removed
live.authoritative_refresh_modeandlive.price_distance_thresholdkeys; config normalization strips staleprice_distance_threshold, but the legacy refresh selector is no longer supported. - Watch early live logs after upgrade for exchange-specific ticker, candle, and account-state diagnostics, especially on KuCoin and Hyperliquid.
See CHANGELOG.md for the full change list.
v7.10.0
Release Notes for v7.10.0
These notes describe the user-facing changes from v7.9.1 to v7.10.0.
Highlights
- Added the OHLCV v2 foundation under
caches/ohlcvs/, with monthly chunk storage, SQLite catalog metadata, legacy cache import, persistent gap tracking, and v2-aware backtest preparation. - Added
passivbot tool inspect-ohlcvsfor inspecting v2 OHLCV cache coverage, chunk validity, persistent gaps, and recent fetch attempts. - Updated the canonical schema and mirrored example profile to
configs/examples/default_trailing_grid_long_npos7.json, withconfig_version = v7.10.0. - Removed inflated grid re-entry behavior. Grid re-entries are now always normal-or-cropped, while historical inflated order-type ids remain decodable for old fills and restart compatibility.
- Renamed collateral-agnostic strategy-equity metrics to canonical
*_strategy_eqnames, while keeping old*_strategy_pnl_rebasedand*_hslnames as input/result aliases. - Added day-denominated duration metrics alongside existing hour metrics for high exposure, peak recovery, position held, and position unchanged.
- Added richer backtest artifacts:
dataset.json,strategy_equityinbalance_and_equity.csv.gz, artifact loading helpers, and single-coin fill plotting for notebooks.
Upgrade Notes
- Reinstall after upgrading:
python3 -m pip install -e .
or
python3 -m pip install -e ".[full]" - If the Rust extension looks stale, rebuild it in the active environment:
maturin develop --release - New configs should use
config_version = "v7.10.0". configs/examples/default_trailing_grid_long_npos10.jsonhas been replaced byconfigs/examples/default_trailing_grid_long_npos7.json.bot.{long,short}.entry_grid_inflation_enabledis no longer a supported runtime behavior. Older configs that still contain it are normalized during config loading.- Canonical optimizer configs should use
*_strategy_eqmetric names and day-duration metrics. Deprecated metric names remain accepted as compatibility aliases.
What Changed
OHLCV v2 Foundation
- Added v2 OHLCV chunk storage and catalog modules for backtest-oriented candle preparation.
- Backtests can prepare HLCV payloads from the v2 local store when coverage is already available, while keeping
caches/hlcvs_data/as the fast reusable prepared bundle cache. - Legacy daily OHLCV shards, including compressed
.npzshards, can be imported into the v2 store. - Persistent exchange-side gaps are tracked so repeated fetch attempts do not endlessly retry known unavailable ranges.
- Combined-exchange backtests now have a v2-aware load path and clearer progress logging while preparing candles.
Backtest Artifacts and Analysis
- Backtest runs now persist
dataset.jsonwith the HLCV cache files used by the run. - Added
src/backtest_artifacts.pyhelpers for loading config, analysis, fills, balance/equity, HLCVs, timestamps, BTC/USD prices, and market settings from an artifact directory. - Notebook workflows can call
load_backtest_artifact_workspace(...),candles_for_coin(...), andplot_fills_for_coin(...). balance_and_equity.csv.gznow includes collateral-agnosticstrategy_equity.- Backtest BTC collateral is initialized at the first active trading step instead of during EMA warmup.
drawdown_worst_mean_1pctmetrics now derive drawdowns from the full-resolution equity curve before averaging the worst 1% of daily worst drawdowns.
Metrics and Optimization
- Canonical collateral-agnostic strategy-equity metrics now use
*_strategy_eq. - Deprecated
*_strategy_pnl_rebasedand*_hslmetric names are accepted as aliases for configs, limits, visibility filters, Pareto tools, and older stored result files. peak_recovery_hours_pnlnow uses net realized PnL (pnl + fee_paid) and includes the open tail from the last realized-PnL peak to the end of the backtest.- Day-duration metric variants were added for high exposure, peak recovery, position held, and position unchanged.
- Suite-mode limit semantics are centralized so
passivbot optimizeandpassivbot tool paretoresolve omittedstat=consistently frombacktest.aggregate.
Config and Runtime Defaults
- The hardcoded schema defaults and mirrored example config now use a trailing-grid
n_positions = 7profile. - Default approved coins, scenarios, optimizer bounds, scoring, and limits were refreshed.
- Shorts are disabled by default through zero short total wallet exposure.
- Example configs now prefer canonical day-duration metrics where appropriate.
Order Behavior
- Inflated grid re-entry behavior was removed from current live, backtest, and runtime paths.
- Grid entries remain normal-or-cropped so effective wallet exposure limits are observed without pulling future size forward.
- Historical inflated order-type ids remain readable for old fills and restart compatibility.
Short Release Summary
Passivbot v7.10.0 focuses on backtest data infrastructure, clearer strategy-equity metrics, safer grid-entry behavior, and more useful research artifacts. The main operational changes are the new OHLCV v2 foundation, the new n_positions = 7 default profile, removal of inflated grid re-entries, canonical *_strategy_eq metrics, and notebook-friendly backtest artifact helpers.
v7.9.1
Release Notes for v7.9.1
These notes describe the user-facing changes from v7.9.0 to v7.9.1.
Highlights
- Backtest and live now share a cleaner
pnls_max_lookback_dayscontract, including"all"support, correct rolling-window behavior, and restoredbacktest.visible_metricsfiltering. - Hyperliquid HIP-3 live support is much more robust: startup and steady-state state discovery are fixed, sizing balance is reconciled against hidden reserve/margin, and dedicated probe tools are now shipped.
- Config and CLI behavior are stricter and clearer: schema-tagged configs, live-owned shared execution settings, inherited live runtime flags exposed on backtest/optimize CLIs, dotted override fixes, and fail-loud validation for invalid
unstuck_ema_dist. - Live runtime behavior is more operationally stable: Bybit fill-history storms are reduced, Binance trade-history pagination is fixed, exchange-aware EMA pacing and hourly jitter reduce API bursts, and live runs archive logs by default.
- Container/runtime and tooling support improved substantially: canonical live container contract, env-driven config rendering, better HLCV cache naming, richer Pareto tooling, downloader CLI cleanup, and new Hyperliquid diagnostics tools.
Upgrade Notes
- Reinstall after upgrading:
python3 -m pip install -e .
or
python3 -m pip install -e ".[full]" - If the Rust extension looks stale, rebuild it in the active environment:
maturin develop --release config.backtest.market_orders_allowed,config.backtest.market_order_near_touch_threshold, andconfig.backtest.pnls_max_lookback_daysare no longer accepted. Set them underconfig.live.live.pnls_max_lookback_daysnow uses one shared contract across live, HSL, plotting, and backtests:0= minimal effective native lookback- positive float = rolling N-day window
"all"= full available history
- Invalid
unstuck_ema_distboundary values now hard-fail during config validation:bot.long.unstuck_ema_distmust be> -1.0bot.short.unstuck_ema_distmust be< 1.0
- The legacy
python src/downloader.py ...entrypoint is removed. Usepassivbot download ....
What Changed
Config, CLI, and Runtime Contracts
- Added formal top-level
config_versionschema tagging starting atv7.9.0, with canonical defaults and the mirrored example config carrying the schema version and older configs migrating during load. - Shared live/backtest execution settings now live only under
config.live, avoiding silent divergence between runtime and backtest behavior. - CLI/runtime ownership for inherited
live.*fields is now explicit, sobacktestandoptimizehelp/projected configs expose the correct inherited runtime flags. - Dotted CLI overrides now create missing intermediate config sections instead of silently failing when a raw config omits them.
live.approved_coins/live.ignored_coinsnow use a canonical shape with explicit per-side support for"all", and legacyempty_means_all_approvedinputs migrate with warnings instead of remaining part of canonical config.passivbot live -u/--userand-pmld/--pnls-max-lookback-daysare restored as curated default-help shorthands.passivbot optimize --help-allnow exposes fixed per-side bot runtime overrides such asentry_grid_inflation_enabledand selected HSL runtime flags without turning them into optimizer dimensions.- Invalid
unstuck_ema_distvalues that would silently disable unstuck now fail loudly in config loading and in optimize-bounds validation.
Backtest, Optimize, and Metrics
- Backtests now obey the live-owned
pnls_max_lookback_dayssetting correctly, and market-order behavior is treated as a correctness fix instead of preserving legacy bug-compatibility. - Backtest rolling realized-PnL state now actually expires by time for
pnls_max_lookback_days > 0, so auto-unstuck and realized-loss gating use the true in-window peak/current pair instead of a stale all-time maximum of the rolling series. backtest.visible_metricsfiltering is restored for standalone terminal output:nullshows optimize-derived metrics,[]shows all, and explicit lists add extras without affecting savedanalysis.json.- Added a short-term
entry_grid_inflation_enabledcompatibility flag for inflated grid re-entries, with warnings that cropped-only behavior is the forward path. - Zero-fill backtests no longer crash during analysis/plotting when balance/equity samples exist but no fills were produced.
- Added trade-level metrics such as
win_rate,win_rate_w, andtrade_loss_{max,mean,median}plus optimizer-facing ratio metrics likepaper_loss_ratio,exposure_ratio, and weighted variants. - Liquidation reporting now uses an explicit Rust-provided liquidation flag instead of inferring liquidation from drawdown metrics.
- HLCV dataset caches under
caches/hlcvs_data/now use descriptive directory names with exchange, coin label/count, effective date range, and cache-hash suffix. - First-timestamp handling for newly listed coins and source-dir fallback behavior were tightened so candle loading clamps to real listing history and falls back safely when source-dir data is non-contiguous.
Live Runtime Stability and Exchange Fixes
- Fixed
CCXTBot.create_ccxt_sessions()using generic exchange names instead of futures-specific CCXT ids, which could fetch wrong market sets and cascade-fail updates. - Fixed Binance trade-history pagination sending future
endTimeand too-tight 7-day windows, eliminating-4181 "Invalid start time"issues on sparse symbols. - Fixed Bybit closed-pnl pagination storms by deriving fill-lookback coverage from durable cache metadata instead of a session-local flag.
- EMA bundle refresh now uses exchange-aware pacing: strict exchanges honor per-symbol delays while zero-delay exchanges keep concurrent refresh behavior.
- Added random hourly
init_marketsjitter so colocated bots do not fire heavy refresh bursts simultaneously. passivbot livenow archives each run to a timestamped log file underlogs/and keepslogs/{user}.logas a stable alias for tooling.
Hyperliquid and HIP-3
- Hyperliquid stock-perp state sync now uses dex-aware discovery for startup and steady-state reconciliation, including unapproved-symbol live state on the same dex.
- Isolated HIP-3 live trading remains explicitly unsupported; unsupported live state now fails loudly instead of running partially.
- Hyperliquid live sizing now reconciles hidden reserve/margin by restoring:
- HIP-3 cross-position
marginUsed - Passivbot-managed resting non-reduce-only entry-order reserve
while still ignoring external/manual orders.
- HIP-3 cross-position
- Added supported Hyperliquid probe tools to the CLI and docs for balance, order-margin, and position-balance diagnostics.
Tools, Container Runtime, and Operational UX
- Added a canonical live-container runtime contract around
Dockerfile_live,container/entrypoint.sh, env-generatedapi-keys.json, env-driven config rendering, and documented Compose/Railway deployment flow. - Removed the legacy standalone downloader entrypoint and replaced it with the unified
passivbot download ...path plus a dedicatedsrc/ohlcv_download.py. - Pareto tooling improved further:
passivbot tool paretocan default to the newest local Pareto output, accept run orpareto/dirs, use stored metrics outside the original objective list when direction is known, and now defaults to theidealselector. - Added and polished Hyperliquid probe tools as first-class supported diagnostics instead of ad hoc investigation scripts.
Short Release Summary
Passivbot v7.9.1 is a runtime-correctness and operator-UX release. The main themes are:
- correct rolling PnL lookback semantics in backtests
- stronger live/backtest config ownership and CLI exposure
- better Hyperliquid HIP-3 state and balance handling
- more stable live exchange refresh behavior
- clearer release/runtime tooling around logs, containers, downloads, and diagnostics
Passivbot v7.9.0
Release Notes for v7.9.0
These notes describe the user-facing changes from master to v7.9.0.
Highlights
- Equity hard-stop loss is now a full live + backtest feature with Rust-owned runtime handling, richer metrics, and deterministic fake-live replay coverage.
- Optimization now supports
pymooas a first-class backend and uses it by default, with explicit objective goals and live NSGA-II / NSGA-III configuration. - A new
passivbot tool paretoexplorer makes it easier to inspect and select Pareto candidates from local optimize results. - Config loading now runs through a canonical staged pipeline with in-code schema defaults, compatibility migrations for older config keys, and a new canonical example config path.
- Passivbot now ships a unified
passivbotCLI with clearer default help, install-profile separation, stronger environment mismatch detection, and stricter Rust freshness checks. - A built-in monitor stack is now available: publisher, relay, browser dashboard, TUI, and helper wrappers.
Upgrade Notes
- Reinstall after upgrading.
python3 -m pip install -e .
or
python3 -m pip install -e ".[full]" - If Rust looks stale or the wrong binary is being used, run:
maturin develop --release optimize.backendnow defaults topymoo, so optimize users need the full install profile with the new dependency set.configs/template.jsonis no longer the canonical starting point. Useconfigs/examples/default_trailing_grid_long_npos10.jsonor omit the config path to start from schema defaults.- The canonical schema enables the local monitor by default. Set
monitor.enabled = falseif you do not want snapshot and event files written locally. live.max_realized_loss_pctnow defaults to1.0, so the realized-loss gate is opt-in unless you set a tighter value explicitly.
What's New
Equity Hard Stop Loss
- Added the account-level equity hard-stop framework to live and backtest, with Rust-managed drawdown state, tier tracking, RED latching, cooldown restart logic, and no-restart handling.
- Added richer HSL metrics and plots, including per-year trigger and restart counts, time-share metrics, halt and restart metrics, panic-close metrics, and
hard_stop_drawdown.png. - Added deterministic fake-live replay tooling and scenarios so RED halt, cooldown behavior, manual intervention, and restart policies can be tested locally.
- Clarified HSL semantics around no-restart threshold clamping, sub-interval EMA fallback, and market panic execution.
Optimization and Pareto Tooling
- Added the
pymoobackend alongside DEAP and made it the default optimizer backend. - Activated real runtime support for nested
optimize.pymoo.*settings, includingalgorithm, shared crossover and mutation settings, and NSGA-III reference-direction configuration. - Changed optimizer scoring to explicit
{metric, goal}specs instead of implicit sign-based weights, while keeping legacy string-list configs readable. - Added auto-sized NSGA-III population defaults when
optimize.population_sizeisnull. - Added
passivbot tool pareto, a CLI Pareto explorer for filtering local Pareto candidates with optimizer-style limit expressions and selecting a single candidate using methods such as knee, reference-point, ideal-point, weighted utility, lexicographic, or outranking selection. - The Pareto explorer can now default to the newest local
optimize_results/.../pareto, accept either a run directory or apareto/directory, show the retained front's ideal point, and use stored metrics outside the originaloptimize.scoringlist when their direction is known.
Configs, CLI, and Install Flow
- Moved canonical defaults to
src/config/schema.pyand made schema defaults the no-config-path behavior forlive,backtest, andoptimize. - Added staged config normalization, runtime compilation helpers, migration logging, and backward-compatibility renames for older config keys.
- Replaced the old implicit template workflow with
configs/examples/default_trailing_grid_long_npos10.json. - Added the unified
passivbotCLI, curated default help,--help-all, and install-profile guidance forlive,full, anddev. - Restored
passivbot live --user/-uas the curated shorthand forlive.user, and added a curated shorthand forlive.pnls_max_lookback_daysas--pnls-max-lookback-days/-pmldin the default live help. - Added environment mismatch detection so stale shell shims and wrong-entrypoint installs fail loudly or re-exec into the active environment.
- Tightened Rust extension freshness checks to reduce silent stale-binary runs.
Monitoring and Diagnostics
- Added the local monitor publisher for bot snapshots, event streams, and retained fill, price-tick, and candle history.
- Added the read-only monitor relay with websocket streaming and recent-message replay.
- Added the browser dashboard, terminal TUI,
monitor-web, andmonitor-dev. - Added standalone trailing diagnostics tooling for recomputing trailing-entry and trailing-close behavior from saved snapshots or manual input.
- Added repro and sync sidecar tools for investigation and deployment workflows.
Backtest and Runtime Behavior
- Rust now owns more of the market-vs-limit execution intent, and live plus backtest now consume the same shared logic.
- Market fills in backtests now use taker fees, optional taker-fee override support, and explicit maker/taker liquidity labeling in
fills.csv. - Backtest BTC metrics now always use BTC equity instead of mirroring USD analysis when
btc_collateral_cap = 0. - ADG terminal smoothing now uses the last up to three daily samples instead of an EMA over the full run.
- Executable min-cost filtering now uses actual rounded executable size rather than raw market metadata, improving forager tradability filtering.
- First-timestamp cache handling for newly listed coins is more robust, avoiding fetches from invalid early dates.
Exchange and Market Coverage
- Hyperliquid HIP-3 handling is more robust across margin-mode detection, state sync, and source-dir resolution for stock-perp backtests.
- Isolated HIP-3 live trading is explicitly blocked for now instead of partially supported.
Discord Forum Announcement Draft
Passivbot v7.9.0 is out.
This release covers the full user-facing diff from the current master branch to v7.9.0, with major changes across live trading, backtesting, optimization, config handling, CLI UX, and monitoring.
Important upgrade note first:
- After pulling, reinstall Passivbot in your active environment.
- Live-only:
python3 -m pip install -e . - Backtest / optimize / research:
python3 -m pip install -e ".[full]" - If Rust looks stale, run
maturin develop --release
Main changes in v7.9.0:
- Equity hard-stop loss is now a full live + backtest feature with Rust-owned runtime state, cooldown handling, improved RED supervision, richer metrics, and deterministic fake-live replay scenarios.
- Optimization now supports
pymooas a first-class backend and uses it by default. NSGA-II / NSGA-III settings underoptimize.pymoo.*are now actually honored, and NSGA-III population sizing can be auto-derived from reference directions. - Optimizer scoring is now explicit via
{metric, goal}entries instead of implicit signed weights. Legacy scoring configs still load. - A new
passivbot tool paretoexplorer can filter local Pareto candidates with optimizer-style limit expressions and select a single config using knee, reference-point, ideal-point, weighted utility, lexicographic, or outranking methods. - Config loading now uses a canonical staged pipeline with in-code schema defaults, compatibility migrations for older keys, and a new canonical example config at
configs/examples/default_trailing_grid_long_npos10.json. - Passivbot now has a unified
passivbotCLI with cleaner default help,--help-all, install-profile separation, restoredpassivbot live -u, and much stronger environment / stale-extension detection. - A new local monitoring stack is included: publisher, relay, browser dashboard, TUI,
monitor-web, andmonitor-dev. - Rust and Python execution behavior are better aligned across live and backtest, especially for market-vs-limit order intent, HSL panic behavior, and market-fill fee modeling.
- Backtests now include better HSL plots and metrics, cleaner BTC-relative analysis, taker-fee handling for market executions, and improved newly-listed-coin timestamp handling.
- Hyperliquid HIP-3 handling is more robust, while isolated HIP-3 live trading is now blocked explicitly until it is properly supported.
Behavior changes to be aware of:
optimize.backendnow defaults topymooconfigs/template.jsonis no longer the canonical starting point- the canonical schema enables the local monitor by default
live.max_realized_loss_pctnow defaults to1.0, so the realized-loss gate is opt-in unless you set it explicitly
Telegram Announcement Draft
Passivbot v7.9.0 is out.
Key changes:
- full live + backtest equity hard-stop framework with richer metrics and fake-live replay tooling
pymoooptimizer backend added and now the default- new
passivbot tool paretoexplorer for filtering and selecting Pareto candidates - canonical staged config pipeline with schema defaults and new example config path
- unified
passivbotCLI with better help and stricter environment / Rust freshness checks - new monitor stack: publisher, relay, web dashboard, and TUI
- better live/backtest alignment for market-vs-limit execution and market-fill fee handling
Important after upgrading:
- reinstall Passivbot in your active env
- use
python3 -m pip install -e ".[full]"if you run optimize/backtest - rebuild Rust with
maturin develop --releaseif needed
Also note:
optimize.backendnow defaults topymooconfigs/template.jsonis no longer the canonical starting point- monitor is enabled by default in the schema
- `live.max_realize...
v7.8.4
Changed
- Dual balance routing (raw vs hysteresis-snapped) - Live and orchestrator flows now carry both
balance_raw(raw wallet balance) andbalance(hysteresis-snapped balance). Sizing/order-shaping paths use snapped balance, while risk/accounting paths use raw balance (including realized-loss gate peak/floor checks, TWEL entry/auto-reduce gating, and auto-unstuck allowance calculations). This applies consistently across live and backtest via Rust orchestrator input. - WEL denominator behavior split by mode - Live now uses a hard fixed denominator for per-symbol WEL (
total_wallet_exposure_limit / config.bot.{pside}.n_positions), removing runtime denominator drift from open-position count. Backtests now exposebacktest.dynamic_wel_by_tradability(defaulttrue): when enabled, WEL uses tradability-aware denominator growth (min(n_positions, n_tradable_max)) based on coins with real candles, and does not shrink after delistings; when disabled, backtests use the same fixed denominator as live. - Bulk price fetch for Hyperliquid -
calc_ideal_ordersnow uses a singleallMidsAPI call to get prices for all symbols instead of individualget_current_closecalls per symbol (1 call vs ~70). Falls back to per-symbol fetches for non-Hyperliquid exchanges or on error. - Sequential margin mode setting for Hyperliquid - Margin mode and leverage API calls are now sequential with a small delay instead of being fired in parallel, reducing API burst on coin changes.
Fixed
- Bybit fill-event qty inflation on duplicate pages -
BybitFetchernow deduplicatesfetch_my_tradesrows by exec id before canonicalization/coalescing, preventing duplicate pagination rows from inflating canonicalqty,fees, and close PnL. - Balance peak drift in wrong direction under hysteresis - Peak reconstruction (
balance + (pnl_cumsum_max - pnl_cumsum_last)) previously used hysteresis-snapped balance in some paths. Since snapped balance can stay stale whilepnl_cumsum_lastchanges fill-by-fill, this made reconstructed peak drift down after profits and up after losses. Peak/PnL-accuracy-sensitive paths now use raw balance (balance_raw) consistently. - Pytest Rust-module bootstrap fallback - Test bootstrap now tries the project venv
passivbot_rustpackage before falling back to the lightweight stub when tests are launched outside the venv, reducing false failures from missing/incorrect Rust module resolution. max_ohlcv_fetches_per_minuteignored when forager slots open - The rate limit config was only applied when all position slots were full. With open slots (the common case), all candidate symbols were fetched without rate limiting, causing 429 errors on Hyperliquid.- Hyperliquid positions+balance double fetch -
fetch_positionsandfetch_balancenow share a single API call via a dedup lock instead of making two identicalclearinghouseStaterequests per execution cycle. - Thundering herd on minute boundary -
get_candlesno longer force-refreshes all symbols simultaneously when a new minute boundary crosses. A 1-candle staleness tolerance prevents the TTL override that caused all symbols to fetch at once. - Candle refresh TTLs aligned to 1-minute finalization - Active candle refresh TTL raised from 10s to 60s and EMA close TTL from 30s to 60s, matching the actual 1-minute candle finalization interval.
- Boot stagger for multi-bot setups - Added
boot_stagger_secondsconfig (default 30s for Hyperliquid) to randomize startup delay, preventing simultaneous API bursts when multiple bots share the same IP. - Warmup and refresh fetch pacing - Added configurable
warmup_fetch_delay_ms(default 200ms for Hyperliquid) with delays between individual symbol fetches during warmup, forager refresh, and active candle refresh loops. - Exponential backoff on 429 errors - WebSocket
watch_ordersuses exponential backoff (up to 30s) on rate limit errors. Execution loop backs off 5s onRateLimitExceeded. Hourlyinit_marketscatches rate limits with 10s recovery. - Fill events pagination abort on repeated rate limits -
HyperliquidFetchernow aborts after 5 consecutive rate limit retries with exponential backoff instead of retrying indefinitely. - EMA bundle and active candle sweep abort on rate limit - Both
_load_orchestrator_ema_bundleandupdate_ohlcvs_1m_for_activesskip remaining symbols when the CandlestickManager's global rate limit backoff is active. - Live close-EMA failure handling in orchestrator feed -
_load_orchestrator_ema_bundle()no longer silently drops failed/non-finite close EMA spans. It now fails loudly when no prior EMA exists, and otherwise reuses the last successfully computed close EMA for that exact symbol/span with explicit[ema]warning logs (including reason, age, and consecutive fallback count). - Required 1h log-range EMA handling in orchestrator feed -
_load_orchestrator_ema_bundle()now fails loudly when requiredh1log-range spans (fromentry_volatility_ema_span_hours) are missing or non-finite, instead of deferring to downstream RustMissingEmaerrors. - EMA bundle fetch stability under lock contention - Orchestrator EMA bundle loading now fetches per-symbol spans serially and drains all symbol task outcomes before re-raising, reducing same-symbol candle-lock contention and eliminating unretrieved sibling-task exception noise.
Added
- Fill events doctor tool - Added
src/tools/fill_events_doctor.pyto audit cached fill events and auto-repair known Bybit duplicate-fill anomalies without requiring exchange API calls. Bybit startup now runs doctor by default (can be disabled withPASSIVBOT_FILL_EVENTS_DOCTOR=off).
Full changelog: v7.8.3...v7.8.4
v7.8.3
Added
- Added
live.max_realized_loss_pct(default0.05) to block close orders that would realize losses beyond a peak-balance-relative threshold. This applies to normal closes, WEL/TWEL auto-reduce, and unstuck closes; panic closes remain exempt.
Fixed
- Fixed false-positive stale Rust-extension detection after identical rebuilds.
- Fixed suite base scenario coin fallback to use base approved coins.
- Fixed aggregate-method handling in optimizer scoring and Pareto analysis so configured aggregate modes are respected without double-correcting objectives.
v7.8.2: Candle Interval, Exposure Metrics, and Plotting Fixes
Highlights
- Added configurable backtest candle aggregation via
backtest.candle_interval_minutes(default1). - Added high-exposure duration metrics for long/short (
high_exposure_hours_{mean,max}_{long,short}). - Added
total_wallet_exposure.pngoutput for backtests.
Fixed
- Corrected total wallet exposure metrics for short-only configs by using absolute exposure magnitude.
- Fixed timestamp day bucketing in analysis to avoid phantom first-day samples with aggregated intervals.
- Fixed forager
fills_plotsalignment when using candle intervals > 1m by plotting against the effective backtest candle stream. - Fixed candle-interval test robustness and aggregation alignment behavior across suite/optimizer paths.
Changed
- Updated
configs/template.jsondefaults/bounds/scenarios (includingbtc_collateral_cap,maker_fee_override, and optimize limits).
Notes
- Candle aggregation improves backtest/optimizer speed but loses intra-interval fill ordering granularity.
- No user migration steps required.
Full Changelog: v7.8.1...v7.8.2
v7.7.0: FillEventsManager production + logging improvements
Highlights
FillEventsManager Production Transition
- PnL tracking now uses FillEventsManager exclusively - Legacy
update_pnlspath removed - Fill events include psize/pprice - Each fill annotated with position size and VWAP entry price
- Support for all exchanges: Binance, Bybit, Bitget, GateIO, Hyperliquid, KuCoin, OKX
Comprehensive Logging Improvements (7 rounds of refinement)
Tag Standardization:
[memory],[warmup],[hourly],[fills],[mapping],[candle],[ranking],[mode]
Level Adjustments:
- Routine API/cache messages: INFO → DEBUG
- CCXT API payloads: DEBUG → TRACE
- Strict mode gaps: WARNING → DEBUG
- Persistent gaps: WARNING → INFO
Throttling:
- EMA ranking logs: every 5 minutes
- Mode changes: 2 minutes per symbol
- KucoinFetcher PnL discrepancy: 1 hour with delta-based deduplication
New Features:
- WebSocket reconnection logs explicit
[ws] reconnecting...messages - Health summary includes realized PnL when fills > 0
Bug Fixes
- Bybit: Fixed missing PnL on some close fills - Pagination bug in
_fetch_positions_history()caused records to be skipped when >100 existed
Documentation
- New
docs/ai/log_analysis_prompt.md- comprehensive logging guidelines - New
docs/ai/exchange_api_quirks.md- exchange-specific limitations - New
docs/ai/debugging_case_studies.md- debugging reference
Removed
--shadow-modeCLI flaglive.pnls_manager_shadow_modeconfig option- Legacy pnls methods
Migration Notes
- No action required - FillEventsManager automatically fetches and caches fill data
- Old
{user}_pnls.jsoncache files can be safely deleted after upgrading
Full Changelog: v7.6.2...v7.7.0