feat: configurable price polling interval via MAKER_MM_POLL_SEC

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
direkturcrypto
2026-04-03 13:34:55 +07:00
parent f376b439a5
commit e4e8d1f62c
3 changed files with 6 additions and 1 deletions
+4
View File
@@ -107,6 +107,10 @@ MAKER_MM_MAX_PRICE=0.69
# Default false (symmetric maker behavior — wait for both sides)
MAKER_MM_CANCEL_CHEAP_ON_EXP_FILL=false
# Price polling interval (seconds) while waiting for entry conditions
# Lower = more responsive but more API calls. Default: 3
MAKER_MM_POLL_SEC=3
# ── Current Market Entry (optional) ─────────────────────────────
# Allow entering markets that are already in progress
# Useful for catching mid-market opportunities
+1
View File
@@ -102,6 +102,7 @@ const config = {
makerMmMaxPrice: parseFloat(process.env.MAKER_MM_MAX_PRICE || '0.69'), // max bid for rebate range (both sides)
// When true: if expensive side fills first, cancel cheap side and hold to redemption
makerMmCancelCheapOnExpFill: process.env.MAKER_MM_CANCEL_CHEAP_ON_EXP_FILL === 'true',
makerMmPollSec: parseInt(process.env.MAKER_MM_POLL_SEC || '3', 10),
// ── Current Market Settings ────────────────────────────────────
// Enable trading on current active market (not just next market)
+1 -1
View File
@@ -677,7 +677,7 @@ export async function executeMakerRebateStrategy(market) {
logger.info(`MakerMM${tag}: ${sim}entering — ${label}`);
// ── Wait for real YES price ─────────────────────────────────
const POLL_SEC = 3;
const POLL_SEC = config.makerMmPollSec;
const ts = parseFloat(tickSize);
let yesBid, noBid, combined;