critical: Fix Smart Entry Validation Queue wrong price display

- Bug: Validation queue used TradingView symbol format (SOLUSDT) to lookup market data cache
- Cache uses normalized Drift format (SOL-PERP)
- Result: Cache lookup failed, wrong/stale price shown in Telegram abandonment notifications
- Real incident: Signal at $126.00 showed $98.18 abandonment price (-22.08% impossible drop)
- Fix: Added normalizeTradingViewSymbol() call in check-risk endpoint before passing to validation queue
- Files changed: app/api/trading/check-risk/route.ts (import + symbol normalization)
- Impact: Validation queue now correctly retrieves current price from market data cache
- Deployed: Dec 1, 2025
This commit is contained in:
mindesbunister
2025-12-01 23:45:21 +01:00
parent 4fb301328d
commit 6cec2e8e71
6 changed files with 120 additions and 22 deletions

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env python3
"""Test loading chunk file"""
import json
import sys
# Test loading chunk file
with open('chunks/v9_advanced_chunk_0002.json', 'r') as f:
chunk_data = json.load(f)
print(f"✅ Chunk file loaded successfully")
print(f" Chunk ID: {chunk_data['chunk_id']}")
print(f" Configs: {len(chunk_data['configs'])}")
print(f" First config keys: {list(chunk_data['configs'][0].keys())}")
print(f" First config profile: {chunk_data['configs'][0]['profile']}")