JUP7 v1.1.0 reproduction — 2026-11-28T04:05:07.622491+00:00
No trading keys, no CLI auth, JUP_LIVE_TRADING=0 unless a test explicitly sets a gate.

$ python3 -m py_compile code/*.py

EXIT 0

$ bash -n buyer-ready/start.sh

EXIT 0

$ JUP_LIVE_TRADING=0 python3 code/jup_v7_live.py --show-config
{
  "asset": "SOL",
  "signal_momentum_days": 14,
  "minimum_momentum": 0.03,
  "leverage": 10.0,
  "take_profit_pct": 0.15,
  "stop_loss_pct": 0.07,
  "trailing_stop_enabled": false,
  "max_per_trade_loss_pct_of_equity": 1.0,
  "per_trade_stop_loss_usd": 7.3,
  "collateral_percentage_cap": null,
  "venue_minimum_collateral_usd": 10.0,
  "live_trading_enabled": false,
  "expected_wallet": "EFCC9rEwbsBHr92vNTyGHYRswH1fg5M8ZdrPCfuSsLpQ",
  "wallet_confirmation_matches": false
}

EXIT 0

$ JUP_LIVE_TRADING=1 JUP_GO_LIVE_CONFIRM=0 python3 code/jup_v7_live.py --show-config
{
  "asset": "SOL",
  "signal_momentum_days": 14,
  "minimum_momentum": 0.03,
  "leverage": 10.0,
  "take_profit_pct": 0.15,
  "stop_loss_pct": 0.07,
  "trailing_stop_enabled": false,
  "max_per_trade_loss_pct_of_equity": 1.0,
  "per_trade_stop_loss_usd": 7.3,
  "collateral_percentage_cap": null,
  "venue_minimum_collateral_usd": 10.0,
  "live_trading_enabled": false,
  "expected_wallet": "EFCC9rEwbsBHr92vNTyGHYRswH1fg5M8ZdrPCfuSsLpQ",
  "wallet_confirmation_matches": false
}

EXIT 0

$ python3 code/jup_v7_live.py --check
JUP7 SETUP CHECK (no trading, no signing)
CLI version: pinned minimum 1.3.0; current not queried
Mode: DRY RUN
Intended behaviour: 14-day momentum, |move| >= 0.03, 10.0x, TP 15%, SL 7%, $10 collateral
Live trading flag: False
Go-live requires BOTH JUP_LIVE_TRADING=1 and JUP_GO_LIVE_CONFIRM=1
Network calls: Jupiter CLI, Coinbase candles, Kraken OHLC, Solana RPC, OKX funding/open interest

EXIT 0

$ python3 package/tests/jup_v7_selftest.py
2026-11-27 22:05:01,296 WARNING close pnl: response pnlUsd 9.7 differs from history 3.46; history used
2026-11-27 22:05:01,297 WARNING close pnl: history unavailable (timeout); using close response
2026-11-27 22:05:01,297 INFO close pnl: no matching decrease row
2026-11-27 22:05:01,298 ERROR external close of PK: history read failed (timeout); entries stay blocked
2026-11-27 22:05:01,298 WARNING external close of PK not reconciled yet (no matching decrease row); retry next cycle
2026-11-27 22:05:01,299 WARNING external close of PK not reconciled yet (no matching decrease row); retry next cycle
2026-11-27 22:05:01,299 WARNING external close of PK not reconciled yet (no matching decrease row); retry next cycle
2026-11-27 22:05:01,299 WARNING external close of PK not reconciled yet (no matching decrease row); retry next cycle
2026-11-27 22:05:01,300 ERROR external close of PK could not be reconciled to history; safety gates NOT updated and entries stay blocked until it indexes
2026-11-27 22:05:04,371 INFO WITHDRAWAL: transferring $10.0000 USDC to ADDR
2026-11-27 22:05:04,371 INFO WITHDRAWAL completed: moved $10.00 USDC
test_all_zero_amounts_fail_closed (__main__.TestBalanceFailsClosed.test_all_zero_amounts_fail_closed) ... ok
test_empty_token_list_fails_closed (__main__.TestBalanceFailsClosed.test_empty_token_list_fails_closed) ... ok
test_missing_token_key_fails_closed (__main__.TestBalanceFailsClosed.test_missing_token_key_fails_closed) ... ok
test_partial_mismatch_is_a_warning_not_a_failure (__main__.TestBalanceFailsClosed.test_partial_mismatch_is_a_warning_not_a_failure) ... ok
test_valid_balance_passes (__main__.TestBalanceFailsClosed.test_valid_balance_passes) ... ok
test_zero_tokens_with_nonzero_total_fails_closed (__main__.TestBalanceFailsClosed.test_zero_tokens_with_nonzero_total_fails_closed) ... ok
test_curve_above_target_is_steeper (__main__.TestBorrowGuard.test_curve_above_target_is_steeper) ... ok
test_decoder_matches_snapshot (__main__.TestBorrowGuard.test_decoder_matches_snapshot) ... ok
test_decoder_rejects_wrong_length (__main__.TestBorrowGuard.test_decoder_rejects_wrong_length) ... ok
test_over_cap_blocks_entry_on_that_side_only (__main__.TestBorrowGuard.test_over_cap_blocks_entry_on_that_side_only) ... ok
test_read_failure_fails_closed (__main__.TestBorrowGuard.test_read_failure_fails_closed) ... ok
test_under_cap_allows_entry (__main__.TestBorrowGuard.test_under_cap_allows_entry) ... ok
test_argv_spawn_avoids_shell_shim (__main__.TestCliSpawn.test_argv_spawn_avoids_shell_shim) ... ok
test_gate_gets_venue_dollars_not_response_pct (__main__.TestClosePnlSource.test_gate_gets_venue_dollars_not_response_pct) ... ok
test_unreconciled_close_falls_back_to_response_dollars (__main__.TestClosePnlSource.test_unreconciled_close_falls_back_to_response_dollars) ... ok
test_leverage_within_sane_range (__main__.TestConfig.test_leverage_within_sane_range) ... ok
test_round_trip_cost_positive_and_plausible (__main__.TestConfig.test_round_trip_cost_positive_and_plausible) ... ok
test_trend_filter_defaults_off (__main__.TestConfig.test_trend_filter_defaults_off) ... ok
test_non_sol_rows_are_excluded (__main__.TestExecutionSummaryAssetFilter.test_non_sol_rows_are_excluded) ... ok
test_synthetic_win_and_loss_aggregate_gross (__main__.TestExecutionSummaryAssetFilter.test_synthetic_win_and_loss_aggregate_gross) ... ok
test_history_error_is_retried_not_guessed (__main__.TestExternalCloseSettlement.test_history_error_is_retried_not_guessed) ... ok
test_stop_out_reaches_safety_gate (__main__.TestExternalCloseSettlement.test_stop_out_reaches_safety_gate) ... ok
test_unreconciled_close_retries_then_gives_up_without_gate_update (__main__.TestExternalCloseSettlement.test_unreconciled_close_retries_then_gives_up_without_gate_update) ... ok
test_collateral_scales_with_equity (__main__.TestPositionCollateral.test_collateral_scales_with_equity) ... ok
test_never_exceeds_available (__main__.TestPositionCollateral.test_never_exceeds_available) ... ok
test_one_stop_out_leaves_room_to_reenter (__main__.TestPositionCollateral.test_one_stop_out_leaves_room_to_reenter) ... ok
test_small_account_falls_below_the_venue_minimum (__main__.TestPositionCollateral.test_small_account_falls_below_the_venue_minimum) ... ok
test_confirmation_read_error_fails_closed (__main__.TestPositionsConfirmed.test_confirmation_read_error_fails_closed) ... ok
test_empty_book_is_confirmed_before_accepting (__main__.TestPositionsConfirmed.test_empty_book_is_confirmed_before_accepting) ... ok
test_empty_then_populated_returns_the_populated_read (__main__.TestPositionsConfirmed.test_empty_then_populated_returns_the_populated_read) ... ok
test_populated_book_is_not_reread (__main__.TestPositionsConfirmed.test_populated_book_is_not_reread) ... ok
test_flat_is_the_wallet (__main__.TestRealizedEquity.test_flat_is_the_wallet) ... ok
test_high_water_never_falls (__main__.TestRealizedEquity.test_high_water_never_falls) ... ok
test_high_water_rises_with_realized (__main__.TestRealizedEquity.test_high_water_rises_with_realized) ... ok
test_one_stop_out_trips_the_soft_pause_and_rebases (__main__.TestRealizedEquity.test_one_stop_out_trips_the_soft_pause_and_rebases) ... ok
test_open_position_is_marked_at_cost (__main__.TestRealizedEquity.test_open_position_is_marked_at_cost) ... ok
test_two_stop_outs_trip_the_guard (__main__.TestRealizedEquity.test_two_stop_outs_trip_the_guard) ... ok
test_fixed_collateral_clears_the_dollar_risk_budget (__main__.TestRiskGateAllowsVenueMinimum.test_fixed_collateral_clears_the_dollar_risk_budget) ... ok
test_risk_cap_is_not_below_one (__main__.TestRiskGateAllowsVenueMinimum.test_risk_cap_is_not_below_one) ... ok
test_stop_loss_matches_the_risk_model (__main__.TestRiskGateAllowsVenueMinimum.test_stop_loss_matches_the_risk_model) ... ok
test_venue_minimum_collateral_is_reachable (__main__.TestRiskGateAllowsVenueMinimum.test_venue_minimum_collateral_is_reachable) ... ok
test_equity_gate_blocks_trade_when_stop_too_big (__main__.TestRiskMath.test_equity_gate_blocks_trade_when_stop_too_big) ... ok
test_estimate_stop_loss_usd (__main__.TestRiskMath.test_estimate_stop_loss_usd) ... ok
test_long_tp_above_sl (__main__.TestRiskMath.test_long_tp_above_sl) ... ok
test_open_risk_fields_carry_planned_risk (__main__.TestRiskMath.test_open_risk_fields_carry_planned_risk) ... ok
test_open_risk_fields_zero_size (__main__.TestRiskMath.test_open_risk_fields_zero_size) ... ok
test_plan_risk_explicit_stop (__main__.TestRiskMath.test_plan_risk_explicit_stop) ... ok
test_plan_risk_matches_notional_times_stop_plus_fee (__main__.TestRiskMath.test_plan_risk_matches_notional_times_stop_plus_fee) ... ok
test_plan_risk_zero_notional (__main__.TestRiskMath.test_plan_risk_zero_notional) ... ok
test_short_tp_below_sl (__main__.TestRiskMath.test_short_tp_below_sl) ... ok
test_stop_distance_capped_by_liquidation_buffer (__main__.TestRiskMath.test_stop_distance_capped_by_liquidation_buffer) ... ok
test_stop_distance_shrinks_at_high_leverage (__main__.TestRiskMath.test_stop_distance_shrinks_at_high_leverage) ... ok
test_rebase_rejects_invalid_equity (__main__.TestSafetyPeakRebase.test_rebase_rejects_invalid_equity) ... ok
test_rebase_resets_the_high_water_mark (__main__.TestSafetyPeakRebase.test_rebase_resets_the_high_water_mark) ... ok
test_below_threshold_returns_none (__main__.TestSignal.test_below_threshold_returns_none) ... ok
test_flat_market_no_signal (__main__.TestSignal.test_flat_market_no_signal) ... ok
test_insufficient_data (__main__.TestSignal.test_insufficient_data) ... ok
test_long_above_threshold (__main__.TestSignal.test_long_above_threshold) ... ok
test_short_below_threshold (__main__.TestSignal.test_short_below_threshold) ... ok
test_filter_off_allows_everything (__main__.TestTrendFilter.test_filter_off_allows_everything) ... ok
test_insufficient_history_passes (__main__.TestTrendFilter.test_insufficient_history_passes) ... ok
test_long_allowed_above_sma (__main__.TestTrendFilter.test_long_allowed_above_sma) ... ok
test_long_blocked_below_sma (__main__.TestTrendFilter.test_long_blocked_below_sma) ... ok
test_short_allowed_below_sma (__main__.TestTrendFilter.test_short_allowed_below_sma) ... ok
test_short_blocked_above_sma (__main__.TestTrendFilter.test_short_blocked_above_sma) ... ok
test_reserve_blocks_a_transfer_that_would_starve_the_bot (__main__.TestWithdrawalReserve.test_reserve_blocks_a_transfer_that_would_starve_the_bot) ... ok
test_transfer_sends_only_the_reservable_amount (__main__.TestWithdrawalReserve.test_transfer_sends_only_the_reservable_amount) ... ok
test_transfer_skips_when_balance_is_below_the_reserve (__main__.TestWithdrawalReserve.test_transfer_skips_when_balance_is_below_the_reserve) ... ok

----------------------------------------------------------------------
Ran 68 tests in 3.079s

OK

EXIT 0

$ python3 -m unittest discover -s code/tests
.C:\Users\lana\AppData\Local\hermes\cache\scratch\jup7-verify-20261128\code\tests\test_journal_csv.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='C:\\Users\\lana\\AppData\\Local\\Temp\\tmpe2to85sj\\trade_journal.csv' mode='r' encoding='utf-8'>
  text = open(path, encoding='utf-8').read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
..........
----------------------------------------------------------------------
Ran 11 tests in 2.827s

OK

EXIT 0
