Hoox Docs

⚙️ Configuration Dictionary

This document serves as the absolute, exhaustive reference dictionary for every environment variable, encrypted Workers Secret, and dynamic KV runtime setting utilized in the Hoox trading ecosystem.


1. Environment Variables & Secrets Matrix (31 Keys)

These parameters are configured in your local .env.local file for building/deploying or injected as encrypted Workers Secrets for runtime isolate compute.

A. Core Platform & Infrastructure

VariableRequiredTypeDefaultDescription
CLOUDFLARE_API_TOKENYesstringCloudflare API Token with Workers, D1, and KV read/write permissions.
CLOUDFLARE_ACCOUNT_IDYesstringYour 32-character Cloudflare Dashboard Account hash.
SUBDOMAIN_PREFIXYesstringSubdomain prefix under which public worker gateways deploy.
NODE_ENVNostringproductionEnvironment profile: development, staging, or production.
HOOX_API_URLNostringLocal API target URL (automatically configured during dev runs).

B. Exchange API Credentials (Encrypted Secrets)

VariableRequiredTypeScopeDescription
BYBIT_API_KEYNostringtrade-workerBybit order placement account credential.
BYBIT_API_SECRETNostringtrade-workerBybit HMAC-SHA256 private order signature.
BINANCE_API_KEYNostringtrade-workerBinance trade permission credential.
BINANCE_API_SECRETNostringtrade-workerBinance private HMAC order signature.
MEXC_API_KEYNostringtrade-workerMEXC trade permission credential.
MEXC_API_SECRETNostringtrade-workerMEXC private HMAC order signature.

C. Telegram Bot Alerts & Telemetry

VariableRequiredTypeScopeDescription
TELEGRAM_BOT_TOKENNostringtelegram-workerTelegram HTTP API bot auth token from @BotFather.
TELEGRAM_CHAT_IDNostringtelegram-workerAuthorized numeric Chat ID for pushed fills and commands.

D. Multi-Provider AI Credentials

VariableRequiredTypeScopeDescription
OPENAI_API_KEYNostringagent-workerOpenAI API access key.
ANTHROPIC_API_KEYNostringagent-workerAnthropic Claude API access key.
GOOGLE_AI_API_KEYNostringagent-workerGoogle Gemini API access key.

E. DeFi & Web3 Wallet Settings

VariableRequiredTypeScopeDescription
ETH_MNEMONICNostringweb3-walletSecure 12 or 24-word seed phrase for on-chain contract swaps.
RPC_PROVIDER_URLNostringweb3-walletHTTP Ethereum / EVM JSON-RPC provider (e.g. Infura/Alchemy).

F. Email Parsing Inbox Connection

VariableRequiredTypeScopeDescription
EMAIL_HOSTNostringemail-workerPOP3/IMAP mailbox server address.
EMAIL_USERNostringemail-workerTarget signal mailbox email address.
EMAIL_PASSNostringemail-workerSecure app password for signal mailbox access.

2. Dynamic KV Manifest Settings (16 Keys)

These runtime variables exist inside the CONFIG_KV namespace. They are accessed globally at sub-millisecond speeds and take effect instantly upon being modified.

KV KeyTypeDefaultOperational Impact
trade:kill_switchbooleanfalseGlobal emergency halt. If true, all executions halt.
trade:max_daily_drawdown_percentnumber5.0Maximum daily loss before the AI Risk Manager triggers the kill switch.
webhooks:api_keystringyour_keyPublic webhook passkey checked during signal ingestion.
webhooks:queue_modestringqueue_failoverRouting behavior: direct_only, queue_failover, queue_everywhere.
exchanges:default_routingstringbybitDefault CEX fallback router: binance, bybit, or mexc.
routing:dynamic:enabledbooleanfalseEnables/disables dynamically shifting routes based on symbols.
email:scan_subjectstringTRADEPrefix required in signal email subjects.
email:coin_patternstring(BTC|ETH)Regex expression used to extract asset tokens from email bodies.
email:action_patternstring(BUY|SELL)Regex expression used to resolve buy/sell actions in email bodies.
email:authorized_sendersarray[]List of email addresses authorized to submit trade signals.
webhook:tradingview:ip_checkbooleanfalseToggles dropping payloads that don’t originate from TradingView IPs.

Tip: You can sync, check, or reset this entire KV manifest in one command: hoox config kv apply-manifest!

🔗 Next Steps