All notable changes to the Hyperliquid Dart SDK will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
This is the first production-ready release of the Hyperliquid Dart SDK with comprehensive features, security, and reliability improvements.
- Complete REST API Coverage: Full implementation of all Hyperliquid REST endpoints
- WebSocket Real-time Data: Comprehensive WebSocket subscriptions for live market data
- Type-safe API: Strongly typed interfaces with comprehensive error handling
- Multi-environment Support: Seamless switching between testnet and mainnet
- Private Key Security: Advanced private key validation with entropy checking
- Input Sanitization: Comprehensive input validation and sanitization
- Rate Limiting: Built-in rate limiting with configurable thresholds
- Security Event Logging: Detailed security event tracking and monitoring
- Automatic Retry: Intelligent retry mechanisms with exponential backoff
- Circuit Breaker: Circuit breaker pattern for fault tolerance
- Recovery Strategies: Customizable error recovery strategies
- Comprehensive Error Tracking: Detailed error statistics and monitoring
- Structured Logging: JSON-formatted logs with contextual information
- Performance Metrics: Built-in performance monitoring and metrics
- Security Monitoring: Comprehensive security event logging
- Production Logging: File-based logging with rotation support
- Comprehensive Documentation: Extensive documentation with examples
- Production Guide: Detailed production deployment guide
- Example Applications: Complete example applications demonstrating all features
- Testing Suite: Comprehensive test coverage with integration tests
-
Private Key Validation:
- Format validation (64 hex characters with optional 0x prefix)
- Weak key detection (all zeros, patterns, etc.)
- Entropy analysis with warnings for low-entropy keys
- Secure storage recommendations
-
Input Validation & Sanitization:
- Trading amount validation with configurable min/max limits
- Price validation with reasonable bounds
- Leverage validation (1-100x with warnings >50x)
- Slippage validation (0-100% with warnings >10%)
- Symbol format validation
- Address format validation
- XSS prevention (removes dangerous HTML characters)
- SQL injection prevention
- Control character removal
- Length limiting (max 10,000 characters)
-
Rate Limiting & Monitoring:
- API call tracking (1200 calls/minute default)
- Warning at 80% of rate limit
- WebSocket subscription limits (1000 max)
- Configurable enforcement levels
-
Error Handling:
- Automatic retry with exponential backoff
- Custom recovery strategies per error type
- Comprehensive error statistics
- Error history tracking (last 1000 errors)
- Configurable retry attempts and delays
-
Logging System:
- JSON-formatted structured output
- Global context management
- Specialized log types (API, WebSocket, Trading, Security)
- Performance metric logging
- File logging with rotation
- Configurable log levels
-
WebSocket Improvements:
- Automatic reconnection with backoff
- Connection state monitoring
- Subscription management
- Message queuing during disconnections
- Heartbeat monitoring
- Info API: Complete market data and account information endpoints
- Exchange API: Full trading operations with advanced order types
- Custom Operations: Batch operations and specialized trading functions
- Symbol Conversion: Automatic symbol to asset index conversion
- User Events: Real-time order updates, fills, and liquidations
- Market Data: Live price feeds and order book updates
- Trade Feeds: Real-time trade data for specific symbols
- System Notifications: Important system announcements
-
Comprehensive Test Suite:
- Unit tests for all core functionality
- Integration tests with live API
- Security validation tests
- Error handling tests
- Performance tests
- WebSocket connection tests
-
Code Quality:
- Static analysis with strict linting rules
- Type safety enforcement
- Documentation coverage
- Performance profiling
- Complete API Documentation: Detailed documentation for all classes and methods
- Production Deployment Guide: Comprehensive guide for production deployment
- Security Best Practices: Detailed security recommendations
- Example Applications: Multiple example applications demonstrating features
- Fixed WebSocket reconnection issues
- Resolved rate limiting edge cases
- Corrected symbol conversion for new assets
- Fixed memory leaks in long-running connections
- Resolved timezone issues in timestamp handling
- Optimized JSON serialization/deserialization
- Improved WebSocket message handling
- Reduced memory footprint
- Enhanced connection pooling
- Optimized rate limiting algorithms
- Health Checks: Built-in health check endpoints
- Metrics Export: Prometheus-compatible metrics export
- Graceful Shutdown: Proper resource cleanup on shutdown
- Resource Management: Automatic resource cleanup and management