Skip to main content

Welcome to CryptoPulse

A high-performance NestJS API for cryptocurrency price tracking with intelligent request batching, JWT authentication, and comprehensive historical data.

Live Price Stream
GET /v1/price/bitcoin
5s
Batch Window
3x
Request Merge
JWT
Auth Ready

Quick start

Get your CryptoPulse API running in minutes

1

Set up environment variables

Copy the example environment file and configure your credentials:
cp .env.example .env
Update ADMIN_USER, ADMIN_PASS, JWT_SECRET, DATABASE_URL, REDIS_URL, and COINGECKO_API_KEY in your .env file.
2

Start with Docker Compose

Launch PostgreSQL, Redis, and the API service:
docker compose up --build
The API will be available at http://localhost:3000 and Swagger docs at http://localhost:3000/docs.
3

Authenticate and fetch prices

First, get your access token:
cURL
curl -X POST http://localhost:3000/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"secret"}'
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "tokenType": "Bearer",
  "expiresIn": "1h"
}
Then fetch cryptocurrency prices with your token:
cURL
curl http://localhost:3000/v1/price/bitcoin \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Key features

Built for performance, scalability, and developer experience

Intelligent Request Batching

Automatically groups same-coin requests into a single upstream call, reducing API costs and improving response times

JWT Authentication

Secure bearer token authentication protects all price endpoints with configurable token expiry

Historical Price Tracking

PostgreSQL persistence with date range filtering and page-based pagination for price history queries

Distributed Rate Limiting

Redis-backed throttling with per-endpoint limits that work across multiple API instances

Multi-Instance Ready

Deploy multiple API instances behind a load balancer with Redis coordination for batching and rate limits

OpenAPI Documentation

Interactive Swagger UI with request examples, response schemas, and error code documentation

Ready to get started?

Deploy CryptoPulse in minutes and start tracking cryptocurrency prices with intelligent batching and comprehensive APIs.

Start building