← Back to all products
$15
Price Oracle Node
Chainlink-compatible price oracle node with multi-source aggregation, deviation checks, and heartbeats.
TOMLTypeScriptConfigYAMLMarkdownJSONDockerPostgreSQLPrometheus
📁 File Structure 18 files
price-oracle-node/
├── LICENSE
├── README.md
├── config/
│ ├── chains.json
│ └── jobs/
│ ├── direct-request.toml
│ └── ocr2-price.toml
├── docker/
│ ├── Dockerfile.adapter
│ ├── docker-compose.yml
│ └── prometheus.yml
├── package.json
├── security-notes.md
├── src/
│ ├── adapter.ts
│ ├── health.ts
│ ├── metrics.ts
│ └── types.ts
├── test/
│ ├── adapter.test.ts
│ └── health.test.ts
└── tsconfig.json
📖 Documentation Preview README excerpt
Price Oracle Node
Chainlink-compatible oracle node setup with OCR reporting, external adapters, and production-grade monitoring.
Overview
Docker-based oracle node configuration with:
- Chainlink-compatible OCR2 job specifications
- External adapter template (TypeScript)
- Health check and heartbeat monitoring
- TLS certificate configuration
- Credential rotation scripts
- Multi-chain RPC endpoint management
- Prometheus metrics exporter
Quick Start
# 1. Copy environment template
cp config/.env.example .env
# 2. Configure your RPC endpoints and credentials
nano .env
# 3. Start the oracle node
docker compose up -d
# 4. Verify health
curl http://localhost:6688/health
Architecture
┌──────────────────────────────────────────┐
│ Docker Compose │
│ ┌──────────┐ ┌──────────────────────┐ │
│ │ Chainlink│ │ External Adapter │ │
│ │ Node │──│ (TypeScript) │ │
│ └────┬─────┘ └──────────┬───────────┘ │
│ │ │ │
│ ┌────┴─────┐ ┌──────────┴───────────┐ │
│ │PostgreSQL│ │ Prometheus Metrics │ │
│ └──────────┘ └──────────────────────┘ │
└──────────────────────────────────────────┘
Files
| File | Description |
|---|---|
docker/docker-compose.yml | Node orchestration |
docker/Dockerfile.adapter | External adapter image |
src/adapter.ts | External adapter template |
src/types.ts | Request/response types |
src/health.ts | Health check service |
src/metrics.ts | Prometheus metrics exporter |
config/jobs/ocr2-price.toml | OCR2 job specification |
config/jobs/direct-request.toml | Direct request job |
config/.env.example | Environment template |
... continues with setup instructions, usage examples, and more.
📄 Code Sample .yml preview
docker/docker-compose.yml
version: "3.8"
services:
# ── Chainlink Node ─────────────────────────────────────────────────
chainlink-node:
image: smartcontract/chainlink:2.7.0
restart: unless-stopped
ports:
- "6688:6688"
env_file:
- ../config/.env.example
environment:
- LOG_LEVEL=info
- ETH_CHAIN_ID=${CHAIN_ID:-1}
- ETH_URL=${ETH_WS_URL}
- ETH_HTTP_URL=${ETH_HTTP_URL}
- DATABASE_URL=postgresql://chainlink:chainlink@postgres:5432/chainlink?sslmode=disable
- CHAINLINK_TLS_PORT=0
- SECURE_COOKIES=false
volumes:
- chainlink-data:/chainlink
depends_on:
postgres:
condition: service_healthy
networks:
- oracle-net
# ── External Adapter ───────────────────────────────────────────────
external-adapter:
build:
context: ..
dockerfile: docker/Dockerfile.adapter
restart: unless-stopped
ports:
- "8080:8080"
- "9090:9090"
environment:
- ADAPTER_PORT=8080
- METRICS_PORT=9090
- LOG_LEVEL=info
networks:
- oracle-net
# ── PostgreSQL ─────────────────────────────────────────────────────
postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_USER: chainlink
POSTGRES_PASSWORD: chainlink
# ... 30 more lines ...