Configuration

Tunable risk and strategy parameters. Stored in the database, not hardcoded.

Global config
Applies to the whole system.
KeyValueTypeEditableDescription
defaultOrderTtlSeconds120integeryesDefault time-to-live for unfilled orders before cancellation.
globalDailyLossLimitUsd"100.00000000"decimalyesMaximum realized+unrealized loss allowed per day before halting.
killSwitchEnabledfalsebooleanyesMaster kill switch. When true, the Risk Engine halts new orders.
liveTradingRequiresEnvFlagtruebooleanyesLive trading requires both DB config and the LIVE_TRADING_ENABLED env flag.
maxLiveOrderSizeUsd"10.00000000"decimalyesMaximum size for a single live order.
maxOpenExposureUsd"75.00000000"decimalyesMaximum total open exposure across all strategies.
maxPaperOrderSizeUsd"50.00000000"decimalyesMaximum size for a single paper order.
polymarket.baseUrl"https://gamma-api.polymarket.com"stringyesPolymarket Gamma API base URL (public, read-only).
polymarket.enabledtruebooleanyesWhether the read-only Polymarket adapter is enabled.
polymarket.maxRetries3integeryesMax retries for Polymarket reads.
polymarket.rateLimitBackoffMs1000integeryesBase backoff (ms) on rate limit / retry.
polymarket.timeoutMs8000integeryesPer-request timeout for Polymarket reads.
retentionRawSnapshotDays7integeryesDays to retain unlinked raw snapshots before deletion.
workerLoopIntervalSeconds60integeryesWorker scheduler loop interval in seconds.
Strategy config
Per-strategy overrides.
KeyValueTypeEditableDescription
allowFakeMarketsfalsebooleanyesAllow the internal fake market source. Must be true (with marketDataSource='fake') to use fake markets.
allowSubjectiveCategoriesfalsebooleanyesWhether subjective/ambiguous market categories are allowed.
exitEarlyEnabledfalsebooleanyesWhether early exit before resolution is enabled.
marketDataSource"polymarket"stringyesMarket data source: 'polymarket' (real, read-only) or 'fake'.
maxMarketDataAgeSeconds30integeryesMaximum market data age (seconds) before data is considered stale.
maxMarketExposureUsd"15.00000000"decimalyesMaximum open exposure for a single market.
maxPositionSizeUsd"10.00000000"decimalyesMaximum size for a single position.
maxSpread"0.02000000"decimalyesMaximum bid/ask spread.
maxStrategyExposureUsd"50.00000000"decimalyesMaximum open exposure for this strategy.
maxTimeToResolutionHours168integeryesMaximum time to market resolution.
minConfidence"0.98500000"decimalyesMinimum confidence to act on an opportunity.
minLiquidityUsd"500.00000000"decimalyesMinimum market liquidity.
minNetEvUsd"0.01000000"decimalyesMinimum net expected value to act.
minVolume24hUsd"100.00000000"decimalyesMinimum 24h volume.
orderSizeUsd"5.00000000"decimalyesTarget order size the strategy requests per opportunity.
priceMax"0.98500000"decimalyesMaximum buy price.
priceMin"0.94000000"decimalyesMinimum buy price.
takerFeeRate"0.00500000"decimalyesTaker fee rate applied to notional for paper fills and EV estimation.