diff --git a/.env.example b/.env.example index b39f89d..5e18120 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/src/config/index.js b/src/config/index.js index 6cd06e3..867fa47 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -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) diff --git a/src/services/makerRebateExecutor.js b/src/services/makerRebateExecutor.js index f5f1799..ddaac87 100644 --- a/src/services/makerRebateExecutor.js +++ b/src/services/makerRebateExecutor.js @@ -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;