Datastream Service
Overview
Datastream is a TypeScript/NodeJS-based application designed for streaming external data:
- index price via Chainlink WS Direct Streams API
- SVI IV model parameters via Block Scholes WS API
- interest rate via Block Scholes WS API
Technical Specifications
Core Technology Stack
- Runtime: NodeJS >= 22
- Primary Frameworks:
- ExpressJS 4.21.2
- Service Type: Streaming Service
- Version: 0.0.1
Dependencies
- Testing: integration tests using Jest
- Internal Libraries:
- connections-ts
- commons-ts
- orderbook
Getting Started
Prerequisites
- Python 3.9 - 3.10
- Poetry package manager
- Redis instance
Build
Development
Service Architecture
Components
-
Main Application app.ts
-
Primary service entry point
- API endpoint definitions
-
Starting WS clients
-
Environment configuration for data providers
-
Chainlink Client indexPrice.ts
-
Chainlink index price feeds connection management
-
Redis data ingestion
-
Block Scholes Client optionsMarketData.ts
-
Block Scholes index price feeds connection management
- Option expirations management (re-subscribing to new feeds)
- Redis data ingestion
Infrastructure
Deployment
- Containerized deployment (Dockerfile provided)
Key Features
- Real-time data ingestion
- Reconnection management
- WS sharding (per base currency)
- Health check endpoints
- Metrics collection (automated via GCP)
Monitoring and Health
Testing and Coverage
- Comprehensive test coverage setup
- Mocked Redis and light-weight integration test runner, check jest.setup.ts
- Reports location:
- Coverage:
../../coverage/apps/datastream/
- Test results:
../../reports/apps/datastream/integration/
Monitoring
- Health check endpoint:
/health
- Expiration endpoint:
/expiration
- Logging configuration
- Error tracking integration
Integration Points
External Connections
- Chainlink Direct Stream WS API
- Block Scholes interest rate and SVI model parameters API
- GCP IAP-secured endpoints
Internal Dependencies
- Redis
- Redis Pub/Sub
Configuration
Service configuration is managed through environment variables and can be overridden using a .env
file:
Redis connection env is .env.example and must be defined separately. Check readme.md
License
Proprietary - All rights reserved
This documentation is generated from the service README. For the most up-to-date information, refer to the original README