mirror of
https://github.com/mauricioabh/arbpulse.git
synced 2026-07-27 15:47:43 +00:00
a5c83ee026
Spans are now created and exported to Sentry only when SENTRY_TRACING is enabled (default off), keeping 24/7 operation within the free-tier span quota. Error monitoring stays always-on. Includes OpenSpec change gate-sentry-spans (proposal, design, specs, tasks). Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
1.5 KiB
Bash
40 lines
1.5 KiB
Bash
# Server
|
|
PORT=8080
|
|
|
|
# Engine tuning
|
|
MIN_NET_PROFIT_PCT=0.0005 # 0.05% minimum net return to execute
|
|
MAX_TRADE_BTC=0.25 # max BTC per simulated trade
|
|
STALE_MS=3000 # quote older than this is ignored
|
|
FLICKER_CONFIRM_MS=150 # opportunity must persist this long before executing
|
|
LATENCY_MS=120 # simulated detection->execution latency
|
|
LATENCY_SLIPPAGE_BPS=2 # adverse price drift applied during latency (basis points)
|
|
|
|
# Risk
|
|
CIRCUIT_BREAKER_LOSSES=5 # consecutive losing trades before pausing
|
|
CIRCUIT_BREAKER_COOLDOWN_MS=15000
|
|
|
|
# Wallets (per exchange, simulated)
|
|
INITIAL_USDT=50000
|
|
INITIAL_BTC=0.5
|
|
|
|
# Demo mode (injects synthetic divergences, clearly flagged)
|
|
DEMO_MODE=false
|
|
|
|
# Feed recorder (NDJSON to data/)
|
|
RECORD_FEED=false
|
|
|
|
# API docs — Scalar at GET /api-docs (OpenAPI generated from Zod; no env vars required)
|
|
|
|
# Observability — https://sentry.io (project: arbpulse)
|
|
SENTRY_DSN=
|
|
# Tracing/spans gate — default off. Error monitoring is always on when SENTRY_DSN
|
|
# is set; spans are only created/exported when SENTRY_TRACING is enabled. Kept off
|
|
# by default so 24/7 operation stays within Sentry's free-tier span quota.
|
|
SENTRY_TRACING=false
|
|
# Structured logs (pino); correlation IDs on REST, SSE, and WS hot path
|
|
LOG_LEVEL=info
|
|
|
|
# Upstash Redis — rate limit on /api/* and short-TTL snapshot cache for GET /api/state
|
|
UPSTASH_REDIS_REST_URL="https://natural-baboon-144595.upstash.io"
|
|
UPSTASH_REDIS_REST_TOKEN="gQAAAAAAAjTTAAIgcDE0MDk4MGZlOWMwN2M0NTdiOWQ5MWYxMjVhOWMyNWVlZQ"
|