crypto-volume-profile
Zero-dependency Python & JavaScript (ESM) library to compute Volume Profile (VPVR), Point of Control (POC), 70% Value Area (VAH / VAL), and turnover-decayed Cost-Basis Chip Distribution (筹码分布) directly from standard OHLCV candlestick arrays.
- Live Interactive Tool (English): Crypto Volume Profile & Cost Distribution (
holdwins.com/en/chip-distribution/) - 在线筹码分布图表(中文): 币圈筹码分布 (
holdwins.com/chip-distribution/) - Candlestick Practice: Kline Trainer (EN) · K 线盘感训练器
- Reading Guide: K 线图与成交密集区怎么看
Python Installation & Quick Start
pip install crypto-volume-profile
from crypto_volume_profile import compute_distribution
res = compute_distribution(bars, mode="profile", bins=120)
print(res.poc, res.val, res.vah)
Model Overview
- Triangular Intrabar Spread: Each bar's volume is distributed across
[low, high]using a triangular density peaking at the typical price(H + L + C) / 3. - Volume Profile Mode (
mode: 'profile'): Accumulates raw volume across price bins without decay, then expands outward from the POC bin until 70% of total volume is enclosed (VALtoVAH). - Chip Distribution Mode (
mode: 'chips'): Applies per-bar turnover decaymin(0.95, V / (avgV × turnoverBars))before adding new volume, modeling how older positions turn over as fresh volume trades at newer price levels, and computesprofitRatio(fraction of estimated holdings below current close).
Usage
import { computeDistribution } from './src/index.mjs';
const bars = [
{ o: 95000, h: 96200, l: 94500, c: 95800, v: 12400 },
{ o: 95800, h: 97400, l: 95500, c: 97100, v: 18900 },
{ o: 97100, h: 97800, l: 96300, c: 96800, v: 15100 },
];
const chips = computeDistribution(bars, { mode: 'chips', bins: 60, turnoverBars: 30 });
console.log({
pocPrice: chips.pocPrice,
valPrice: chips.valPrice,
vahPrice: chips.vahPrice,
profitRatioPct: (chips.profitRatio * 100).toFixed(1) + '%',
});
Related Open Tools by HoldWins
- Crypto Chip Distribution & Cost-Basis Visualizer
- Historical Kline Candlesticks Trainer · 中文版
- Perpetual Futures OI & Funding Monitor · 合约异动监测
- Perpetual Futures PnL & Liquidation Calculator
License
MIT © HoldWins
Metadata
Release files for crypto-volume-profile 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crypto_volume_profile-1.0.0.tar.gz | 4.5 kB | Without provenance | Details for crypto_volume_profile-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crypto_volume_profile-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for crypto_volume_profile-1.0.0-py3-none-any.whl |
Total release size: 10.3 kB
Release files / crypto_volume_profile-1.0.0.tar.gz
| Download URL | crypto_volume_profile-1.0.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51c75e8b2d5a8717a283931adc86c518aa33f8dac4351474c3df079a1db37a8d
|
|
BLAKE2b-256 checksum How to use checksums |
7f99054dfa23570d097fc102c961de7d6f296fc65c7e04ff58348554cf1bdf1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / crypto_volume_profile-1.0.0-py3-none-any.whl
| Download URL | crypto_volume_profile-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6bdd19471b65a15c45a3b1ecde3d22dafce15f60d75149b4215f5554ed7f4e16
|
|
BLAKE2b-256 checksum How to use checksums |
f436ccb45818c289c606f7f4318f3fc795adfe84782897e3afa16bb02631a8d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for crypto-volume-profile 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.