feat: sexo history
This commit is contained in:
@@ -37,10 +37,14 @@ def update_watchlist(req: WatchlistRequest):
|
||||
|
||||
|
||||
def _validate_symbol(symbol: str) -> dict:
|
||||
from services.saxo_client import resolve_option_root_uic, SaxoNotConnected
|
||||
from services.saxo_client import resolve_instrument, SaxoNotConnected
|
||||
try:
|
||||
uic = resolve_option_root_uic(symbol)
|
||||
return {"symbol": symbol.upper(), "valid": True, "uic": uic, "error": None}
|
||||
info = resolve_instrument(symbol)
|
||||
return {
|
||||
"symbol": symbol.upper(), "valid": True, "error": None,
|
||||
"uic": info["uic"], "matched_symbol": info["symbol"],
|
||||
"description": info["description"], "asset_type": info["asset_type"],
|
||||
}
|
||||
except SaxoNotConnected as e:
|
||||
return {"symbol": symbol.upper(), "valid": False, "uic": None, "error": str(e)}
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user