Files
foxhunt/list_datasets.py
jgrusewski e8a68ee39f Download 360 DBN files (36.3 MB) using Rust databento client
- Created data/examples/download_ml_training_data.rs using reqwest + Databento HTTP API
- Downloaded 90 days × 4 symbols (ES.FUT, NQ.FUT, ZN.FUT, 6E.FUT)
- Files saved to test_data/real/databento/ml_training/
- Total: 360 files, 15 MB compressed DBN format
- Used existing Rust pattern from download_nq_fut.rs
- API key loaded from .env file
- 100% success rate (360/360 files)
- Ready for ML training benchmarks

Next: Create simplified training benchmark for RTX 3050 Ti GPU measurements
2025-10-13 13:30:02 +02:00

65 lines
1.6 KiB
Python

#!/usr/bin/env python3
"""
List available datasets and check symbology rules.
"""
import os
import databento as db
import sys
def main():
# Check for API key
api_key = os.environ.get("DATABENTO_API_KEY")
if not api_key:
print("ERROR: DATABENTO_API_KEY environment variable not set")
sys.exit(1)
# Create client
client = db.Historical(api_key)
print("=" * 70)
print("Available Datasets")
print("=" * 70)
# List datasets
try:
datasets = client.metadata.list_datasets()
print(f"\nFound {len(datasets)} datasets:\n")
for dataset in datasets:
print(f"Dataset: {dataset}")
print()
print("=" * 70)
print("CME Group Datasets (for futures)")
print("=" * 70)
cme_datasets = [d for d in datasets if 'CME' in str(d) or 'GLBX' in str(d)]
if cme_datasets:
for ds in cme_datasets:
print(f" - {ds}")
else:
print(" (filtering by name, showing all)")
for ds in datasets:
print(f" - {ds}")
except Exception as e:
print(f"Error listing datasets: {e}")
# Let's also try to get symbology info
print()
print("=" * 70)
print("Dataset Details for GLBX.MDP3")
print("=" * 70)
try:
# Get dataset info
dataset_info = client.metadata.list_schemas("GLBX.MDP3")
print(f"\nAvailable schemas for GLBX.MDP3:")
for schema in dataset_info:
print(f" - {schema}")
except Exception as e:
print(f"Error getting dataset info: {e}")
if __name__ == "__main__":
main()