v0.1.34 - Volume Profile Analysis
π Major Feature: Volume Profile Analysis
Complete implementation of Volume Profile analysis for both Vietnamese stocks and cryptocurrencies, with full UI and SDK support.
β¨ New Features
Volume Profile Analysis Endpoint
- NEW
/analysis/volume-profile- Analyze volume distribution across price levels - Supports both VN stocks and cryptocurrencies
- Customizable price bins (10-200) and value area percentage (60-90)
- Returns:
- Point of Control (POC) - Price with highest volume
- Value Area - Price range containing 70% (configurable) of volume
- High/Low Volume Nodes for support/resistance identification
- Statistical measures (mean, median, std deviation, skewness)
Volume Profile UI (API Explorer)
- NEW Interactive Volume Profile section at http://api.aipriceaction.com/explorer
- Visual horizontal bar chart with color-coded levels:
- π‘ Yellow: Point of Control (POC)
- π’ Green: High Volume Nodes (HVN > 3%)
- π Orange: Low Volume Nodes (LVN < 1%)
- π΅ Blue shading: Value Area
- 4 interactive tabs:
- π Volume Distribution (visual chart)
- π Price Levels (detailed table)
- π Statistics (metrics dashboard)
- π‘ Trading Insights (strategy guide)
- Default 10 bins for readability
- Responsive design for mobile/tablet/desktop
TypeScript SDK Support
- NEW
getVolumeProfile()method in aipriceaction-js SDK - 8 new TypeScript type definitions
- Full validation (dates, numeric ranges)
- Example:
12-volume-profile.tswith 5 use cases - Dual mode support (VN + crypto)
π Bug Fixes
- Fixed crypto mode support in all analysis endpoints
- Fixed null safety in Volume Profile UI (undefined percentage values)
- Fixed required date parameter handling
π Documentation
- NEW
docs/VOLUME_PROFILE.md- Technical implementation guide - NEW
docs/VOLUME_PROFILE_USAGE.md- Trading strategies and user guide - Updated
docs/API_ANALYSIS.mdwith Volume Profile endpoint - NEW
scripts/debug_volume_profile.sh- Testing and debugging script - NEW
scripts/test-analysis.sh- Analysis API test suite (10 tests)
π§ Backend Changes
- New Rust module:
src/server/analysis/volume_profile.rs(724 lines) - Uniform distribution algorithm for volume smearing across price levels
- Dynamic tick size based on asset type (VN stocks: 10/50/100 VND, Crypto: 0.0001-1.0)
- Value Area calculation using greedy expansion from POC
- Volume-weighted statistical measures
π¦ SDK Changes (aipriceaction-js 0.1.34)
- 8 new TypeScript interfaces: VolumeProfileQueryParams, PriceRange, PointOfControl, ValueArea, PriceLevelVolume, VolumeStatistics, VolumeProfileData, VolumeProfileResponse
- Client-side validation for better UX
- Comprehensive example file with 5 use cases
- Full JSDoc documentation
π Statistics
- 30 files changed
- 8,410 insertions, 353 deletions
- 3 new documentation files (1,541 lines)
- 2 new UI files (751 lines)
- 1 new backend module (724 lines)
- 1 new SDK example (160 lines)
π Usage Examples
API:
curl "http://api.aipriceaction.com/analysis/volume-profile?symbol=VJC&date=2025-11-20&bins=10"TypeScript SDK:
const profile = await client.getVolumeProfile({
symbol: 'VJC',
date: '2025-11-20',
bins: 10,
value_area_pct: 70
});
console.log(`POC: ${profile.data.poc.price}`);
console.log(`Value Area: ${profile.data.value_area.low} - ${profile.data.value_area.high}`);Web UI:
Visit http://api.aipriceaction.com/explorer and scroll to "π Volume Profile Analysis" section.
π― Trading Use Cases
- POC Mean Reversion: Price gravitates towards POC (fair value)
- Value Area Range Trading: Buy at VA Low, sell at VA High
- HVN Support/Resistance: High volume nodes act as strong barriers
- LVN Gap Fill: Low volume areas facilitate quick price movements
- Breakout Confirmation: Price moving outside VA with volume
See docs/VOLUME_PROFILE_USAGE.md for complete trading strategies.