gapless-crypto-data 2.0.2__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/.github/workflows/ci-cd.yml +6 -1
  2. gapless_crypto_data-2.2.0/.pre-commit-config.yaml +63 -0
  3. gapless_crypto_data-2.2.0/CLAUDE.md +0 -0
  4. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/PKG-INFO +110 -19
  5. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/README.md +108 -17
  6. gapless_crypto_data-2.2.0/adversarial_test_output/binance_spot_BTCUSDT-1h_20240101-20240101_0.0y.csv +3 -0
  7. gapless_crypto_data-2.2.0/adversarial_test_output/binance_spot_BTCUSDT-1h_20240101-20240101_0.0y.metadata.json +100 -0
  8. gapless_crypto_data-2.2.0/adversarial_test_output/test_with_gaps.csv +3 -0
  9. gapless_crypto_data-2.2.0/docs/MILESTONE_v2.0.2.yaml +178 -0
  10. gapless_crypto_data-2.2.0/docs/MILESTONE_v2.0.3.yaml +208 -0
  11. gapless_crypto_data-2.2.0/docs/MILESTONE_v2.0.4.yaml +262 -0
  12. gapless_crypto_data-2.2.0/docs/MILESTONE_v2.0.5.yaml +302 -0
  13. gapless_crypto_data-2.2.0/docs/MILESTONE_v2.1.0.yaml +385 -0
  14. gapless_crypto_data-2.2.0/docs/MILESTONE_v2.1.1.yaml +296 -0
  15. gapless_crypto_data-2.2.0/docs/MILESTONE_v2.2.0.yaml +75 -0
  16. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/examples/cli_usage_examples.sh +37 -24
  17. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/pyproject.toml +3 -2
  18. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/__init__.py +20 -2
  19. gapless_crypto_data-2.2.0/src/gapless_crypto_data/cli.py +328 -0
  20. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/collectors/binance_public_data_collector.py +468 -212
  21. gapless_crypto_data-2.2.0/src/gapless_crypto_data/gap_filling/universal_gap_filler.py +564 -0
  22. gapless_crypto_data-2.2.0/src/gapless_crypto_data/sample_data/binance_spot_BTCUSDT-1h_20240101-20240102_0.0y.csv +59 -0
  23. gapless_crypto_data-2.2.0/src/gapless_crypto_data/sample_data/binance_spot_BTCUSDT-1h_20240101-20240102_0.0y.metadata.json +101 -0
  24. gapless_crypto_data-2.2.0/test_gaps/test_data_with_gaps.csv +3 -0
  25. gapless_crypto_data-2.2.0/test_py_output/binance_spot_BTCUSDT-1h_20240101-20240101_0.0y.csv +3 -0
  26. gapless_crypto_data-2.2.0/test_py_output/binance_spot_BTCUSDT-1h_20240101-20240101_0.0y.metadata.json +100 -0
  27. gapless_crypto_data-2.2.0/tests/test_atomic_operations.py +546 -0
  28. gapless_crypto_data-2.2.0/tests/test_binance_collector.py +613 -0
  29. gapless_crypto_data-2.2.0/tests/test_cli.py +405 -0
  30. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/tests/test_gap_filler.py +119 -0
  31. gapless_crypto_data-2.2.0/tests/test_integration.py +430 -0
  32. gapless_crypto_data-2.2.0/tests/test_output_dir_dataframe_fix.py +148 -0
  33. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/uv.lock +79 -1
  34. gapless_crypto_data-2.0.2/binance_spot_SOLUSDT-15m_20220910-20250831_3.0y.csv +0 -3
  35. gapless_crypto_data-2.0.2/binance_spot_SOLUSDT-1h_20220910-20250831_3.0y.csv +0 -3
  36. gapless_crypto_data-2.0.2/binance_spot_SOLUSDT-1m_20220910-20250831_3.0y.csv +0 -3
  37. gapless_crypto_data-2.0.2/binance_spot_SOLUSDT-2h_20220910-20250831_3.0y.csv +0 -3
  38. gapless_crypto_data-2.0.2/binance_spot_SOLUSDT-30m_20220910-20250831_3.0y.csv +0 -3
  39. gapless_crypto_data-2.0.2/binance_spot_SOLUSDT-3m_20220910-20250831_3.0y.csv +0 -3
  40. gapless_crypto_data-2.0.2/binance_spot_SOLUSDT-4h_20220910-20250831_3.0y.csv +0 -3
  41. gapless_crypto_data-2.0.2/binance_spot_SOLUSDT-5m_20220910-20250831_3.0y.csv +0 -3
  42. gapless_crypto_data-2.0.2/src/gapless_crypto_data/cli.py +0 -200
  43. gapless_crypto_data-2.0.2/src/gapless_crypto_data/gap_filling/universal_gap_filler.py +0 -483
  44. gapless_crypto_data-2.0.2/src/gapless_crypto_data/sample_data/binance_spot_BTCUSDT-1h_20240101-20240102_0.0y.csv +0 -3
  45. gapless_crypto_data-2.0.2/src/gapless_crypto_data/sample_data/binance_spot_BTCUSDT-1h_20240101-20240102_0.0y.metadata.json +0 -62
  46. gapless_crypto_data-2.0.2/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-1h_20220901-20250831_3.0y.csv +0 -3
  47. gapless_crypto_data-2.0.2/tests/test_binance_collector.py +0 -138
  48. gapless_crypto_data-2.0.2/tests/test_cli.py +0 -46
  49. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/.gitattributes +0 -0
  50. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/.github/workflows/publish.yml +0 -0
  51. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/.gitignore +0 -0
  52. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/.python-version +0 -0
  53. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/CHANGELOG.md +0 -0
  54. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/LICENSE +0 -0
  55. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/RELEASE_NOTES.md +0 -0
  56. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/docs/MILESTONE_v2.0.0.yaml +0 -0
  57. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/docs/MILESTONE_v2.0.1.yaml +0 -0
  58. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/docs/PUBLISHING.md +0 -0
  59. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/examples/README.md +0 -0
  60. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/examples/basic_data_collection.py +0 -0
  61. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/examples/complete_workflow.py +0 -0
  62. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/examples/gap_filling_example.py +0 -0
  63. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/examples/safe_data_collection.py +0 -0
  64. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/collectors/__init__.py +0 -0
  65. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/exchanges/__init__.py +0 -0
  66. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/gap_filling/__init__.py +0 -0
  67. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/gap_filling/safe_file_operations.py +0 -0
  68. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_BTCUSDT-1h_20240101-20240101_0.0y.csv +0 -0
  69. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_BTCUSDT-1h_20240101-20240101_0.0y.metadata.json +0 -0
  70. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_BTCUSDT-1h_20250831-20250831_0.0y.csv +0 -0
  71. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_BTCUSDT-1h_20250831-20250831_0.0y.metadata.json +0 -0
  72. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_BTCUSDT-4h_20250831-20250831_0.0y.csv +0 -0
  73. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_BTCUSDT-4h_20250831-20250831_0.0y.metadata.json +0 -0
  74. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_ETHUSDT-1h_20240801-20240801_0.0y.csv +0 -0
  75. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_ETHUSDT-1h_20240801-20240801_0.0y.metadata.json +0 -0
  76. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_ETHUSDT-1h_20250831-20250831_0.0y.csv +0 -0
  77. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_ETHUSDT-1h_20250831-20250831_0.0y.metadata.json +0 -0
  78. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_ETHUSDT-4h_20250831-20250831_0.0y.csv +0 -0
  79. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_ETHUSDT-4h_20250831-20250831_0.0y.metadata.json +0 -0
  80. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-15m_20220101-20220101_0.0y.csv +0 -0
  81. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-15m_20220101-20220101_0.0y.metadata.json +0 -0
  82. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-15m_20230320-20230328_0.0y.csv +0 -0
  83. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-15m_20230320-20230328_0.0y.metadata.json +0 -0
  84. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-1h_20220901-20250831_3.0y.metadata.json +0 -0
  85. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-1h_20230320-20230328_0.0y.csv +0 -0
  86. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-1h_20230320-20230328_0.0y.metadata.json +0 -0
  87. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-1m_20230320-20230328_0.0y.csv +0 -0
  88. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-1m_20230320-20230328_0.0y.metadata.json +0 -0
  89. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-2h_20230320-20230328_0.0y.csv +0 -0
  90. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-2h_20230320-20230328_0.0y.metadata.json +0 -0
  91. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-30m_20230320-20230328_0.0y.csv +0 -0
  92. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-30m_20230320-20230328_0.0y.metadata.json +0 -0
  93. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-3m_20230320-20230328_0.0y.csv +0 -0
  94. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-3m_20230320-20230328_0.0y.metadata.json +0 -0
  95. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-4h_20230320-20230328_0.0y.csv +0 -0
  96. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-4h_20230320-20230328_0.0y.metadata.json +0 -0
  97. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-5m_20230320-20230328_0.0y.csv +0 -0
  98. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/sample_data/binance_spot_SOLUSDT-5m_20230320-20230328_0.0y.metadata.json +0 -0
  99. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/src/gapless_crypto_data/utils/__init__.py +0 -0
  100. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/tests/__init__.py +0 -0
  101. {gapless_crypto_data-2.0.2 → gapless_crypto_data-2.2.0}/tests/test_package.py +0 -0
