# Short Hunter Datasource Gateway — Environment Variables # Copy this file to .env for local development. # In HuggingFace Spaces, add these as Space secrets (never commit real keys). # ============================================================ # PROXY / NETWORK (region-blocked exchange workaround) # ============================================================ # If KuCoin or Binance are blocked in the HF Space region, configure a proxy. # The app will not modify system DNS. Use these env vars instead. HTTP_PROXY= HTTPS_PROXY= ALL_PROXY= # ============================================================ # EXCHANGE BASE URL OVERRIDES # ============================================================ # Override if you need to route through a regional endpoint or proxy. KUCOIN_FUTURES_BASE_URL=https://api-futures.kucoin.com BINANCE_FUTURES_BASE_URL=https://fapi.binance.com # ============================================================ # PROVIDER API KEYS (all optional — system works without them) # ============================================================ # CoinGecko Pro — optional, increases rate limits COINGECKO_API_KEY= # CryptoCompare — optional, increases rate limits on OHLCV/price endpoints CRYPTOCOMPARE_KEY= CRYPTOCOMPARE_API_KEY= # CoinMarketCap — optional, enables CMC as primary market data source COINMARKETCAP_KEY= CMC_API_KEY= # CryptoPanic — optional, enables news sentiment capability CRYPTOPANIC_KEY= CRYPTOPANIC_API_KEY= # NewsAPI — optional, enables headline news capability NEWS_API_KEY= NEWSAPI_KEY= # ============================================================ # PROVIDER BEHAVIOR TUNING # ============================================================ # HTTP request timeout per provider call (milliseconds) PROVIDER_TIMEOUT_MS=10000 # Cache TTL for in-memory provider results (seconds) PROVIDER_CACHE_TTL_SECONDS=30 # Circuit breaker: failures before cooldown SH_PROVIDER_MAX_FAILURES=3 # Circuit breaker: cooldown duration (seconds) SH_PROVIDER_COOLDOWN_SECONDS=90 # Stale cache threshold: if cached data is older than this, activate no-trade guard (seconds) PROVIDER_STALE_CACHE_THRESHOLD_SECONDS=300 # Rate limit cooldown after 429 response (seconds) PROVIDER_RATE_LIMIT_COOLDOWN_SECONDS=120 # ============================================================ # PROVIDER ORDER OVERRIDES (comma-separated, lowercase) # ============================================================ SH_PROVIDER_ORDER_UNIVERSE=kucoin,binance,coingecko SH_PROVIDER_ORDER_CONTRACT=kucoin,binance SH_PROVIDER_ORDER_TICKER=kucoin,binance,coingecko,cryptocompare SH_PROVIDER_ORDER_OHLCV=kucoin,binance,cryptocompare SH_PROVIDER_ORDER_ORDERBOOK=kucoin,binance SH_PROVIDER_ORDER_FUNDING=kucoin,binance SH_PROVIDER_ORDER_OPEN_INTEREST=kucoin,binance SH_PROVIDER_ORDER_MARK_INDEX=kucoin,binance SH_PROVIDER_ORDER_SENTIMENT=alternative_me,cryptopanic # ============================================================ # HUGGING FACE # ============================================================ HF_TOKEN= HF_MODE=public # ============================================================ # APPLICATION # ============================================================ PORT=7860 USE_MOCK_DATA=false