Files
proxmox/COINGECKO_API_KEY_ADDED.md
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

189 lines
4.5 KiB
Markdown

# CoinGecko API Key Added ✅
**Date:** 2026-01-26
**Status:****API Key Configured**
---
## ✅ API Key Information
**Key:** `CG-LxMsQ7jp3Jd6he3VFzP1uUXA`
**Type:** Demo API Key (Free tier)
**Format:** `CG-...` prefix indicates CoinGecko demo API key
---
## 📋 Files Updated
### 1. Root `.env.example` ✅
**Location:** `/.env.example`
**Added:**
```bash
# ----------------------------------------------------------------------------
# Price Feed & Market Data APIs
# ----------------------------------------------------------------------------
# CoinGecko API Key (for Oracle Publisher and Token Aggregation services)
# Get free key at: https://www.coingecko.com/en/api/pricing
COINGECKO_API_KEY=CG-LxMsQ7jp3Jd6he3VFzP1uUXA
```
---
### 2. Token Aggregation Service `.env.example` ✅
**Location:** `smom-dbis-138/services/token-aggregation/.env.example`
**Updated:**
```bash
# External API Keys (optional)
# CoinGecko API Key - Provides higher rate limits and better reliability
# Get free key at: https://www.coingecko.com/en/api/pricing
COINGECKO_API_KEY=CG-LxMsQ7jp3Jd6he3VFzP1uUXA
```
**Usage:**
- Automatically used by `CoinGeckoAdapter`
- Enables Pro API endpoint: `https://pro-api.coingecko.com/api/v3`
- Provides 500+ calls/minute (vs 10-50 without key)
---
## 🔧 Services Using CoinGecko API Key
### 1. Token Aggregation Service
**Service:** `smom-dbis-138/services/token-aggregation/`
**Adapter:** `src/adapters/coingecko-adapter.ts`
**How it works:**
- Reads `COINGECKO_API_KEY` from environment
- Uses Pro API endpoint when key is present
- Sends key in header: `x-cg-pro-api-key`
**Benefits:**
- Higher rate limits
- More reliable token data fetching
- Better market data enrichment
---
### 2. Oracle Publisher Service
**Service:** VMID 3500 (Oracle Publisher Container)
**Location:** `/opt/oracle-publisher/.env`
**Configuration:**
```bash
COINGECKO_API_KEY=CG-LxMsQ7jp3Jd6he3VFzP1uUXA
DATA_SOURCE_1_URL=https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd&x_cg_demo_api_key=CG-LxMsQ7jp3Jd6he3VFzP1uUXA
DATA_SOURCE_1_PARSER=ethereum.usd
```
**Note:** Oracle Publisher uses the key in the URL parameter format (`x_cg_demo_api_key`).
---
## 🚀 Next Steps
### Immediate Actions
1. **Copy to Actual .env Files**
```bash
# Root .env
cp .env.example .env
# Edit .env and ensure COINGECKO_API_KEY is set
# Token Aggregation .env
cd smom-dbis-138/services/token-aggregation
cp .env.example .env
# Edit .env and ensure COINGECKO_API_KEY is set
```
2. **Update Oracle Publisher Service**
```bash
ssh root@192.168.11.10
pct exec 3500 -- bash
cd /opt/oracle-publisher
nano .env
# Add: COINGECKO_API_KEY=CG-LxMsQ7jp3Jd6he3VFzP1uUXA
# Update DATA_SOURCE_1_URL to include key
systemctl restart oracle-publisher
```
3. **Restart Services**
```bash
# Token Aggregation (if running)
cd smom-dbis-138/services/token-aggregation
docker-compose restart
# OR
systemctl restart token-aggregation
```
---
## 🔍 Verification
### Verify Token Aggregation
```bash
cd smom-dbis-138/services/token-aggregation
grep COINGECKO_API_KEY .env
# Should show: COINGECKO_API_KEY=CG-LxMsQ7jp3Jd6he3VFzP1uUXA
```
### Verify Oracle Publisher
```bash
ssh root@192.168.11.10 "pct exec 3500 -- grep COINGECKO /opt/oracle-publisher/.env"
# Should show the API key
```
### Test API Key
```bash
# Test CoinGecko API with key
curl "https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd&x_cg_demo_api_key=CG-LxMsQ7jp3Jd6he3VFzP1uUXA"
```
---
## 📊 API Key Benefits
| Feature | Without Key | With Key |
|---------|-------------|----------|
| **Rate Limit** | 10-50 calls/min | 500+ calls/min |
| **Endpoint** | `api.coingecko.com` | `pro-api.coingecko.com` |
| **Reliability** | Frequent 429 errors | Stable service |
| **Support** | Limited | Better support |
---
## 📚 Documentation
1. **Complete Setup Guide:**
- `docs/04-configuration/COINGECKO_API_KEY_SETUP.md`
- Full configuration instructions
2. **Quick Reference:**
- `COINGECKO_API_KEY_QUICK_REFERENCE.md`
- Quick lookup guide
3. **Oracle Setup:**
- `docs/04-configuration/metamask/ORACLE_PRICE_FEED_SETUP.md`
- Updated with API key configuration
---
## ✅ Summary
- ✅ API key added to root `.env.example`
- ✅ API key added to token-aggregation `.env.example`
- ✅ Documentation created
- ⚠️ **Action Required:** Copy to actual `.env` files and update Oracle Publisher service
---
**Last Updated:** 2026-01-26
**Status:** ✅ API key configured in example files