@@ -56,11 +56,16 @@ jobs:
56
56
  uv run ruff check .
57
57
  uv run ruff format --check .
58
58
 
59
+ - name: Run tests
60
+ run: |
61
+ source .venv/bin/activate
62
+ uv run pytest tests/ -v --tb=short
63
+
59
64
  - name: Test CLI entry point
60
65
  run: |
61
66
  source .venv/bin/activate
62
67
  uv run gapless-crypto-data --help
63
-
68
+
64
69
  - name: Test package build
65
70
  run: |
66
71
  source .venv/bin/activate
@@ -0,0 +1,63 @@
1
+ # Pre-commit hooks for gapless-crypto-data
2
+ # Ensures code quality and prevents broken code from being committed
3
+ # Uses local tools only to avoid external repository authentication issues
4
+
5
+ repos:
6
+ # All hooks use local project dependencies via uv
7
+ - repo: local
8
+ hooks:
9
+ # Ruff linter
10
+ - id: ruff-check
11
+ name: Ruff Linter
12
+ entry: uv run ruff check --fix --exit-non-zero-on-fix
13
+ language: system
14
+ types_or: [python, pyi]
15
+ require_serial: false
16
+
17
+ # Ruff formatter
18
+ - id: ruff-format
19
+ name: Ruff Formatter
20
+ entry: uv run ruff format
21
+ language: system
22
+ types_or: [python, pyi]
23
+ require_serial: false
24
+
25
+ # Python AST validation
26
+ - id: check-ast
27
+ name: Check Python AST
28
+ entry: uv run python -m py_compile
29
+ language: system
30
+ types: [python]
31
+
32
+ # File encoding validation
33
+ - id: validate-file-encoding
34
+ name: Validate file encoding (UTF-8/ASCII only)
35
+ entry: bash
36
+ language: system
37
+ args:
38
+ - -c
39
+ - |
40
+ echo "🔍 Checking file encoding..."
41
+ files=$(find src/ tests/ examples/ -name "*.py" -o -name "*.md" -o -name "*.txt" -o -name "*.toml" -o -name "*.yml" -o -name "*.yaml" 2>/dev/null || true)
42
+ if [ -n "$files" ]; then
43
+ non_utf8=$(echo "$files" | xargs file --mime-encoding | grep -v -E "(utf-8|us-ascii)" || true)
44
+ if [ -n "$non_utf8" ]; then
45
+ echo "❌ Non-UTF-8/ASCII files found:"
46
+ echo "$non_utf8"
47
+ echo "All text files must be UTF-8 or ASCII encoded."
48
+ exit 1
49
+ else
50
+ echo "✅ All project files are properly encoded (UTF-8/ASCII)"
51
+ fi
52
+ else
53
+ echo "✅ No text files found to check"
54
+ fi
55
+ files: \.(py|md|txt|toml|yml|yaml)$
56
+ require_serial: true
57
+
58
+ # Pre-commit configuration
59
+ default_install_hook_types: [pre-commit]
60
+ default_stages: [pre-commit]
61
+
62
+ # Performance settings
63
+ minimum_pre_commit_version: "3.0.0"
Binary file
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gapless-crypto-data
3
- Version: 2.0.2
4
- Summary: Cryptocurrency data collection with complete Binance microstructure format - 11-column output including quote volume, trade counts, and taker buy data
3
+ Version: 2.2.0
4
+ Summary: Ultra-fast cryptocurrency data collection with zero gaps guarantee and full 11-column microstructure format
5
5
  Project-URL: Homepage, https://github.com/Eon-Labs/gapless-crypto-data
6
6
  Project-URL: Documentation, https://github.com/Eon-Labs/gapless-crypto-data#readme
7
7
  Project-URL: Repository, https://github.com/Eon-Labs/gapless-crypto-data.git
@@ -57,7 +57,7 @@ Ultra-fast cryptocurrency data collection with zero gaps guarantee and full 11-c
57
57
  - 🔒 **Zero gaps guarantee** through authentic API-first validation
58
58
  - ⚡ **UV-first** modern Python tooling
59
59
  - 🛡️ **Corruption-proof** atomic file operations
60
- - 📊 **Multi-timeframe support** (1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h)
60
+ - 📊 **Multi-symbol & multi-timeframe support** (1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h)
61
61
  - 🔧 **Gap detection and filling** with authentic data only
62
62
  - 📈 **Production-grade** data collection for quantitative trading
63
63
 
@@ -82,11 +82,17 @@ pip install gapless-crypto-data
82
82
  ### CLI Usage
83
83
 
84
84
  ```bash
85
- # Collect data for multiple timeframes
85
+ # Collect data for multiple timeframes (default output location)
86
86
  gapless-crypto-data --symbol SOLUSDT --timeframes 1m,3m,5m,15m,30m,1h,2h,4h
87
87
 
88
- # Collect specific date range
89
- gapless-crypto-data --symbol BTCUSDT --timeframes 1h --start 2023-01-01 --end 2023-12-31
88
+ # Collect multiple symbols at once (native multi-symbol support)
89
+ gapless-crypto-data --symbol BTCUSDT,ETHUSDT,SOLUSDT --timeframes 1h,4h
90
+
91
+ # Collect specific date range with custom output directory
92
+ gapless-crypto-data --symbol BTCUSDT --timeframes 1h --start 2023-01-01 --end 2023-12-31 --output-dir ./crypto_data
93
+
94
+ # Multi-symbol with custom settings
95
+ gapless-crypto-data --symbol BTCUSDT,ETHUSDT --timeframes 5m,1h --start 2024-01-01 --end 2024-06-30 --output-dir ./crypto_data
90
96
 
91
97
  # Fill gaps in existing data
92
98
  gapless-crypto-data --fill-gaps --directory ./data
@@ -149,12 +155,11 @@ AtomicCSVOperations → Final Gapless Dataset with Order Flow Metrics
149
155
  gapless-crypto-data [OPTIONS]
150
156
 
151
157
  Options:
152
- --symbol TEXT Trading pair symbol (e.g., SOLUSDT, BTCUSDT)
158
+ --symbol TEXT Trading pair symbol(s) - single symbol or comma-separated list (e.g., SOLUSDT, BTCUSDT,ETHUSDT)
153
159
  --timeframes TEXT Comma-separated timeframes (1m,3m,5m,15m,30m,1h,2h,4h)
154
160
  --start TEXT Start date (YYYY-MM-DD)
155
161
  --end TEXT End date (YYYY-MM-DD)
156
- --directory TEXT Output directory (default: ./data)
157
- --workers INTEGER Number of parallel workers (default: 4)
162
+ --output-dir TEXT Output directory for CSV files (default: src/gapless_crypto_data/sample_data/)
158
163
  --help Show this message and exit
159
164
  ```
160
165
 
@@ -174,12 +179,25 @@ Options:
174
179
 
175
180
  ### Batch Processing
176
181
 
182
+ #### CLI Multi-Symbol (Recommended)
183
+
184
+ ```bash
185
+ # Native multi-symbol support (fastest approach)
186
+ gapless-crypto-data --symbol BTCUSDT,ETHUSDT,SOLUSDT,ADAUSDT --timeframes 1m,5m,15m,1h,4h --start 2023-01-01 --end 2023-12-31
187
+
188
+ # Alternative: Multiple separate commands for different settings
189
+ gapless-crypto-data --symbol BTCUSDT,ETHUSDT --timeframes 1m,1h --start 2023-01-01 --end 2023-06-30
190
+ gapless-crypto-data --symbol SOLUSDT,ADAUSDT --timeframes 5m,4h --start 2023-07-01 --end 2023-12-31
191
+ ```
192
+
193
+ #### Python API
194
+
177
195
  ```python
178
196
  from gapless_crypto_data import BinancePublicDataCollector
179
197
 
180
198
  collector = BinancePublicDataCollector()
181
199
 
182
- # Process multiple symbols
200
+ # Process multiple symbols (loop-based for complex logic)
183
201
  symbols = ["BTCUSDT", "ETHUSDT", "SOLUSDT", "ADAUSDT"]
184
202
  timeframes = ["1m", "5m", "15m", "1h", "4h"]
185
203
 
@@ -188,8 +206,7 @@ for symbol in symbols:
188
206
  symbol=symbol,
189
207
  timeframes=timeframes,
190
208
  start_date="2023-01-01",
191
- end_date="2023-12-31",
192
- workers=8 # Parallel downloads
209
+ end_date="2023-12-31"
193
210
  )
194
211
  ```
