diff --git a/api/blueprints/finstitutions/trading/symbols/list.py b/api/blueprints/finstitutions/trading/symbols/list.py index b3315cc..3b52a30 100644 --- a/api/blueprints/finstitutions/trading/symbols/list.py +++ b/api/blueprints/finstitutions/trading/symbols/list.py @@ -25,8 +25,7 @@ N/A """ - - +import datetime # ***************************************************************************************************************** # ***** **** # *** IMPORT *** @@ -195,7 +194,10 @@ async def request_oauth_authorization_url( # Handle time data: data = [s.model_dump() for s in symbol_list.data] if symbol_list.data is not None else symbol_list.data - for d in data: d["expiryTs"] = d["expiryTs"].timestamp() + for d in data: + expiry_ts = d["expiryTs"] + if isinstance(expiry_ts, datetime.datetime): + d["expiryTs"] = expiry_ts.timestamp() # Done here: return ResponseModel(