NATS_URL=nats://127.0.0.1:4222
CLICKHOUSE_URL=http://127.0.0.1:8123
CLICKHOUSE_DATABASE=default
REDIS_URL=redis://127.0.0.1:6379

# Options ingest
OPTIONS_INGEST_ADAPTER=synthetic
ALPACA_API_KEY=
ALPACA_REST_URL=https://data.alpaca.markets
ALPACA_WS_BASE_URL=wss://stream.data.alpaca.markets/v1beta1
ALPACA_FEED=indicative
ALPACA_UNDERLYINGS=SPY,NVDA,AAPL
ALPACA_STRIKES_PER_SIDE=8
ALPACA_MAX_DTE_DAYS=30
ALPACA_MONEYNESS_PCT=0.06
ALPACA_MONEYNESS_FALLBACK_PCT=0.1
ALPACA_MAX_QUOTES=200

# Databento replay
DATABENTO_API_KEY=
DATABENTO_DATASET=OPRA.PILLAR
DATABENTO_SCHEMA=trades
DATABENTO_START=
DATABENTO_END=
DATABENTO_SYMBOLS=SPY.OPT
DATABENTO_STYPE_IN=parent
DATABENTO_STYPE_OUT=instrument_id
DATABENTO_LIMIT=0
DATABENTO_PRICE_SCALE=1
DATABENTO_PYTHON_BIN=py/.venv/bin/python

# IBKR adapter (options)
IBKR_HOST=127.0.0.1
IBKR_PORT=7497
IBKR_CLIENT_ID=0
IBKR_SYMBOL=SPY
IBKR_EXPIRY=20250117
IBKR_STRIKE=450
IBKR_RIGHT=C
IBKR_EXCHANGE=SMART
IBKR_CURRENCY=USD
IBKR_PYTHON_BIN=python3

# Equities ingest
EQUITIES_INGEST_ADAPTER=synthetic
EMIT_INTERVAL_MS=1000
# When using EQUITIES_INGEST_ADAPTER=alpaca, choose "iex" (free) or "sip" (paid).
ALPACA_EQUITIES_FEED=iex

# Testing mode
TESTING_MODE=false
TESTING_THROTTLE_MS=200

# Compute consumer behavior
COMPUTE_DELIVER_POLICY=new
COMPUTE_CONSUMER_RESET=false
API_DELIVER_POLICY=new
API_CONSUMER_RESET=false
NBBO_MAX_AGE_MS=1000
NEXT_PUBLIC_NBBO_MAX_AGE_MS=1000
NEXT_PUBLIC_LIVE_HOT_WINDOW=2000
NEXT_PUBLIC_LIVE_HOT_WINDOW_OPTIONS=25000
NEXT_PUBLIC_PINNED_EVIDENCE_TTL_MS=1200000
NEXT_PUBLIC_PINNED_EVIDENCE_MAX_ITEMS=4000
ROLLING_WINDOW_SIZE=50
ROLLING_TTL_SEC=86400
CLASSIFIER_SWEEP_MIN_PREMIUM=40000
CLASSIFIER_SWEEP_MIN_COUNT=3
CLASSIFIER_SWEEP_MIN_PREMIUM_Z=2
CLASSIFIER_SPIKE_MIN_PREMIUM=20000
CLASSIFIER_SPIKE_MIN_SIZE=400
CLASSIFIER_SPIKE_MIN_PREMIUM_Z=2.5
CLASSIFIER_SPIKE_MIN_SIZE_Z=2
CLASSIFIER_Z_MIN_SAMPLES=12
CLASSIFIER_MIN_NBBO_COVERAGE=0.5
CLASSIFIER_MIN_AGGRESSOR_RATIO=0.55
CLASSIFIER_0DTE_MAX_ATM_PCT=0.01
CLASSIFIER_0DTE_MIN_PREMIUM=20000
CLASSIFIER_0DTE_MIN_SIZE=400

# Smart money refdata
# Optional JSON event-calendar cache used by compute for event-driven profile enrichment.
SMART_MONEY_EVENT_CALENDAR_PATH=data/event-calendar.json
# Refdata service also accepts REFDATA_EVENT_CALENDAR_PATH; if unset it falls back to SMART_MONEY_EVENT_CALENDAR_PATH.
REFDATA_EVENT_CALENDAR_PATH=
# Set to alpha_vantage to refresh the JSON cache from Alpha Vantage's EARNINGS_CALENDAR CSV endpoint.
REFDATA_EVENT_CALENDAR_PROVIDER=
ALPHA_VANTAGE_API_KEY=
ALPHA_VANTAGE_EARNINGS_HORIZON=3month
ALPHA_VANTAGE_EARNINGS_SYMBOL=
REFDATA_EVENT_CALENDAR_REFRESH_MS=86400000

# Replay service
REPLAY_ENABLED=false
REPLAY_STREAMS=options,nbbo,equities,equity-quotes
REPLAY_START_TS=0
REPLAY_END_TS=0
REPLAY_SPEED=1
REPLAY_BATCH_SIZE=200
REPLAY_LOG_EVERY=1000

# API live retention (generic channels)
LIVE_LIMIT_OPTIONS=10000
LIVE_LIMIT_NBBO=10000
LIVE_LIMIT_EQUITIES=10000
LIVE_LIMIT_EQUITY_QUOTES=10000
LIVE_LIMIT_EQUITY_JOINS=10000
LIVE_LIMIT_FLOW=10000
LIVE_LIMIT_CLASSIFIER_HITS=10000
LIVE_LIMIT_ALERTS=10000
LIVE_LIMIT_INFERRED_DARK=10000
