Add configurable tick interval (time between trades)
- Seed tick_interval_seconds setting (default 60s) - Expose tick_interval_seconds via GET/PATCH /api/settings - startScheduler reads the setting at start time; enforces 5s minimum - getSchedulerStatus returns intervalSeconds for the UI - Main page: "Every [__] s" input in idle bar — saves on blur, persists across restarts; running state displays "every Ns" next to symbol/action Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
39d7c5761c
commit
245a15666e
@@ -161,6 +161,7 @@ db.exec(`
|
||||
// Seed defaults if missing
|
||||
const seedSetting = db.prepare(`INSERT OR IGNORE INTO settings (key, value) VALUES (?, ?)`);
|
||||
seedSetting.run('max_concurrent_accounts', '5');
|
||||
seedSetting.run('tick_interval_seconds', '60');
|
||||
|
||||
export function getSetting(key: string): string | null {
|
||||
const row = db.prepare('SELECT value FROM settings WHERE key = ?').get(key) as { value: string } | undefined;
|
||||
|
||||
Reference in New Issue
Block a user