ib.api: return None on manual quote timeout
parent
e54c3dc523
commit
778d26067d
|
@ -786,7 +786,7 @@ class Client:
|
||||||
timeout: float = 1,
|
timeout: float = 1,
|
||||||
raise_on_timeout: bool = False,
|
raise_on_timeout: bool = False,
|
||||||
|
|
||||||
) -> Ticker:
|
) -> Ticker | None:
|
||||||
'''
|
'''
|
||||||
Return a single (snap) quote for symbol.
|
Return a single (snap) quote for symbol.
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@ class Client:
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
if raise_on_timeout:
|
if raise_on_timeout:
|
||||||
raise
|
raise
|
||||||
return tkr
|
return None
|
||||||
|
|
||||||
if tkr:
|
if tkr:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue