Search is not available for this dataset
ts timestamp[us]date 1971-01-04 00:00:00 2026-02-14 14:00:00 | open float64 0 19M | high float64 0 19M | low float64 0 19M | close float64 0 19M | volume int64 0 52.3M |
|---|---|---|---|---|---|
2021-10-04T09:00:00 | 2.999 | 3.003 | 2.978 | 2.984 | 1,500 |
2021-10-04T09:15:00 | 2.984 | 3.005 | 2.984 | 2.992 | 1,500 |
2021-10-04T09:30:00 | 2.992 | 3.017 | 2.991 | 3.016 | 1,500 |
2021-10-04T09:45:00 | 3.016 | 3.028 | 3.006 | 3.027 | 1,500 |
2021-10-04T10:00:00 | 3.027 | 3.031 | 3.014 | 3.017 | 1,500 |
2021-10-04T10:15:00 | 3.017 | 3.017 | 2.981 | 3.016 | 1,500 |
2021-10-04T10:30:00 | 3.017 | 3.019 | 2.99 | 2.993 | 1,500 |
2021-10-04T10:45:00 | 2.994 | 3.014 | 2.992 | 3.011 | 1,500 |
2021-10-04T11:00:00 | 3.011 | 3.015 | 2.974 | 2.975 | 1,500 |
2021-10-04T11:15:00 | 2.975 | 2.998 | 2.968 | 2.969 | 1,500 |
2021-10-04T11:30:00 | 2.968 | 2.992 | 2.952 | 2.979 | 1,500 |
2021-10-04T11:45:00 | 2.979 | 3.008 | 2.979 | 2.991 | 1,500 |
2021-10-04T12:00:00 | 2.991 | 3.018 | 2.977 | 3.016 | 1,500 |
2021-10-04T12:15:00 | 3.016 | 3.032 | 3.012 | 3.031 | 1,500 |
2021-10-04T12:30:00 | 3.031 | 3.034 | 3.011 | 3.022 | 1,500 |
2021-10-04T12:45:00 | 3.023 | 3.042 | 3.022 | 3.036 | 1,500 |
2021-10-04T13:00:00 | 3.037 | 3.063 | 3.03 | 3.061 | 1,500 |
2021-10-04T13:15:00 | 3.06 | 3.077 | 3.043 | 3.062 | 1,500 |
2021-10-04T13:30:00 | 3.063 | 3.07 | 3.046 | 3.067 | 1,500 |
2021-10-04T13:45:00 | 3.068 | 3.071 | 3.039 | 3.07 | 1,500 |
2021-10-04T14:00:00 | 3.07 | 3.094 | 3.06 | 3.083 | 1,500 |
2021-10-04T14:15:00 | 3.083 | 3.111 | 3.083 | 3.099 | 1,500 |
2021-10-04T14:30:00 | 3.099 | 3.102 | 3.027 | 3.039 | 1,500 |
2021-10-04T14:45:00 | 3.04 | 3.04 | 2.97 | 3.002 | 1,500 |
2021-10-04T15:00:00 | 3.002 | 3.002 | 2.89 | 2.983 | 1,500 |
2021-10-04T15:15:00 | 2.982 | 2.992 | 2.956 | 2.979 | 1,500 |
2021-10-04T15:30:00 | 2.98 | 2.996 | 2.978 | 2.994 | 1,500 |
2021-10-04T15:45:00 | 2.993 | 3.008 | 2.98 | 3.002 | 1,500 |
2021-10-04T16:00:00 | 3.001 | 3.046 | 2.994 | 3.043 | 1,500 |
2021-10-04T16:15:00 | 3.043 | 3.08 | 3.039 | 3.08 | 1,500 |
2021-10-04T16:30:00 | 3.08 | 3.089 | 3.051 | 3.055 | 1,500 |
2021-10-04T16:45:00 | 3.054 | 3.084 | 3.04 | 3.075 | 1,500 |
2021-10-04T17:00:00 | 3.075 | 3.082 | 3.041 | 3.065 | 1,500 |
2021-10-04T17:15:00 | 3.065 | 3.072 | 3.045 | 3.062 | 1,500 |
2021-10-04T17:30:00 | 3.061 | 3.092 | 3.061 | 3.074 | 1,500 |
2021-10-04T17:45:00 | 3.074 | 3.1 | 3.071 | 3.091 | 1,500 |
2021-10-04T18:00:00 | 3.092 | 3.104 | 3.07 | 3.095 | 1,500 |
2021-10-04T18:15:00 | 3.095 | 3.122 | 3.092 | 3.118 | 1,500 |
2021-10-04T18:30:00 | 3.118 | 3.154 | 3.118 | 3.136 | 1,500 |
2021-10-04T18:45:00 | 3.136 | 3.152 | 3.125 | 3.145 | 1,500 |
2021-10-04T19:00:00 | 3.145 | 3.176 | 3.137 | 3.146 | 1,500 |
2021-10-04T19:15:00 | 3.148 | 3.164 | 3.134 | 3.146 | 1,500 |
2021-10-04T19:30:00 | 3.147 | 3.186 | 3.147 | 3.18 | 1,500 |
2021-10-04T19:45:00 | 3.18 | 3.202 | 3.172 | 3.199 | 1,500 |
2021-10-04T20:00:00 | 3.199 | 3.209 | 3.157 | 3.174 | 1,500 |
2021-10-04T20:15:00 | 3.173 | 3.174 | 3.15 | 3.153 | 1,500 |
2021-10-04T20:30:00 | 3.153 | 3.161 | 3.127 | 3.158 | 1,500 |
2021-10-04T20:45:00 | 3.158 | 3.172 | 3.144 | 3.148 | 1,500 |
2021-10-04T21:00:00 | 3.148 | 3.163 | 3.138 | 3.14 | 1,500 |
2021-10-04T21:15:00 | 3.14 | 3.162 | 3.14 | 3.142 | 1,500 |
2021-10-04T21:30:00 | 3.142 | 3.144 | 3.128 | 3.135 | 1,500 |
2021-10-04T21:45:00 | 3.135 | 3.16 | 3.127 | 3.16 | 1,500 |
2021-10-04T22:00:00 | 3.16 | 3.18 | 3.156 | 3.167 | 1,500 |
2021-10-04T22:15:00 | 3.168 | 3.179 | 3.164 | 3.173 | 1,500 |
2021-10-04T22:30:00 | 3.173 | 3.186 | 3.155 | 3.161 | 1,500 |
2021-10-04T22:45:00 | 3.161 | 3.211 | 3.147 | 3.193 | 1,500 |
2021-10-04T23:00:00 | 3.192 | 3.209 | 3.184 | 3.192 | 1,500 |
2021-10-04T23:15:00 | 3.192 | 3.208 | 3.175 | 3.18 | 1,500 |
2021-10-04T23:30:00 | 3.18 | 3.197 | 3.167 | 3.174 | 1,500 |
2021-10-04T23:45:00 | 3.175 | 3.183 | 3.149 | 3.166 | 1,500 |
2021-10-05T00:00:00 | 3.166 | 3.202 | 3.147 | 3.189 | 1,500 |
2021-10-05T00:15:00 | 3.189 | 3.212 | 3.189 | 3.197 | 1,500 |
2021-10-05T00:30:00 | 3.197 | 3.25 | 3.188 | 3.248 | 1,500 |
2021-10-05T00:45:00 | 3.248 | 3.272 | 3.242 | 3.244 | 1,500 |
2021-10-05T01:00:00 | 3.244 | 3.248 | 3.208 | 3.221 | 1,500 |
2021-10-05T01:15:00 | 3.221 | 3.221 | 3.197 | 3.199 | 1,500 |
2021-10-05T01:30:00 | 3.199 | 3.2 | 3.163 | 3.163 | 1,500 |
2021-10-05T01:45:00 | 3.163 | 3.175 | 3.156 | 3.156 | 1,500 |
2021-10-05T02:00:00 | 3.156 | 3.165 | 3.132 | 3.137 | 1,500 |
2021-10-05T02:15:00 | 3.137 | 3.153 | 3.134 | 3.151 | 1,500 |
2021-10-05T02:30:00 | 3.151 | 3.168 | 3.142 | 3.145 | 1,500 |
2021-10-05T02:45:00 | 3.145 | 3.167 | 3.144 | 3.167 | 1,500 |
2021-10-05T03:00:00 | 3.167 | 3.199 | 3.162 | 3.191 | 1,500 |
2021-10-05T03:15:00 | 3.191 | 3.208 | 3.187 | 3.207 | 1,500 |
2021-10-05T03:30:00 | 3.207 | 3.212 | 3.185 | 3.199 | 1,500 |
2021-10-05T03:45:00 | 3.199 | 3.211 | 3.189 | 3.211 | 1,500 |
2021-10-05T04:00:00 | 3.212 | 3.212 | 3.192 | 3.2 | 1,500 |
2021-10-05T04:15:00 | 3.2 | 3.201 | 3.17 | 3.176 | 1,500 |
2021-10-05T04:30:00 | 3.175 | 3.175 | 3.145 | 3.145 | 1,500 |
2021-10-05T04:45:00 | 3.145 | 3.152 | 3.133 | 3.138 | 1,500 |
2021-10-05T05:00:00 | 3.137 | 3.173 | 3.134 | 3.167 | 1,500 |
2021-10-05T05:15:00 | 3.167 | 3.178 | 3.163 | 3.178 | 1,500 |
2021-10-05T05:30:00 | 3.178 | 3.182 | 3.165 | 3.172 | 1,500 |
2021-10-05T05:45:00 | 3.173 | 3.182 | 3.171 | 3.174 | 1,500 |
2021-10-05T06:00:00 | 3.174 | 3.176 | 3.161 | 3.172 | 1,500 |
2021-10-05T06:15:00 | 3.171 | 3.181 | 3.169 | 3.179 | 1,500 |
2021-10-05T06:30:00 | 3.178 | 3.192 | 3.17 | 3.192 | 1,500 |
2021-10-05T06:45:00 | 3.192 | 3.2 | 3.179 | 3.181 | 1,500 |
2021-10-05T07:00:00 | 3.181 | 3.217 | 3.176 | 3.208 | 1,500 |
2021-10-05T07:15:00 | 3.208 | 3.216 | 3.2 | 3.216 | 1,500 |
2021-10-05T07:30:00 | 3.216 | 3.217 | 3.199 | 3.21 | 1,500 |
2021-10-05T07:45:00 | 3.21 | 3.212 | 3.182 | 3.19 | 1,500 |
2021-10-05T08:00:00 | 3.19 | 3.19 | 3.164 | 3.181 | 1,500 |
2021-10-05T08:15:00 | 3.181 | 3.181 | 3.144 | 3.145 | 1,500 |
2021-10-05T08:30:00 | 3.144 | 3.174 | 3.144 | 3.162 | 1,500 |
2021-10-05T08:45:00 | 3.162 | 3.176 | 3.16 | 3.169 | 1,500 |
2021-10-05T09:00:00 | 3.169 | 3.172 | 3.148 | 3.153 | 1,500 |
2021-10-05T09:15:00 | 3.153 | 3.159 | 3.128 | 3.139 | 1,500 |
2021-10-05T09:30:00 | 3.139 | 3.165 | 3.137 | 3.165 | 1,500 |
2021-10-05T09:45:00 | 3.164 | 3.187 | 3.157 | 3.186 | 1,500 |
End of preview. Expand in Data Studio
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
π Zero-Cost Cloud Data Lake on Hugging Face
A complete serverless data pipeline that converts 12GB+ of CSV data to optimized Parquet format and serves it via a FastAPI on Hugging Face Spaces.
ποΈ Architecture Overview
π Local CSV Data (12GB+)
β
π Conversion Script (DuckDB + SNAPPY)
β
π¦ Parquet Files (4.4GB - 67% compression)
β
βοΈ Hugging Face Dataset
β
π Serverless FastAPI
β
π Public API Endpoint
π Dataset Information
- Source: 793 CSV files across 6 timeframes
- Assets: 100+ financial instruments (Forex, Crypto, Stocks, Commodities)
- Timeframes: 1min, 5min, 15min, 30min, 1hr, 4hr, 1day
- Format: OHLCV (Open, High, Low, Close, Volume)
- Compression: 67% size reduction (13.4GB β 4.4GB)
- Storage: Hugging Face Datasets
π Quick Start
1. API Access
- Live API: https://omchoksi108-forexdatalake.hf.space
- Documentation: https://omchoksi108-forexdatalake.hf.space/docs
- Dataset: https://huggingface.co/datasets/omchoksi108/forex-cloud-data-lake
2. API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | API information |
/health |
GET | Health check |
/describe |
GET | Dataset schema |
/preview |
GET | Quick data preview |
/query |
POST | Execute SQL queries |
3. Example Usage
Health Check
curl https://omchoksi108-forexdatalake.hf.space/health
Get Dataset Schema
curl https://omchoksi108-forexdatalake.hf.space/describe
Preview Data
curl "https://omchoksi108-forexdatalake.hf.space/preview?limit=5"
Execute SQL Query
curl -X POST https://omchoksi108-forexdatalake.hf.space/query \
-H "Content-Type: application/json" \
-d '{
"sql_query": "SELECT ts, close, volume FROM data WHERE close > 100 LIMIT 10",
"limit": 100
}'
π File Structure
βββ requirements_local.txt # Local dependencies
βββ scripts/
β βββ 1_convert_to_parquet.py # CSV β Parquet conversion
β βββ 2_upload_to_hf.py # Upload to Hugging Face
βββ api_deploy/
β βββ main.py # FastAPI server
β βββ requirements.txt # API dependencies
β βββ Dockerfile # Container configuration
βββ parquet_data/ # Converted Parquet files
βββ forexdatalake/ # Hugging Face Space files
π οΈ Local Setup
Prerequisites
- Python 3.9+
- Hugging Face account with write permissions
Installation
pip install -r requirements_local.txt
Environment Setup
Create .env file:
HF_TOKEN=your_hf_write_token_here
HF_USERNAME=omchoksi108
Data Conversion
python scripts/1_convert_to_parquet.py
Upload to Hugging Face
python scripts/2_upload_to_hf.py
π§ Technical Details
Data Processing
- Engine: DuckDB (in-memory analytical database)
- Compression: SNAPPY (balanced speed/size)
- Format: Apache Parquet (columnar storage)
- Memory Usage: Optimized for large datasets
API Features
- Serverless: No server management required
- Streaming: Direct Parquet queries without download
- Caching: HTTP file caching for performance
- Security: SQL injection protection
- Monitoring: Health checks and error handling
Performance Metrics
- Conversion Rate: ~1.8 files/second
- Compression Ratio: 67% size reduction
- Query Response: Sub-second for most queries
- Concurrent Users: Handles multiple simultaneous requests
π Data Schema
Each Parquet file contains:
ts TIMESTAMP -- Data timestamp (YYYY-MM-DD HH:MM)
open DOUBLE -- Opening price
high DOUBLE -- Highest price
low DOUBLE -- Lowest price
close DOUBLE -- Closing price
volume BIGINT -- Trading volume
π Security Features
- SQL Validation: Only SELECT statements allowed
- Query Limits: Configurable result limits
- Input Sanitization: Prevents SQL injection
- Private Dataset: Access controlled via Hugging Face
- Token Security: No hardcoded credentials
π Deployment
Automatic Deployment
- Push changes to
forexdatalakefolder - Hugging Face automatically builds Docker container
- API becomes available at your Space URL
Manual Deployment
cd forexdatalake
git add .
git commit -m "Update API"
git push origin master
π Query Examples
Filter by Symbol
SELECT * FROM data
WHERE filename LIKE '%BTCUSD%'
LIMIT 100
Time Range Analysis
SELECT ts, close, volume
FROM data
WHERE ts BETWEEN '2023-01-01' AND '2023-12-31'
AND symbol = 'EURUSD'
ORDER BY ts DESC
Price Statistics
SELECT
AVG(close) as avg_close,
MIN(close) as min_close,
MAX(close) as max_close,
COUNT(*) as total_records
FROM data
WHERE symbol = 'BTCUSD'
Volume Analysis
SELECT
DATE(ts) as date,
SUM(volume) as daily_volume,
AVG(close) as avg_price
FROM data
WHERE symbol = 'ETHUSD'
GROUP BY DATE(ts)
ORDER BY date DESC
LIMIT 30
π Data Updates
Adding New Data
- Add CSV files to appropriate timeframe folders
- Run conversion script
- Upload updated Parquet files
- API automatically queries latest data
Schema Changes
- Update conversion script for new columns
- Re-run conversion process
- Upload updated dataset
π Troubleshooting
Common Issues
Token Permissions
Error: 403 Forbidden - You don't have rights to create dataset
Solution: Create new HF token with write permissions
Memory Issues
Error: Out of memory during conversion
Solution: Reduce DuckDB memory_limit in script
API Timeouts
Error: Request timeout
Solution: Add LIMIT clause to queries
Performance Optimization
- Use specific column selection instead of
SELECT * - Add appropriate WHERE clauses
- Use LIMIT for large result sets
- Consider time-based partitioning for queries
π Resources
- DuckDB Documentation: https://duckdb.org/docs/
- FastAPI Documentation: https://fastapi.tiangolo.com/
- Hugging Face Datasets: https://huggingface.co/docs/datasets/
- Parquet Format: https://parquet.apache.org/
π€ Contributing
- Fork the repository
- Create feature branch
- Make changes
- Test thoroughly
- Submit pull request
π License
This project is licensed under the MIT License.
π Acknowledgments
- DuckDB Team - High-performance analytical database
- Hugging Face - Free hosting and infrastructure
- FastAPI - Modern web framework
- Parquet Community - Efficient columnar storage
π Star this project if you find it useful!
π§ Contact: For issues and questions, use the Issues tab on Hugging Face.
- Downloads last month
- 771
Size of downloaded dataset files:
4.65 GB
Size of the auto-converted Parquet files:
4.65 GB
Number of rows:
276,427,113