Files
foxhunt/list_glbx_instruments.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

99 lines
3.0 KiB
Python

#!/usr/bin/env python3
"""
Try to list available instruments in GLBX.MDP3 dataset.
"""
import os
import databento as db
import sys
def main():
api_key = os.environ.get("DATABENTO_API_KEY")
if not api_key:
print("ERROR: DATABENTO_API_KEY environment variable not set")
sys.exit(1)
client = db.Historical(api_key)
print("=" * 70)
print("Attempting to Query GLBX.MDP3 Dataset")
print("=" * 70)
dataset = "GLBX.MDP3"
# Try to get a small amount of data without specifying symbols
# This might give us clues about what's available
print("\nAttempting to query for ANY data in GLBX.MDP3...")
print("(This may fail if no subscription, but worth trying)\n")
# Try with wildcard or ALL symbol
test_symbols = [
"*", # Wildcard
"ALL", # All instruments
"ES", # S&P 500 E-mini
"NQ", # Nasdaq E-mini
"CL", # Crude Oil
"GC", # Gold
]
for symbol in test_symbols:
print(f"Trying: {symbol:10s} ... ", end="", flush=True)
try:
# Try to get definition schema (lightweight)
cost = client.metadata.get_cost(
dataset=dataset,
symbols=[symbol],
schema="definition",
start="2024-01-02",
end="2024-01-02"
)
print(f"✅ Cost: ${cost:.6f}")
except Exception as e:
error_msg = str(e)
if "symbology" in error_msg.lower():
print("❌ Symbol not found")
elif "401" in error_msg or "403" in error_msg:
print("❌ Not authorized")
elif "400" in error_msg:
print(f"❌ Bad request")
else:
print(f"{error_msg[:60]}")
print()
print("=" * 70)
print("CONCLUSION")
print("=" * 70)
print("""
Based on testing:
1. ✅ Your Databento account IS ACTIVE (AAPL/XNAS.ITCH works)
2. ❌ CME futures data (GLBX.MDP3) is NOT ACCESSIBLE with your current subscription
- All common CME symbols (ES, NQ, 6E, CL, GC) fail with symbology errors
- This indicates the subscription tier doesn't include CME/Globex data
3. 💡 RECOMMENDATION:
For this Foxhunt project, you have a few options:
Option A: Use Alternative Data Sources
- Use Alpaca, Polygon.io, or Interactive Brokers for futures data
- These may be more accessible with existing subscriptions
Option B: Upgrade Databento Subscription
- Contact Databento to add GLBX.MDP3 (CME futures) access
- This will cost additional monthly fees
Option C: Use Available Data
- Stick with equity data (XNAS.ITCH, XNYS.PILLAR, etc.)
- Test the trading system with stocks instead of futures
Option D: Use Synthetic/Mock Data
- Generate realistic Euro FX futures data locally
- Faster for development, no API costs
For immediate progress, I recommend Option D (synthetic data) or Option A
(alternative data source like Alpaca).
""")
if __name__ == "__main__":
main()