commit
67eab85f06
|
@ -640,6 +640,7 @@ class Client:
|
||||||
ready = ticker.updateEvent
|
ready = ticker.updateEvent
|
||||||
|
|
||||||
# ensure a last price gets filled in before we deliver quote
|
# ensure a last price gets filled in before we deliver quote
|
||||||
|
warnset: bool = False
|
||||||
for _ in range(100):
|
for _ in range(100):
|
||||||
if isnan(ticker.last):
|
if isnan(ticker.last):
|
||||||
|
|
||||||
|
@ -650,17 +651,21 @@ class Client:
|
||||||
if ready in done:
|
if ready in done:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
if not warnset:
|
||||||
log.warning(
|
log.warning(
|
||||||
f'Quote for {symbol} timed out: market is closed?'
|
f'Quote for {symbol} timed out: market is closed?'
|
||||||
)
|
)
|
||||||
|
warnset = True
|
||||||
|
|
||||||
else:
|
else:
|
||||||
log.info(f'Got first quote for {symbol}')
|
log.info(f'Got first quote for {symbol}')
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
if not warnset:
|
||||||
log.warning(
|
log.warning(
|
||||||
f'Symbol {symbol} is not returning a quote '
|
f'Symbol {symbol} is not returning a quote '
|
||||||
'it may be outside trading hours?')
|
'it may be outside trading hours?')
|
||||||
|
warnset = True
|
||||||
|
|
||||||
return contract, ticker, details
|
return contract, ticker, details
|
||||||
|
|
||||||
|
|
|
@ -753,7 +753,9 @@ class Flow(msgspec.Struct): # , frozen=True):
|
||||||
try:
|
try:
|
||||||
iuppx = x[-uppx]
|
iuppx = x[-uppx]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
iuppx = x
|
# we're less then an x-px wide so just grab the start
|
||||||
|
# datum index.
|
||||||
|
iuppx = x[0]
|
||||||
|
|
||||||
dsg._last_line = QLineF(
|
dsg._last_line = QLineF(
|
||||||
iuppx, ymn,
|
iuppx, ymn,
|
||||||
|
|
Loading…
Reference in New Issue