From ebe351e2eec9abcf5a682089036e493b7651e01d Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 14 May 2023 15:13:14 -0400 Subject: [PATCH] kucoin: raise `DataUnavailable` if we get empty time array at some point? --- piker/brokers/kucoin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/piker/brokers/kucoin.py b/piker/brokers/kucoin.py index 9cbb5a97..2f66d4eb 100755 --- a/piker/brokers/kucoin.py +++ b/piker/brokers/kucoin.py @@ -884,6 +884,11 @@ async def open_history_client( times = array['time'] + if not len(times): + raise DataUnavailable( + f'No more history before {start_dt}?' + ) + if end_dt is None: inow = round(time.time())