Live trading

Monitor live positions, strategy containers, and trading gates on the /trades workspace — what each panel shows and how to act on real capital safely.

The Live Trading workspace is where you watch strategies that have reached the live stage and are placing real orders on HyperLiquid. It shows open and closed positions, the deployed strategy containers behind them, a live signal chart, and a trading-gates strip that tells you, at a glance, whether the system is allowed to trade.

This page is for operators. It assumes a strategy has already survived the gauntlet and the strict paper-to-live gate — live trading is the last room in the pipeline, not the first. The page lives at the /trades route in the desktop app.

Forven is a research tool. Past results are not predictive, live behaviour can diverge from any backtest or paper run, and nothing here is financial advice. Live order routing is gated, and beta builds hard-lock execution to paper — see the note below before expecting real fills.

Beta builds run paper-only

Live order routing exists in the engine, but it is locked off in beta. When FORVEN_ENV=beta, get_execution_mode() returns paper no matter what config.json says, so the Live Trading page will show no real HyperLiquid positions on a beta install. Treat this page as a map of the live hub you will operate once live is unlocked, and as the reference for how live execution behaves underneath.

The lock is read at the use site, not the write site. A stale live value left in config.json can never take effect under a beta build — the engine re-checks the environment every time it reads the mode.

What you'll see

Open /trades. The workspace is chart-centric, with supporting panels around it:

  • Signal chart workspace — live OHLCV for the selected strategy with its entry/exit signals, indicators, and trade markers overlaid. This is the main panel.
  • Open trades — every open live position with entry price, current price, size, and unrealised PnL.
  • Closed trade history — the recent trade table below the chart, plus a recent ten-trade summary.
  • Deployed containers — the running strategy containers (the live "bots") feeding the workspace. Each is a strategy container: a deployed lifecycle strategy wrapping its config, backtest history, and audit log.
  • Strategy detail drawer — opens from the right with that strategy's metrics, lifecycle timeline, and audit trail.
  • Trading-gates strip — status indicators for the conditions that gate execution: execution mode, system pause, kill-switch, daily-loss halt, and exchange circuit-breaker health.
  • Paper / simulation overlay — when a paper session or simulation is active, its trades render as an overlay so you can compare against live. Paper trades are not real orders; see paper trading.

How a live position gets here

You do not place trades by hand from this page. Live orders originate from the scanner, which evaluates each live strategy's signals, and are submitted by the execution-trader agent — the only component with exchange access. Every other agent must queue a task for the execution-trader; direct order placement from anywhere else is not supported.

A live entry flows like this:

  1. The scanner emits a buy or sell signal for a live strategy (asset, direction, size, stop-loss, take-profit, leverage).
  2. It calls can_open() to check portfolio-level risk against the shared wallet: drawdown, daily-loss, per-trade risk, and the global position cap.
  3. If allowed, it queues an execution-trader task.
  4. The execution-trader submits the order via the HyperLiquid SDK (market or limit), serialised through a process-wide nonce lock so two orders never collide.
  5. HyperLiquid returns an order ID; a trade record is created with status='OPEN' and execution_type='live'.
  6. The agent reconciles the fill price and updates the trade. The position is now pooled with every other live strategy in one wallet.

One shared wallet

This is the single most important thing to understand before going live. Live execution pools all active strategies into one HyperLiquid wallet. Risk limits apply globally to that pool, not per strategy — max_concurrent_positions caps the whole wallet, and drawdown is measured across the combined account. Paper sessions, by contrast, stay isolated per session. Read risk controls before you deploy more than one strategy live.

Monitoring open positions

The open-trades panel reads from /api/trading/positions, which lists live positions straight from the HyperLiquid wallet, pooled across strategies. For each position you can see entry, current price, size, leverage, and unrealised PnL, and you can open the strategy detail drawer to inspect the lifecycle and audit log behind it.

Two position counts matter and are easy to confuse. The risk page reports open_positions (the live wallet count) separately from open_positions_paper (paper-session count). Only the first reflects real capital.

Closing a position manually

The Force close button on a position requests an immediate exit. Closing a single trade goes through the same reconciled path the system uses internally:

  1. Select the open position and choose Force close.
  2. The trade is marked pending_close_reconcile and an execution-trader close task is queued. Under the hood this calls POST /api/trading/close.
  3. The execution-trader submits a market-close order and captures the fill price.
  4. The trade is updated to status='CLOSED' with the real exit price, and pnl_usd / pnl_pct are finalised.
  5. Realised PnL rolls into the same-day total. If that total breaches the daily-loss limit, the daily-loss halt is set.

Force-close acts on one position. To halt everything at once, use the kill-switch on the risk page instead — that is the emergency brake, not this button.

The trading-gates strip

The gates strip is your "is the system even allowed to trade right now" readout. If any of these is active, new entries are blocked until it clears:

GateMeaningWhere it clears
Execution modepaper or live. Beta is locked to paper.Execution modes
System pauseThe whole system is paused.Operations / /ops
Kill-switchDrawdown breach auto-closed positions and halted trading.Manual reset on risk
Daily-loss haltSame-day realised loss hit the limit.Auto-clears next UTC day
Circuit breakersHyperLiquid health (hl_price, hl_trade, hl_account).Circuit breakers

The dashboard exposes a single trading_allowed flag that is the logical AND of these conditions. When it is false, the scanner will not open new positions even if a strategy is firing valid signals.

The kill-switch, in one line

If portfolio drawdown exceeds max_drawdown_pct (default 10, illustrative — yours is whatever you set), the kill-switch auto-triggers: it emergency-closes every open live position at market (escalating slippage caps across retries), halts trading, and waits for you to reset it manually. Resetting re-baselines the high-water mark to current equity, which is a destructive operation — understand it on the risk and risk-controls pages before you press the button.

Phantom recovery: why a position you didn't open might appear

At startup and roughly every thirty minutes, the engine reconciles the HyperLiquid wallet against its own SQLite trade records. If the exchange shows a filled position with no matching local trade, recovery creates a new trade record so the position is tracked rather than orphaned. Such a recovered trade is not linked to a strategy and may need manual review.

You will see recovery state on the risk page (recovery_* fields: active flag, status, position and discrepancy counts, batch ID). If you spot an unfamiliar position on /trades right after a restart, check recovery before assuming something went wrong — it is usually the system catching up to exchange truth, not a rogue order.

Strategy containers and the lifecycle

The deployed-containers list shows the live "bots" — one container per running live strategy. Containers are managed in the bot factory; the Live Trading page is the read-and-react view of what they are doing with real capital.

Live is not a terminal state. The risk-manager agent watches each live strategy's recent performance against its walk-forward baseline. If a strategy's trailing live Sharpe decays past decay_kill_switch_pct (default 30%, illustrative) over the monitoring window, the decay kill-switch autonomously demotes it back to paper and stops it trading — the engine retiring a strategy whose edge has rotted, without waiting for you. Every transition is logged as a strategy_event you can read in the detail drawer.

Caveats

  • Beta is paper-locked. You cannot place real orders on a beta build; /trades will reflect paper/simulation activity only.
  • Paper PnL is not live PnL. Paper fills at local candle prices and never touches the exchange. Do not read a paper run as a forecast of live results.
  • The wallet is shared and global. Position and risk limits apply to the whole pool. One badly-behaved strategy spends the whole account's risk budget.
  • Kill-switch reset is destructive. It re-baselines the high-water mark to current equity, which moves your drawdown reference point. Reset deliberately.
  • A recovered trade may be unlinked. Phantom recovery can create trade records with no parent strategy; review them.