Crypto Vision
Live API and docs · Free REST endpoints for prices, DeFi and on-chain data, plus per-datapoint access settled in USDC over x402.
A production-grade crypto intelligence platform — 200+ API endpoints, 37 data sources, 58 AI agents, real-time WebSocket feeds, anomaly detection, RAG-powered semantic search, BigQuery data warehouse, and a complete AI model training pipeline.

Table of Contents
Overview
Crypto Vision is a comprehensive crypto data aggregation, intelligence, and AI platform built on TypeScript and the Hono framework. It provides:
- 200+ REST API endpoints across 35+ route domains (market data, DeFi, on-chain analytics, derivatives, news, AI, governance, macroeconomics, and more)
- 37 data source adapters (CoinGecko, DeFiLlama, Binance, Bybit, OKX, Deribit, dYdX, Hyperliquid, L2Beat, Messari, Token Terminal, GeckoTerminal, Jupiter, DePin Scan, etc.)
- 58 specialized AI agents for DeFi strategy, trading, portfolio management, security analysis, and education
- Real-time WebSocket feeds for prices, Bitcoin mempool, and DEX trades
- Anomaly detection engine using Modified Z-Score and EWMA algorithms across 16 anomaly types
- RAG-powered semantic search with multi-provider embeddings (Vertex AI, OpenAI)
- Multi-provider AI with automatic fallback chain: Groq → Gemini → OpenAI → Anthropic → OpenRouter
- Two-tier caching (in-memory LRU + Redis) with stampede protection and stale-while-revalidate
- Circuit breaker pattern per upstream host with exponential backoff
- BigQuery data warehouse with 22+ tables and materialized views
- Complete ML pipeline for model training, fine-tuning (Gemini + open-source), evaluation, and inference serving
- Full GCP infrastructure as code (Terraform, Cloud Run, Pub/Sub, Scheduler, Kubernetes)
Quick Start
Prerequisites
- Node.js ≥ 22 (ESM required)
- PostgreSQL 16 (for crypto vision)
- Redis 7 (optional, for distributed caching)
- Google Cloud credentials (optional, for BigQuery/Pub/Sub/Vertex AI)
Local Development
# Clone the repository
git clone https://github.com/nirholas/crypto-vision.git
cd crypto-vision
# Install dependencies
npm install
# Copy and configure environment variables
cp .env.example .env # Edit with your API keys
# Start development server (hot-reload via tsx)
npm run dev
# Server starts on http://localhost:8080
Docker
# Build and run the main API server
docker build -t crypto-vision .
docker run -p 8080:8080 --env-file .env crypto-vision
# Or use Docker Compose for full stack (API + Redis)
docker compose up
Docker Compose — Ingestion Workers
# Start ingestion workers (market, defi, news, dex, derivatives, governance, macro, onchain)
docker compose -f docker-compose.ingest.yml up
NPM Scripts
| Script | Description |
|---|
npm run dev | Start dev server with hot-reload (tsx) |
npm run build | Compile TypeScript (tsc -p tsconfig.build.json && tsc-alias) |
npm start | Run compiled build (node dist/index.js) |
npm test | Run all tests (Vitest) |
npm run test:coverage | Run tests with coverage |
npm run test:e2e | Run end-to-end tests |
npm run lint | Run ESLint |
npm run typecheck | TypeScript type checking |
npm run db:generate | Generate Drizzle ORM migrations |
npm run db:migrate | Apply database migrations |
npm run db:push | Push schema changes |
npm run db:studio | Open Drizzle Studio |
npm run export:all | Export all data from BigQuery |
npm run export:embeddings | Export embeddings |
npm run import:postgres | Import exported data to PostgreSQL |
Environment Variables
📖 See docs/SECURITY_GUIDE.md for secrets management best practices.
Core