Files
foxhunt/scripts/python/data/search_euro_symbols.py
jgrusewski 433af5c25d chore: Major codebase cleanup - remove deprecated files and organize structure
- Docker: Delete 23 deprecated Dockerfiles, fix CI/CD to use Dockerfile.foxhunt-build
- Config: Remove 36 .env files, keep 4 essential, delete config/environments/
- Docs: Archive 614 Wave D files to docs/archive/wave_d/, 95% reduction in root
- Scripts: Delete 56 deprecated scripts, keep 58 production-critical (49% reduction)
- Python: Organize 37 scripts into scripts/python/ subdirectories, delete ml/python/
- Build: Remove 1GB artifacts, delete old venvs, clean Python cache from git
- Migrations: Delete deprecated directory (4,432 lines), remove duplicate database/migrations/
- Infrastructure: Delete deployment/ (61 files), docs/scripts/ (8 files)

Total impact: ~2,500 files cleaned, 750MB+ space freed, zero production impact
All deleted scripts backed up to archives. runpod/ and tests/runpod/ preserved.
data_acquisition_service retained per user request.
2025-10-30 01:02:34 +01: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()