Configuration
Tunable risk and strategy parameters. Stored in the database, not hardcoded.
Global config
Applies to the whole system.
| Key | Value | Type | Editable | Description |
|---|---|---|---|---|
| defaultOrderTtlSeconds | 120 | integer | yes | Default time-to-live for unfilled orders before cancellation. |
| globalDailyLossLimitUsd | "100.00000000" | decimal | yes | Maximum realized+unrealized loss allowed per day before halting. |
| killSwitchEnabled | false | boolean | yes | Master kill switch. When true, the Risk Engine halts new orders. |
| liveTradingRequiresEnvFlag | true | boolean | yes | Live trading requires both DB config and the LIVE_TRADING_ENABLED env flag. |
| maxLiveOrderSizeUsd | "10.00000000" | decimal | yes | Maximum size for a single live order. |
| maxOpenExposureUsd | "75.00000000" | decimal | yes | Maximum total open exposure across all strategies. |
| maxPaperOrderSizeUsd | "50.00000000" | decimal | yes | Maximum size for a single paper order. |
| polymarket.baseUrl | "https://gamma-api.polymarket.com" | string | yes | Polymarket Gamma API base URL (public, read-only). |
| polymarket.enabled | true | boolean | yes | Whether the read-only Polymarket adapter is enabled. |
| polymarket.maxRetries | 3 | integer | yes | Max retries for Polymarket reads. |
| polymarket.rateLimitBackoffMs | 1000 | integer | yes | Base backoff (ms) on rate limit / retry. |
| polymarket.timeoutMs | 8000 | integer | yes | Per-request timeout for Polymarket reads. |
| retentionRawSnapshotDays | 7 | integer | yes | Days to retain unlinked raw snapshots before deletion. |
| workerLoopIntervalSeconds | 60 | integer | yes | Worker scheduler loop interval in seconds. |
Strategy config
Per-strategy overrides.
| Key | Value | Type | Editable | Description |
|---|---|---|---|---|
| allowFakeMarkets | false | boolean | yes | Allow the internal fake market source. Must be true (with marketDataSource='fake') to use fake markets. |
| allowSubjectiveCategories | false | boolean | yes | Whether subjective/ambiguous market categories are allowed. |
| exitEarlyEnabled | false | boolean | yes | Whether early exit before resolution is enabled. |
| marketDataSource | "polymarket" | string | yes | Market data source: 'polymarket' (real, read-only) or 'fake'. |
| maxMarketDataAgeSeconds | 30 | integer | yes | Maximum market data age (seconds) before data is considered stale. |
| maxMarketExposureUsd | "15.00000000" | decimal | yes | Maximum open exposure for a single market. |
| maxPositionSizeUsd | "10.00000000" | decimal | yes | Maximum size for a single position. |
| maxSpread | "0.02000000" | decimal | yes | Maximum bid/ask spread. |
| maxStrategyExposureUsd | "50.00000000" | decimal | yes | Maximum open exposure for this strategy. |
| maxTimeToResolutionHours | 168 | integer | yes | Maximum time to market resolution. |
| minConfidence | "0.98500000" | decimal | yes | Minimum confidence to act on an opportunity. |
| minLiquidityUsd | "500.00000000" | decimal | yes | Minimum market liquidity. |
| minNetEvUsd | "0.01000000" | decimal | yes | Minimum net expected value to act. |
| minVolume24hUsd | "100.00000000" | decimal | yes | Minimum 24h volume. |
| orderSizeUsd | "5.00000000" | decimal | yes | Target order size the strategy requests per opportunity. |
| priceMax | "0.98500000" | decimal | yes | Maximum buy price. |
| priceMin | "0.94000000" | decimal | yes | Minimum buy price. |
| takerFeeRate | "0.00500000" | decimal | yes | Taker fee rate applied to notional for paper fills and EV estimation. |