# ═══════════════════════════════════════════════════════════════ # openvibe.trade — environment configuration (names only; never commit values) # Copy to .env for development. Production: /etc/openvibe/trade.env (0600). # Information only: there is no payment, brokerage or custody configuration, by design (ADR-025). # ═══════════════════════════════════════════════════════════════ # Server PORT=4860 HOST=127.0.0.1 NODE_ENV=development # Public origin: canonical URLs, feeds, sitemaps and JSON-LD are built from it BASE_URL=http://localhost:4860 # Proxy hops that set X-Forwarded-For (Cloudflare → nginx → Node = 2) TRUST_PROXY=2 # Per-actor limits (server/http/actor-limits.js): API reads one caller (a signed-in person, an app, # else an address) may make per minute and per hour; past them 429 rate_limited with Retry-After. # Signed-out reads keep the per-address limit only. Writes have their own numbers (README). The # per-address limits stay. #TRADE_LIMITS_MINUTE=120 #TRADE_LIMITS_HOUR=3000 # PostgreSQL (ADR-035), written by OpenVibe.Host roles/data/add-service.sh trade: the runtime role through PgBouncer, # the owner on a direct connection (migrations), and Valkey (shared limit counters). # Without DATABASE_URL, development uses an embedded PGlite database in data/pglite. DATABASE_URL= DATABASE_DIRECT_URL= # Overrides the embedded PGlite directory used when DATABASE_URL is empty (tests use one of their own) #TRADE_PGLITE_DIR= VALKEY_URL= VALKEY_PREFIX= # OpenVibe.Network — SSO (OAuth2), JWKS, client-credentials tokens OV_NETWORK_URL=https://openvibe.network OV_NETWORK_INTERNAL_URL=http://127.0.0.1:4000 # OAuth client `trade` (redirect https://openvibe.trade/auth/callback). The same client is Trade's # service principal svc:trade for client-credentials grants (see README, "Grants"). OV_OAUTH_CLIENT_ID=trade OV_OAUTH_CLIENT_SECRET= # Production: https://openvibe.trade/auth/callback (default: BASE_URL + /auth/callback) #OV_OAUTH_REDIRECT_URI= # Cookies: Secure by default in production; set false for plain-http local development #COOKIE_SECURE=false # Signs the watchlist, alert and editor form tokens (CSRF). Unset: random per process. #TRADE_FORM_SECRET= # Editors (create instruments, write context, review AI drafts): Network subjects, comma-separated. # Staff with staff.editorial.manage (Network admins) are editors too; this list is the product's own role. TRADE_EDITORS= # OpenVibe.Sources — the trade category (filings, market data feeds), read by cursor with the # service token above (sources.item.read, sources.source.read). Off while the secret is unset. OV_SOURCES_INTERNAL_URL=http://127.0.0.1:4720 #TRADE_SYNC_INTERVAL_MS=60000 #TRADE_SYNC_PAGE_LIMIT=200 #TRADE_SYNC_MAX_PAGES=20 # Freshness: the window for a source that reports none, and the age after which a monetary # observation makes an instrument page noindex (stale_price) #TRADE_DEFAULT_STALE_AFTER_SEC=10800 #TRADE_PRICE_MAX_AGE_SEC=86400 #TRADE_FRESHNESS_INTERVAL_MS=60000 # Indexability: minimum words of reviewed context before an instrument page may be indexed #TRADE_GATE_MIN_WORDS=60 # How long the sitemaps' instrument list (every index candidate's gate decision) is reused, in ms (production # default 600000; 0 rebuilds on every read, the default elsewhere). Concurrent reads share one build either way. #TRADE_SITEMAP_TTL_MS=600000 # OpenVibe.AI — the instrument briefs and the daily market brief. Unset: off, nothing is made or shown. #OV_AI_INTERNAL_URL=http://127.0.0.1:4800 #TRADE_AI_WAIT_MS=60000 #TRADE_BRIEFS_PER_TICK=6 #TRADE_BRIEFS_PER_HOUR=40 #TRADE_BRIEFS_INTERVAL_MS=600000 # One market-wide brief a UTC day at most: off with TRADE_MARKET_BRIEFS=off, due checked this often. #TRADE_MARKET_BRIEFS=on #TRADE_MARKET_BRIEFS_INTERVAL_MS=600000 # OpenVibe.Events — the outbox relay runs only when EVENTS_URL and OV_OAUTH_CLIENT_SECRET are set #EVENTS_URL=http://127.0.0.1:4300 # Signing secret for Events deliveries to /internal/events (32+ chars). #TRADE_EVENTS_WEBHOOK_SECRET= # Unset: the webhook answers 404 and the sync runs on its timer only. #EVENTS_RELAY_INTERVAL_MS=2000 # Background work (Sources sync + freshness); off: TRADE_WORKER=off #TRADE_WORKER=on # IndexNow (openvibe-shared/indexnow): with a key, search engines are told the moment a public, # indexable instrument page appears, changes or leaves the index (the key file is served at # /.txt). Unset: off — no key file, nothing sent. #INDEXNOW_KEY= # Browser origins that may call /api/v1 with a Bearer Network JWT #API_CORS_ORIGINS=https://openvibe.network # release.json (openvibe-shared/release): the deployed commit when git is not available #RELEASE_COMMIT= #MIN_CLIENT_RELEASE=