diff --git a/max_pain.py b/max_pain.py index b5d4d815..9e10289d 100644 --- a/max_pain.py +++ b/max_pain.py @@ -10,6 +10,20 @@ async def max_pain_daemon( ) -> None: async with maybe_open_oi_feed() as oi_feed: print('Im in...') + def check_if_complete( + oi: dict[str, dict[str, Decimal | None]], + + ) -> bool: + for strike in oi: + if ( + oi[strike]['C'] == None + or + oi[strike]['P'] == None + ): + return False + + return True + async def main(): diff --git a/piker/brokers/deribit/api.py b/piker/brokers/deribit/api.py index b0bedaa2..19a3297a 100644 --- a/piker/brokers/deribit/api.py +++ b/piker/brokers/deribit/api.py @@ -246,20 +246,6 @@ def get_config() -> dict[str, Any]: return section -def check_if_complete( - oi: dict[str, dict[str, Decimal | None]], - - ) -> bool: - for strike in oi: - if ( - oi[strike]['C'] == None - or - oi[strike]['P'] == None - ): - return False - - return True - class Client: '''