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

88 lines
2.5 KiB
Python

#!/usr/bin/env python3
"""
Search for Euro FX futures symbols using Databento symbology API.
"""
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("Searching for Euro FX symbols in GLBX.MDP3")
print("=" * 70)
dataset = "GLBX.MDP3"
start_date = "2024-01-02"
end_date = "2024-01-31"
# Try different symbol patterns for Euro FX
# Based on Databento documentation, CME symbols may need parent symbol format
test_patterns = [
# Standard CME format
"6E",
"6E.FUT",
"E7", # E-mini EUR/USD
# Try with exchange prefix
"CME:6E",
"CME:6EH24",
# Try continuous contract notation
"6E.n.0", # Continuous front month
# Try Databento instrument ID format
"EUR",
"EURUSD",
]
print("\nTesting symbol patterns:\n")
for symbol in test_patterns:
print(f"Testing: {symbol:20s} ... ", end="", flush=True)
try:
# Use symbology.resolve to check if symbol exists
result = client.symbology.resolve(
dataset=dataset,
symbols=[symbol],
stype_in="native",
stype_out="instrument_id",
start_date=start_date,
end_date=end_date
)
if result:
print(f"✅ FOUND!")
print(f" Resolved to: {result}")
else:
print("❌ Not found")
except Exception as e:
error_msg = str(e)[:80]
print(f"❌ Error: {error_msg}")
print()
print("=" * 70)
print("Additional Information")
print("=" * 70)
print("CME Euro FX Futures (6E) symbology:")
print(" - Root symbol: 6E")
print(" - Contract months: H(Mar), M(Jun), U(Sep), Z(Dec)")
print(" - Full format: 6EH24 (March 2024)")
print()
print("If none of the above work, the data may require:")
print(" 1. Different dataset (not GLBX.MDP3)")
print(" 2. Subscription upgrade for CME data")
print(" 3. Different time period when data is available")
print()
print("Recommendation: Check Databento's symbology documentation")
print(" https://databento.com/docs/symbology")
if __name__ == "__main__":
main()