feat: saxo connector
This commit is contained in:
@@ -253,7 +253,10 @@ def snapshot_options_chain(symbol: str, target_days: int = 30) -> List[Dict[str,
|
||||
space = get_option_space(root_uic)
|
||||
legs = _extract_option_legs(space)
|
||||
|
||||
snapshot = _snapshot_via_subscription(root_uic, asset_type=instrument["asset_type"] or "StockOption")
|
||||
subscription = _snapshot_via_subscription(root_uic, asset_type=instrument["asset_type"] or "StockOption")
|
||||
# The POST response is the streaming-subscription envelope (ContextId/ReferenceId/Format/
|
||||
# RefreshRate/InactivityTimeout/State) — the actual chain payload is nested under "Snapshot".
|
||||
snapshot = subscription.get("Snapshot") or subscription
|
||||
spot = _first(snapshot, "UnderlyingSpotPrice", "Spot", "UnderlyingPrice")
|
||||
snapshot_date = date.today().isoformat()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user