-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy path.env.example
More file actions
166 lines (119 loc) · 7.76 KB
/
.env.example
File metadata and controls
166 lines (119 loc) · 7.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# ═══════════════════════════════════════════════════════════════
# Crypto Vision — Environment Variables
# ═══════════════════════════════════════════════════════════════
# ─── Server ───────────────────────────────────────────────────
# Port the HTTP server listens on (required, default: 8080)
PORT=8080
# Runtime environment: "development" or "production" (required, default: development)
NODE_ENV=development
# Pino log level: trace | debug | info | warn | error | fatal (optional, default: info)
LOG_LEVEL=debug
# Comma-separated list of allowed CORS origins (optional, all origins allowed in development)
CORS_ORIGINS=
# Graceful shutdown timeout in milliseconds (optional, default: 15000)
SHUTDOWN_TIMEOUT_MS=15000
# ─── Cache ────────────────────────────────────────────────────
# Redis connection URL for response caching (optional — in-memory LRU used when absent)
REDIS_URL=redis://localhost:6379
# ─── Rate Limiting ───────────────────────────────────────────
# Requests per minute per IP (optional, default: 200)
RATE_LIMIT_RPM=200
# ─── API Key Auth ────────────────────────────────────────────
# Comma-separated API keys with optional tier suffix (optional)
# Format: key1:basic,key2:pro — keys without suffix default to "basic"
# Tiers: public (no key, 30 req/min), basic (200 req/min), pro (2000 req/min)
API_KEYS=
# Comma-separated admin API keys for key management endpoints (optional)
ADMIN_API_KEYS=
# ─── Circuit Breaker ─────────────────────────────────────────
# Consecutive failures before opening circuit for an upstream host (optional, default: 5)
CB_FAILURE_THRESHOLD=5
# Milliseconds before half-open probe after circuit opens (optional, default: 30000)
CB_RESET_MS=30000
# Max concurrent HTTP requests per upstream host (optional, default: 10)
FETCH_CONCURRENCY_PER_HOST=10
# ─── Queue / Concurrency ─────────────────────────────────────
# Max concurrent AI requests processed in parallel (optional, default: 10)
AI_CONCURRENCY=10
# Max queued AI requests before rejecting new ones (optional, default: 500)
AI_MAX_QUEUE=500
# Max concurrent heavy upstream fetches (optional, default: 20)
HEAVY_FETCH_CONCURRENCY=20
# ─── Market Data APIs ────────────────────────────────────────
# Free APIs (no key required): CoinGecko free tier, DeFiLlama,
# CoinPaprika, CoinCap, DexScreener, Fear & Greed Index
# CoinGecko API key for higher rate limits (optional)
COINGECKO_API_KEY=
# Set to "true" to use CoinGecko Pro base URL (optional, default: false)
COINGECKO_PRO=false
# CryptoCompare API key for additional market data (optional, not yet wired)
CRYPTOCOMPARE_API_KEY=
# ─── News ─────────────────────────────────────────────────────
# Base URL for the upstream news aggregation service (optional, default: https://cryptocurrency.cv)
NEWS_API_URL=
# NewsAPI.org key for headline ingestion (optional, not yet wired)
NEWSAPI_API_KEY=
# CryptoPanic API key for sentiment-tagged news (optional, not yet wired)
CRYPTOPANIC_API_KEY=
# ─── AI Providers (at least one required for /ai endpoints) ──
# Providers are tried in order: Groq → Gemini → OpenAI → Anthropic → OpenRouter
# Groq API key — fastest inference, tried first (optional)
GROQ_API_KEY=
# Google Gemini API key (optional)
GEMINI_API_KEY=
# OpenAI API key (optional)
OPENAI_API_KEY=
# Anthropic API key (optional)
ANTHROPIC_API_KEY=
# OpenRouter API key — multi-model gateway, tried last (optional)
OPENROUTER_API_KEY=
# ─── Derivatives / Perpetuals ────────────────────────────────
# Coinglass API key for derivatives, funding rates, liquidations (optional)
COINGLASS_API_KEY=
# ─── Research & Metrics ─────────────────────────────────────
# Messari API key for research and metrics (optional)
MESSARI_API_KEY=
# Token Terminal API key for protocol revenue data (optional)
TOKEN_TERMINAL_API_KEY=
# ─── Calendar / Events ──────────────────────────────────────
# CoinMarketCal API key for crypto calendar events (optional)
COINMARKETCAL_API_KEY=
# ─── On-Chain / EVM ─────────────────────────────────────────
# Etherscan API key for on-chain data (optional, rate-limited without key)
ETHERSCAN_API_KEY=
# Owlracle API key for gas price estimates (optional)
OWLRACLE_API_KEY=
# ─── NFT ─────────────────────────────────────────────────────
# Reservoir API key for NFT market data (optional)
RESERVOIR_API_KEY=
# ─── Whale Tracking ─────────────────────────────────────────
# Blockchair API key for whale transaction tracking (optional)
BLOCKCHAIR_API_KEY=
# ─── Staking ────────────────────────────────────────────────
# Beaconchain API key for ETH staking data (optional)
BEACONCHAIN_API_KEY=
# Rated.network API key for validator performance data (optional)
RATED_API_KEY=
# ─── Real-Time Prices ───────────────────────────────────────
# CoinCap API key for WebSocket real-time prices (optional)
COINCAP_API_KEY=
# ─── Database ────────────────────────────────────────────────
# PostgreSQL connection URL for persistent storage (optional, required for Telegram bot)
DATABASE_URL=postgresql://cryptovision:cryptovision@localhost:5432/cryptovision
# ─── Telegram Bot ────────────────────────────────────────────
# Telegram bot token from @BotFather (optional)
TELEGRAM_BOT_TOKEN=
# Enable Crypto Vision Telegram bot (optional, default: false)
CRYPTO_VISION_ENABLED=false
# ─── Cache Tuning ────────────────────────────────────────────
# Max entries in in-memory LRU cache (optional, default: 200000)
CACHE_MAX_ENTRIES=200000
# ─── Infrastructure (production / GCP) ───────────────────────
# Google Cloud project ID for Cloud Run deployment (optional)
GCP_PROJECT_ID=
# Google Cloud region (optional, default: us-central1)
GCP_REGION=us-central1
# BigQuery dataset name (optional, default: crypto_vision)
BQ_DATASET=crypto_vision
# BigQuery max bytes billed per query (optional, default: 1000000000)
BQ_MAX_BYTES=1000000000