AuditsControls › Total exposure and leverage

Size and exposure · control 3 of 21

Total exposure and leverage: does your trading bot have it?

Besides the per-order cap, is there a limit on total exposure: the sum of open positions, the number of positions, or the maximum leverage?

Why it matters

A hundred small orders, each inside the cap, add up to a position that no per-order cap will stop.

How to check it in the code

  1. Search for max_open_trades, max_positions, max_exposure, leverage, margin.
  2. Check the limit is enforced before a new entry, not only reported.
  3. On futures, check leverage is set explicitly per market and capped.

This is what the audit does for every bot in the list, on public code, without installing or running anything. Verdict values: present, partial, absent, not applicable, not verified. See the method.

Results across audited bots

Across 10 audited bots: 3 present, 3 partial, 3 absent, 0 not applicable, 1 not verified.

BotVerdictEvidenceNote
HKUDS/Vibe-TradingPresentagent/src/live/enforcement.py check_mandate() steps 5-6 check max_total_exposure_usd (post-trade gross exposure) and max_leverage; fields defined in agent/src/live/mandate/model.py HardCapsExposure math is fail-closed on any unparseable position row.
hummingbot/hummingbotAbsentGET /search/code?q=max_active_positions OR max_position OR position_limit repo:hummingbot/hummingbot -> total_count 0 (2026-09-17)BudgetChecker only checks available balance for one order at a time; no aggregate exposure cap or account-wide leverage limit across positions/strategies was found.
Drakkar-Software/OctoBotAbsentai_index_distribution.py apply_ai_instructions(): the only bound applied to AI-proposed allocations is max(0, ...) (floor at zero) and a final normalize-to-100% step. No cap on total leveraged exposure, number of open positions, or max allocation change per cycle was found.On futures/options (index_trading.py checks self.exchange_manager.is_future/is_option) the same unlimited-normalize logic applies; leverage is set per-symbol elsewhere (exchange_config_data.py) but no global exposure ceiling was located.
freqtrade/freqtradeNot verified
jesse-ai/jessePartialjesse/models/FuturesExchange.py (available_margin sums open positions' cost minus PnL plus pending order cost, divided by futures_leverage, for backtest only) + jesse/config.py (per-exchange 'futures_leverage' and 'futures_leverage_mode' are the only exposure-related settings; no max-total-exposure, max-number-of-positions or max-drawdown key exists anywhere in config.py)No config key limits total exposure or position count across routes. In live trading, available_margin is whatever jesse_live's exchange stream reports (FuturesExchange.update_from_stream), which is unverifiable from this repo.
chrisleekr/binance-trading-botPartialapps/web/src/features/backtest/lib/decision-breakdown.ts, code comment: "regime / risk-cap / discovery guards from the grid path"The comment names a risk-cap guard as an entry veto category distinct from technical/indicator gates, indicating an exposure-limiting mechanism exists for the grid path. Did not open the risk-cap guard's own implementation file within budget to confirm its unit (max positions, % exposure, leverage) or whether it is per-symbol or whole-account.
alsk1992/CloddsBotPresentsrc/trading/risk.ts enforceExposureLimits() (maxTotalExposure, maxPositionValue per market/outcome) + src/trading/safety.ts (maxConcentrationPct, maxSameDirectionPositions), both invoked from src/risk/engine.ts validateTrade() checks 4 and 5-7.Portfolio-level exposure and concentration limits exist beyond the per-order cap.
Lumiwealth/lumibotAbsentNo env var, doc or code hit for a portfolio-wide exposure/leverage/position-count limit was found across docs/ENV_VARS.md, docs/AI_AGENT_FLOWS.md or the code-search terms tried.
YizhiSong/FriesTraderPresentrisk_rules.json position_sizing.max_concurrent_positions=4, min_cash_buffer_pct=0.10, combined with the 20% per-position cap; enforced as open_slots = max_concurrent_positions - live_positions in PHASE_B_TASK.md Step 7 and as the cash-buffer check inside scripts/position_sizing.py.Caps both position count and cash buffer, on top of the per-order cap -- covers the 'many small orders sum to one big position' risk.
c9s/bbgoPartialpkg/risk/dynamicrisk/dynamic_exposure.go; pkg/risk/riskcontrol/position.goDynamicExposureBollBand can shrink/grow the allowed exposure band per strategy and PositionRiskControl caps one symbol's base position, but no account-wide leverage/total-notional cap across all strategies and symbols was found.

If your bot does not have it

The watchdog enforces daily loss, drawdown, position size and heartbeat limits from outside the bot, with a read-only key, whatever the bot's own code does.