SOFTWARE UPDATES (3.0.39 and later)
Install this package once using the included installer. Then open Software updates
in the dashboard and press Update. The bot downloads and verifies the release,
prepares dependencies, saves a program backup, restarts, and checks the running
version. Settings, keys and trading data stay in place. Stopped modes stay stopped.
HyperTrader and its updates are free. No paid licence or account code is needed.
Your existing Hyperliquid referral setup stays in place.
Let the referral unlock tool finish or stop it first.
The local backup retains private code edits; updates install official source.
If restart verification fails, the updater attempts to restore the old program.

The manual upload instructions in the PDF apply only to the initial upgrade from
older packages. After this installation, use the dashboard Update button.

PolyTrader HyperTrader Customer Kit

Start here:

1. Open setup-guide.html in a browser.
2. Follow the steps in order.
3. Never share your wallet seed phrase or main wallet private key.
4. Use the dashboard's Check connection button before starting any method.
5. Run only one method at a time.

Package version:

- Open the dashboard and check the version pill in the top-right corner.
- The same number is also in bot/VERSION.txt and PACKAGE-MANIFEST.json.

Latest default behavior:

- Prediction Autopilot sizes from the detected live balance, not a manual
  balance setting.
- New installs use Balanced: at most 10% of usable balance before the dollar
  cap, a $100 starting trade cap, 10x BTC hedge leverage, and a 5% daily-loss
  pause. Existing installs keep their saved settings.
- Cautious and More trades are also available from one-tap dashboard cards.
  Presets are starting risk policies, not profitability claims or personal advice.
- New Autopilot entries use a fail-closed all-in estimated-cost gate for fees,
  executable depth, slippage, funding, and the active edge floor. Trade
  results then use the actual fills, fees and funding.
- Each trade's P&L comes from its own fills on Hyperliquid (prediction buys,
  sells and settlement, the BTC hedge's realized result, fees, BTC funding)
  plus the open legs at current prices. Deposits, withdrawals and trades in
  other coins are not counted.
- Expiry safety net: if Autopilot is not running when its market expires, the
  dashboard closes the BTC hedge Autopilot recorded with one reduce-only order
  (DH_EXPIRY_GUARD=0 turns it off).
- A prediction or hedge that reads zero on Hyperliquid is only treated as
  closed outside the bot after 3 checks over at least a minute.
- Autopilot buys predictions with spot USDC and uses it as BTC hedge margin,
  which needs Hyperliquid's Unified Account mode (or USDC in both the spot and
  perp balances). Check connection shows the account mode.
- Prediction Market Arb reads the account's current Hyperliquid spot cross rate
  and subtracts it as a conservative outcome close/settlement fee before either
  the taker or maker edge can qualify. If the fee endpoint is unavailable, it
  uses the documented tier-zero rate instead of assuming zero.
- Prediction Market Arb is a beta mode and now starts in dry run with a 10%
  balance share and a 10 bp minimum post-fee edge on new installs. Live paired
  legs count only after both fills are confirmed. Unmatched inventory is
  flattened immediately when possible and flagged for manual action if not.
- Autopilot trades only the BTC daily market. ETH, SOL and HYPE daily
  markets on the same account are never traded by the bot, and tokens from
  manual trades in those markets are ignored rather than mistaken for a
  bot position.
- If the BTC hedge order at entry does not fill, the bot builds the hedge on
  a later loop, up to the size the entry cost check already priced.
- "Add more to clear winners" applies only to trades opened before the
  all-in entry cost gate. Trades opened by this version keep their entry size.
- Emergency stop: create a file named STOP-DH-BOT in the install folder and
  Prediction Autopilot exits cleanly on its next loop. Remove the file and
  start the method again to resume.
- The bot can cut a losing BTC hedge when the prediction side is already
  winning and the projected settlement profit still stays positive.
- After a hedge cut, the bot only re-arms the hedge if BTC breaks back through
  the target by the configured buffer. It no longer re-arms just because price
  is near the target.
- Entry sizing uses the post-migration USDC balance for prediction orders and
  hedge reserve checks, so legacy USDH dust cannot make the bot choose a size
  that later fails the final order gate.
- The dashboard includes a daily P&L calendar: closed cycles by UTC day, with
  today's open trade shown as an estimate until it closes.
- The dashboard can rebuild all-time realized P&L from the saved cycle event
  log if a VPS update leaves the state total stale.
- If AI is watch-only and the standard edge strategy opens the other side, the
  dashboard labels that clearly instead of presenting it as an AI-controlled
  decision.
- If an update happens while a prediction is already open, the bot can restore
  missing AI entry details from the saved event log. If no entry snapshot exists,
  the dashboard still shows the live AI readout but marks that trade as not
  scored.
- The bot records the Hyperliquid account address used to open each prediction
  cycle. If the dashboard account/API is changed while that cycle is still
  open, the bot pauses for review instead of writing unreliable P&L or touching
  a different account.
- The dashboard includes a cycle win/loss history so customers can see each
  completed prediction cycle's P&L separately from liquidation risk.
- Funds deposited or withdrawn while a trade is open show in account equity
  but never in the trade's P&L.
- The open P&L lock scales from the prediction position cost by default, with
  optional dollar floors for larger accounts.
- The daily loss guard can pause the bot for the current 06:00 UTC market-day
  window if realized plus open P&L reaches the configured loss limit.
- Hedge release now waits for the open P&L lock to be armed by default, so a
  winning prediction is not left unhedged before profit protection is active.
- When same-market re-entry is intentionally blocked after a manual/profit-lock
  close, the bot now waits locally instead of repeatedly polling Hyperliquid
  account/chart endpoints until the next daily market.
- If the daily loss guard paused the bot, turning the guard off and restarting
  now clears that specific daily-loss pause instead of leaving the bot stuck
  until the next market-day reset.
- AI/ML behavior, scoring, learning, and backtesting are summarized in
  ML_MODEL_NOTES.txt.

Updating an existing install:

1. Unzip the newest customer package on your computer.
2. Upload the new bot folder contents over the existing VPS folder:
   /root/polytrader-hypertrader/
3. SSH into the VPS.
4. Run:

   cd /root/polytrader-hypertrader
   sudo bash update.sh

The updater refreshes the bot program files, Python dependencies, dashboard,
and services. It preserves the saved customer config, account settings, bot
state, and logs under /opt/polytrader-hypertrader/.

If a trading method was already running, the installer restarts that same
method after the update. Open the dashboard after updating and confirm the
correct method is running.

For local installs, Windows users can run install.bat again. macOS users can
run ./install_macos.sh again. More detail is in bot/RUNNING_THE_BOT.txt.

Included files:

- setup-guide.html
- setup-guide.pdf, when built on a machine with Playwright installed
- bot/app.py, dashboard templates, strategy files, installers, and systemd services
- bot/RUNNING_THE_BOT.txt
- bot/VERSION.txt
- bot/update.sh
- ML_MODEL_NOTES.txt
- README.txt
- PACKAGE-MANIFEST.json

This customer kit intentionally does not include live logs, wallet addresses,
private keys, VPS state files, event logs, .env files, developer notes, tests,
or production backups.