195
212
 
@@ -214,29 +231,103 @@ gap_filler.fill_gaps(
214
231
 
215
232
  ## 🛠️ Development
216
233
 
217
- ### Using UV (Recommended)
234
+ ### Prerequisites
235
+
236
+ - **UV Package Manager** (recommended) - [Install UV](https://docs.astral.sh/uv/getting-started/installation/)
237
+ - **Python 3.9+** - UV will manage Python versions automatically
238
+ - **Git** - For repository cloning and version control
218
239
 
240
+ ### Development Installation Workflow
241
+
242
+ **IMPORTANT**: This project uses **mandatory pre-commit hooks** to prevent broken code from being committed. All commits are automatically validated for formatting, linting, and basic quality checks.
243
+
244
+ #### Step 1: Clone Repository
219
245
  ```bash
220
- # Clone repository
221
246
  git clone https://github.com/Eon-Labs/gapless-crypto-data.git
222
247
  cd gapless-crypto-data
248
+ ```
223
249
 
224
- # Create development environment
250
+ #### Step 2: Development Environment Setup
251
+ ```bash
252
+ # Create isolated virtual environment
225
253
  uv venv
226
- source .venv/bin/activate # On Windows: .venv\Scripts\activate
227
254
 
228
- # Install development dependencies
255
+ # Activate virtual environment
256
+ source .venv/bin/activate # macOS/Linux
257
+ # .venv\Scripts\activate # Windows
258
+
259
+ # Install all dependencies (production + development)
229
260
  uv sync --dev
261
+ ```
262
+
263
+ #### Step 3: Verify Installation
264
+ ```bash
265
+ # Test CLI functionality
266
+ uv run gapless-crypto-data --help
230
267
 
231
- # Run tests
268
+ # Run test suite
232
269
  uv run pytest
233
270
 
234
- # Code formatting and linting
271
+ # Quick data collection test
272
+ uv run gapless-crypto-data --symbol BTCUSDT --timeframes 1h --start 2024-01-01 --end 2024-01-01 --output-dir ./test_data
273
+ ```
274
+
275
+ #### Step 4: Set Up Pre-Commit Hooks (Mandatory)
276
+ ```bash
277
+ # Install pre-commit hooks (prevents broken code from being committed)
278
+ uv run pre-commit install
279
+
280
+ # Test pre-commit hooks
281
+ uv run pre-commit run --all-files
282
+ ```
283
+
284
+ #### Step 5: Development Tools
285
+ ```bash
286
+ # Code formatting
235
287
  uv run ruff format .
288
+
289
+ # Linting and auto-fixes
236
290
  uv run ruff check --fix .
237
291
 
238
292
  # Type checking
239
293
  uv run mypy src/
294
+
295
+ # Run specific tests
296
+ uv run pytest tests/test_binance_collector.py -v
297
+
298
+ # Manual pre-commit validation
299
+ uv run pre-commit run --all-files
300
+ ```
301
+
302
+ ### Development Commands Reference
303
+
304
+ | Task | Command |
305
+ |------|---------|
306
+ | Install dependencies | `uv sync --dev` |
307
+ | Setup pre-commit hooks | `uv run pre-commit install` |
308
+ | Add new dependency | `uv add package-name` |
309
+ | Add dev dependency | `uv add --dev package-name` |
310
+ | Run CLI | `uv run gapless-crypto-data [args]` |
311
+ | Run tests | `uv run pytest` |
312
+ | Format code | `uv run ruff format .` |
313
+ | Lint code | `uv run ruff check --fix .` |
314
+ | Type check | `uv run mypy src/` |
315
+ | Validate pre-commit | `uv run pre-commit run --all-files` |
316
+ | Build package | `uv build` |
317
+
318
+ ### Project Structure for Development
319
+ ```
320
+ gapless-crypto-data/
321
+ ├── src/gapless_crypto_data/ # Main package
322
+ │ ├── __init__.py # Package exports
323
+ │ ├── cli.py # CLI interface
324
+ │ ├── collectors/ # Data collection modules
325
+ │ └── gap_filling/ # Gap detection/filling
326
+ ├── tests/ # Test suite
327
+ ├── docs/ # Documentation
328
+ ├── examples/ # Usage examples
329
+ ├── pyproject.toml # Project configuration
330
+ └── uv.lock # Dependency lock file
240
331
  ```
241
332
 
242
333
  ### Building and Publishing
@@ -14,7 +14,7 @@ Ultra-fast cryptocurrency data collection with zero gaps guarantee and full 11-c
14
14
  - 🔒 **Zero gaps guarantee** through authentic API-first validation
15
15
  - ⚡ **UV-first** modern Python tooling
16
16
  - 🛡️ **Corruption-proof** atomic file operations
17
- - 📊 **Multi-timeframe support** (1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h)
17
+ - 📊 **Multi-symbol & multi-timeframe support** (1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h)
18
18
  - 🔧 **Gap detection and filling** with authentic data only
19
19
  - 📈 **Production-grade** data collection for quantitative trading
20
20
 
@@ -39,11 +39,17 @@ pip install gapless-crypto-data
39
39
  ### CLI Usage
40
40
 
41
41
  ```bash
42
- # Collect data for multiple timeframes
42
+ # Collect data for multiple timeframes (default output location)
43
43
  gapless-crypto-data --symbol SOLUSDT --timeframes 1m,3m,5m,15m,30m,1h,2h,4h
44
44
 
45
- # Collect specific date range
46
- gapless-crypto-data --symbol BTCUSDT --timeframes 1h --start 2023-01-01 --end 2023-12-31
45
+ # Collect multiple symbols at once (native multi-symbol support)
46
+ gapless-crypto-data --symbol BTCUSDT,ETHUSDT,SOLUSDT --timeframes 1h,4h
47
+
48
+ # Collect specific date range with custom output directory
49
+ gapless-crypto-data --symbol BTCUSDT --timeframes 1h --start 2023-01-01 --end 2023-12-31 --output-dir ./crypto_data
50
+
51
+ # Multi-symbol with custom settings
52
+ gapless-crypto-data --symbol BTCUSDT,ETHUSDT --timeframes 5m,1h --start 2024-01-01 --end 2024-06-30 --output-dir ./crypto_data
47
53
 
48
54
  # Fill gaps in existing data
49
55
  gapless-crypto-data --fill-gaps --directory ./data
@@ -106,12 +112,11 @@ AtomicCSVOperations → Final Gapless Dataset with Order Flow Metrics
106
112
  gapless-crypto-data [OPTIONS]
107
113
 
108
114
  Options:
109
- --symbol TEXT Trading pair symbol (e.g., SOLUSDT, BTCUSDT)
115
+ --symbol TEXT Trading pair symbol(s) - single symbol or comma-separated list (e.g., SOLUSDT, BTCUSDT,ETHUSDT)
110
116
  --timeframes TEXT Comma-separated timeframes (1m,3m,5m,15m,30m,1h,2h,4h)
111
117
  --start TEXT Start date (YYYY-MM-DD)
112
118
  --end TEXT End date (YYYY-MM-DD)
113
- --directory TEXT Output directory (default: ./data)
114
- --workers INTEGER Number of parallel workers (default: 4)
119
+ --output-dir TEXT Output directory for CSV files (default: src/gapless_crypto_data/sample_data/)
115
120
  --help Show this message and exit
116
121
  ```
117
122
 
@@ -131,12 +136,25 @@ Options:
131
136
 
132
137
  ### Batch Processing
133
138
 
139
+ #### CLI Multi-Symbol (Recommended)
140
+
141
+ ```bash
142
+ # Native multi-symbol support (fastest approach)
143
+ gapless-crypto-data --symbol BTCUSDT,ETHUSDT,SOLUSDT,ADAUSDT --timeframes 1m,5m,15m,1h,4h --start 2023-01-01 --end 2023-12-31
144
+
145
+ # Alternative: Multiple separate commands for different settings
146
+ gapless-crypto-data --symbol BTCUSDT,ETHUSDT --timeframes 1m,1h --start 2023-01-01 --end 2023-06-30
147
+ gapless-crypto-data --symbol SOLUSDT,ADAUSDT --timeframes 5m,4h --start 2023-07-01 --end 2023-12-31
148
+ ```
149
+
150
+ #### Python API
151
+
134
152
  ```python
135
153
  from gapless_crypto_data import BinancePublicDataCollector
136
154
 
137
155
  collector = BinancePublicDataCollector()
138
156
 
139
- # Process multiple symbols
157
+ # Process multiple symbols (loop-based for complex logic)
140
158
  symbols = ["BTCUSDT", "ETHUSDT", "SOLUSDT", "ADAUSDT"]
141
159
  timeframes = ["1m", "5m", "15m", "1h", "4h"]
142
160
 
@@ -145,8 +163,7 @@ for symbol in symbols:
145
163
  symbol=symbol,
146
164
  timeframes=timeframes,
147
165
  start_date="2023-01-01",
148
- end_date="2023-12-31",
149
- workers=8 # Parallel downloads
166
+ end_date="2023-12-31"
150
167
  )
151
168
  ```
152
169
 
@@ -171,29 +188,103 @@ gap_filler.fill_gaps(
171
188
 
172
189
  ## 🛠️ Development
173
190
 
174
- ### Using UV (Recommended)
191
+ ### Prerequisites
192
+
193
+ - **UV Package Manager** (recommended) - [Install UV](https://docs.astral.sh/uv/getting-started/installation/)
194
+ - **Python 3.9+** - UV will manage Python versions automatically
195
+ - **Git** - For repository cloning and version control
175
196
 
197
+ ### Development Installation Workflow
198
+
199
+ **IMPORTANT**: This project uses **mandatory pre-commit hooks** to prevent broken code from being committed. All commits are automatically validated for formatting, linting, and basic quality checks.
200
+
201
+ #### Step 1: Clone Repository
176
202
  ```bash
177
- # Clone repository
178
203
  git clone https://github.com/Eon-Labs/gapless-crypto-data.git
179
204
  cd gapless-crypto-data
205
+ ```
180
206
 
181
- # Create development environment
207
+ #### Step 2: Development Environment Setup
208
+ ```bash
209
+ # Create isolated virtual environment
182
210
  uv venv
183
- source .venv/bin/activate # On Windows: .venv\Scripts\activate
184
211
 
185
- # Install development dependencies
212
+ # Activate virtual environment
213
+ source .venv/bin/activate # macOS/Linux
214
+ # .venv\Scripts\activate # Windows
215
+
216
+ # Install all dependencies (production + development)
186
217
  uv sync --dev
218
+ ```
219
+
220
+ #### Step 3: Verify Installation
221
+ ```bash
222
+ # Test CLI functionality
223
+ uv run gapless-crypto-data --help
187
224
 
188
- # Run tests
225
+ # Run test suite
189
226
  uv run pytest
190
227
 
191
- # Code formatting and linting
228
+ # Quick data collection test
229
+ uv run gapless-crypto-data --symbol BTCUSDT --timeframes 1h --start 2024-01-01 --end 2024-01-01 --output-dir ./test_data
230
+ ```
231
+
232
+ #### Step 4: Set Up Pre-Commit Hooks (Mandatory)
233
+ ```bash
234
+ # Install pre-commit hooks (prevents broken code from being committed)
235
+ uv run pre-commit install
236
+
237
+ # Test pre-commit hooks
238
+ uv run pre-commit run --all-files
239
+ ```
240
+
241
+ #### Step 5: Development Tools
242
+ ```bash
243
+ # Code formatting
192
244
  uv run ruff format .
245
+
246
+ # Linting and auto-fixes
193
247
  uv run ruff check --fix .
194
248
 
195
249
  # Type checking
196
250
  uv run mypy src/
251
+
252
+ # Run specific tests
253
+ uv run pytest tests/test_binance_collector.py -v
254
+
255
+ # Manual pre-commit validation
256
+ uv run pre-commit run --all-files
257
+ ```
258
+
259
+ ### Development Commands Reference
260
+
261
+ | Task | Command |
262
+ |------|---------|
263
+ | Install dependencies | `uv sync --dev` |
264
+ | Setup pre-commit hooks | `uv run pre-commit install` |
265
+ | Add new dependency | `uv add package-name` |
266
+ | Add dev dependency | `uv add --dev package-name` |
267
+ | Run CLI | `uv run gapless-crypto-data [args]` |
268
+ | Run tests | `uv run pytest` |
269
+ | Format code | `uv run ruff format .` |
270
+ | Lint code | `uv run ruff check --fix .` |
271
+ | Type check | `uv run mypy src/` |
272
+ | Validate pre-commit | `uv run pre-commit run --all-files` |
273
+ | Build package | `uv build` |
274
+
275
+ ### Project Structure for Development
276
+ ```
277
+ gapless-crypto-data/
278
+ ├── src/gapless_crypto_data/ # Main package
279
+ │ ├── __init__.py # Package exports
280
+ │ ├── cli.py # CLI interface
281
+ │ ├── collectors/ # Data collection modules
282
+ │ └── gap_filling/ # Gap detection/filling
283
+ ├── tests/ # Test suite
284
+ ├── docs/ # Documentation
285
+ ├── examples/ # Usage examples
286
+ ├── pyproject.toml # Project configuration
287
+ └── uv.lock # Dependency lock file
197
288
  ```
198
289
 
199
290
  ### Building and Publishing
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0908f3cfeb1dc30e1248833fc32f1c873365de65ba018e55650959766f54f443
3
+ size 3786
@@ -0,0 +1,100 @@
1
+ {
2
+ "version": "4.0.0",
3
+ "generator": "BinancePublicDataCollector",
4
+ "generation_timestamp": "2025-09-16T16:37:14.514892Z",
5
+ "data_source": "Binance Public Data Repository",
6
+ "data_source_url": "https://data.binance.vision/data/spot/monthly/klines",
7
+ "market_type": "spot",
8
+ "symbol": "BTCUSDT",
9
+ "timeframe": "1h",
10
+ "collection_method": "direct_download",
11
+ "target_period": {
12
+ "start": "2024-01-01T00:00:00",
13
+ "end": "2024-01-01T23:59:59",
14
+ "total_days": 0
15
+ },
16
+ "actual_bars": 24,
17
+ "date_range": {
18
+ "start": "2024-01-01 00:00:00",
19
+ "end": "2024-01-01 23:00:00"
20
+ },
21
+ "statistics": {
22
+ "price_min": 42180.77,
23
+ "price_max": 44184.1,
24
+ "volume_total": 27174.299030000002,
25
+ "volume_mean": 1132.2624595833333
26
+ },
27
+ "collection_performance": {
28
+ "method": "direct_download",
29
+ "duration": 0.965773,
30
+ "bars_per_second": 24.850560121270732
31
+ },
32
+ "data_integrity": {
33
+ "chronological_order": true,
34
+ "data_hash": "8a57572144bae5e8efd23d39b9c87d285ef9ba4669cc78edfe446a458239adaa",
35
+ "corruption_detected": false,
36
+ "corrupted_rows_count": 0,
37
+ "corruption_details": [],
38
+ "header_detection": {
39
+ "header_found": false,
40
+ "header_content": null,
41
+ "data_start_row": 0
42
+ }
43
+ },
44
+ "timestamp_format_analysis": {
45
+ "total_rows_analyzed": 744,
46
+ "formats_detected": {
47
+ "milliseconds": 744
48
+ },
49
+ "transitions_detected": 0,
50
+ "transition_details": [],
51
+ "primary_format": "milliseconds",
52
+ "format_consistency": true
53
+ },
54
+ "enhanced_microstructure_format": {
55
+ "format_version": "4.0.0",
56
+ "total_columns": 11,
57
+ "enhanced_features": [
58
+ "quote_asset_volume",
59
+ "number_of_trades",
60
+ "taker_buy_base_asset_volume",
61
+ "taker_buy_quote_asset_volume",
62
+ "close_time"
63
+ ],
64
+ "analysis_capabilities": [
65
+ "order_flow_analysis",
66
+ "liquidity_metrics",
67
+ "market_microstructure",
68
+ "trade_weighted_prices",
69
+ "institutional_data_patterns"
70
+ ],
71
+ "professional_features": true,
72
+ "api_format_compatibility": true
73
+ },
74
+ "gap_analysis": {
75
+ "analysis_performed": true,
76
+ "total_gaps_detected": 0,
77
+ "gaps_filled": 0,
78
+ "gaps_remaining": 0,
79
+ "gap_details": [],
80
+ "total_missing_bars": 0,
81
+ "gap_filling_method": "authentic_binance_api",
82
+ "data_completeness_score": 1.0,
83
+ "analysis_timestamp": "2025-09-16T16:37:14.514878Z",
84
+ "analysis_parameters": {
85
+ "timeframe": "1h",
86
+ "expected_interval_minutes": 60,
87
+ "tolerance_factor": 1.5
88
+ }
89
+ },
90
+ "compliance": {
91
+ "zero_magic_numbers": true,
92
+ "temporal_integrity": true,
93
+ "authentic_spot_data_only": true,
94
+ "official_binance_source": true,
95
+ "binance_format_transition_aware": true,
96
+ "supports_milliseconds_microseconds": true,
97
+ "full_binance_microstructure_format": true,
98
+ "professional_trading_ready": true
99
+ }
100
+ }
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bca2dec3542bd30316f52bd5a56713bcaab7cff4fcfc1de5edd8c044c4a0afba
3
+ size 3764