Skip to content

Config keys

  • Fractions are fractions. 0.02 means 2%. Basis points end in _bps.
  • Decimals are strings. risk_per_trade = "0.02", not 0.02. A float is refused, so no value is rounded on the way in.
  • Unknown keys are refused, so a typo is an error, not a silently ignored setting.
  • Every key has bounds checked at start-up, upper as well as lower.
  • A missing key takes its default.
network = "paper" # "paper" | "testnet" | "mainnet"
listen = "127.0.0.1:8547"
[risk] # zunder-risk RiskLimits
risk_per_trade = "0.02"
max_open_risk = "0.06"
max_leverage = "5"
daily_loss_stop = "0.06"
drawdown_stop = "0.25"
# max_trading_equity_usd = "2000" # optional equity cap, off by default
[policy] # Guard's own rules
stop_policy = "attach" # "attach" | "refuse"
default_stop_distance = "0.02"
min_liquidation_distance = "0.10"
max_position_fraction = "2"
round_trip_cost_bps = "11"
# allowed_coins = ["BTC", "ETH"] # unset: all markets

[risk]: in code today (RiskLimits, crates/zunder-risk/src/limits.rs)

Section titled “[risk]: in code today (RiskLimits, crates/zunder-risk/src/limits.rs)”
KeyDefaultBoundsRule
risk_per_trade"0.02"> 0, ≤ 1; ≤ max_open_risk(g) max loss at the stop
max_open_risk"0.06"> 0, ≤ 1; ≥ risk_per_trade(e) max open risk
max_leverage"5"> 0, ≤ 100(c) max leverage
daily_loss_stop"0.06"> 0, ≤ 1(h) daily loss stop
drawdown_stop"0.25"> 0, ≤ 1(i) drawdown halt
max_trading_equity_usdunset (no cap)> 0, ≤ 2500 in Zunder’s code; Guard’s bound not decidedequity cap

[policy]: in the website’s judge today (SiteRules, crates/zunder-risk-wasm/src/judge.rs)

Section titled “[policy]: in the website’s judge today (SiteRules, crates/zunder-risk-wasm/src/judge.rs)”
KeyDefaultBoundsRule
stop_policy"attach""attach", "refuse"(b) protective stop
default_stop_distance"0.02"≥ 0.001, ≤ 0.25(b) where an attached stop goes
min_liquidation_distance"0.10"≥ 0.01, ≤ 0.5(d)
max_position_fraction"2"> 0, ≤ 50, ≤ max_leverage(f)
round_trip_cost_bps"11"≥ 0, ≤ 500costs counted into (g)
allowed_coinsunset: all markets≤ 1,000 coins(a)

Execution: in code today (SessionConfig, crates/zunder-exec/src/session.rs)

Section titled “Execution: in code today (SessionConfig, crates/zunder-exec/src/session.rs)”
KeyDefaultBoundsMeaning
entry_ttl_ms100001000–30000an entry reaching the venue later than this is refused there
stop_slippage"0.10"> 0, ≤ 0.5how far beyond its trigger a stop may fill
exit_slippage"0.05"> 0, ≤ 0.5how far from the reference price an exit may fill
flatten_attempts31–10attempts to close one position
recovery"conservative""conservative", "report_only"what a restart does with unknown orders and stopless positions
startup_waittrueboolrefuse entries for 35 s after start-up
KeyDefaultMeaning
network"paper"mainnet also needs the command line (networks)
listen"127.0.0.1:8547"where bots connect
relay.enabledfalserelay
telemetry.enabledfalseanonymous heartbeat