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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user