feat: saxo
This commit is contained in:
@@ -242,6 +242,15 @@ def _snapshot_via_subscription(uic: int, asset_type: str = "StockOption") -> Dic
|
||||
return snapshot
|
||||
|
||||
|
||||
def debug_chain_raw(symbol: str) -> Dict[str, Any]:
|
||||
"""Returns the raw (unparsed) options-chain subscription response for one symbol —
|
||||
diagnostic only, used to pin down exactly where Mid/Greeks/Spot live in Saxo's real
|
||||
payload instead of guessing field names blind."""
|
||||
instrument = resolve_instrument(symbol)
|
||||
subscription = _snapshot_via_subscription(instrument["uic"], asset_type=instrument["asset_type"] or "StockOption")
|
||||
return {"instrument": instrument, "raw": subscription}
|
||||
|
||||
|
||||
def snapshot_options_chain(symbol: str, target_days: int = 30) -> List[Dict[str, Any]]:
|
||||
"""
|
||||
Returns normalized rows ready for services/database.save_saxo_snapshot_rows:
|
||||
|
||||
Reference in New Issue
Block a user