Files
proxmox/docs/archive/root-cleanup-20260220/COINGECKO_API_KEY_SETUP_COMPLETE.md
defiQUG bea1903ac9
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Sync all local changes: docs, config, scripts, submodule refs, verification evidence
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 15:46:06 -08:00

4.6 KiB

CoinGecko API Key Setup - Complete

Date: 2026-01-26
Status: API Key Configured and Verified


API Key Verification

Key: your-coingecko-api-key
Status: VERIFIED WORKING

Test Results:

  • Bitcoin price fetch: Success ($88,400 USD)
  • Ethereum price fetch: Success ($2,937.31 USD)
  • API key accepted by CoinGecko

📋 Files Updated

1. Root .env

Location: /.env

Added:

# ============================================
# Price Feed & Market Data APIs
# ============================================
# CoinGecko API Key (for Oracle Publisher and Token Aggregation services)
# Provides higher rate limits (500+ calls/min vs 10-50 without key)
COINGECKO_API_KEY=your-coingecko-api-key

Status: Updated


2. Token Aggregation Service .env

Location: smom-dbis-138/services/token-aggregation/.env

Updated:

# 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=your-coingecko-api-key

Status: Updated


3. Root .env.example

Location: /.env.example

Status: Already updated (from previous step)


4. Token Aggregation .env.example

Location: smom-dbis-138/services/token-aggregation/.env.example

Status: Already updated (from previous step)


🔧 Oracle Publisher Service

Automated Update Script Created

Script: scripts/update-oracle-publisher-coingecko-key.sh

What it does:

  • Connects to Proxmox host (192.168.11.10)
  • Accesses Oracle Publisher container (VMID 3500)
  • Updates /opt/oracle-publisher/.env with:
    • COINGECKO_API_KEY=your-coingecko-api-key
    • DATA_SOURCE_1_URL with API key in URL
    • DATA_SOURCE_1_PARSER=ethereum.usd
  • Restarts oracle-publisher service

To run:

cd /home/intlc/projects/proxmox
./scripts/update-oracle-publisher-coingecko-key.sh

Or manually:

ssh root@192.168.11.10
pct exec 3500 -- bash
cd /opt/oracle-publisher
nano .env
# Add/update:
# COINGECKO_API_KEY=your-coingecko-api-key
# DATA_SOURCE_1_URL=https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd&x_cg_demo_api_key=your-coingecko-api-key
# DATA_SOURCE_1_PARSER=ethereum.usd
systemctl restart oracle-publisher

Verification Steps

1. Verify Root .env

grep COINGECKO_API_KEY .env
# Should show: COINGECKO_API_KEY=your-coingecko-api-key

2. Verify Token Aggregation .env

cd smom-dbis-138/services/token-aggregation
grep COINGECKO_API_KEY .env
# Should show: COINGECKO_API_KEY=your-coingecko-api-key

3. Test API Key

# Test Bitcoin price
curl -s "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd&x_cg_demo_api_key=your-coingecko-api-key" | jq .

# Test Ethereum price
curl -s "https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd&x_cg_demo_api_key=your-coingecko-api-key" | jq .

4. Verify Oracle Publisher (if accessible)

ssh root@192.168.11.10 "pct exec 3500 -- grep COINGECKO /opt/oracle-publisher/.env"
# Should show the API key

🚀 Next Steps

Completed

  • API key verified working
  • Root .env updated
  • Token Aggregation .env updated
  • Update script created for Oracle Publisher

Pending Actions ⚠️

  1. Update Oracle Publisher Service (if VMID 3500 exists)

    ./scripts/update-oracle-publisher-coingecko-key.sh
    
  2. Restart Token Aggregation Service (if running)

    cd smom-dbis-138/services/token-aggregation
    # If using Docker:
    docker-compose restart
    # If using systemd:
    systemctl restart token-aggregation
    
  3. Verify Services

    • Check Token Aggregation logs for CoinGecko API calls
    • Check Oracle Publisher logs for successful price fetches
    • Verify no 429 rate limit errors

📊 API Key Benefits

Feature Before (No Key) After (With Key)
Rate Limit 10-50 calls/min 500+ calls/min
Endpoint api.coingecko.com pro-api.coingecko.com (token-aggregation)
Reliability Frequent 429 errors Stable service
Oracle Publisher Rate limited No rate limits

📝 Summary

API Key: Verified working
Root .env: Updated
Token Aggregation .env: Updated
Update Script: Created
⚠️ Oracle Publisher: Script ready (run when accessible)


Last Updated: 2026-01-26
Status: Configuration complete, ready for service updates