From ec1da6134bb00176bdd1c86fd00139e0f9461112 Mon Sep 17 00:00:00 2001 From: Nelson Torres Date: Thu, 5 Dec 2024 23:49:02 -0300 Subject: [PATCH] Update api.py Now intrinsic values list is initialize in the aio_open_interest_feed_relay instead in the scope above. --- piker/brokers/deribit/api.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/piker/brokers/deribit/api.py b/piker/brokers/deribit/api.py index 83e8b2a7..f01f6112 100644 --- a/piker/brokers/deribit/api.py +++ b/piker/brokers/deribit/api.py @@ -827,12 +827,12 @@ async def maybe_open_price_feed( async def aio_open_interest_feed_relay( fh: FeedHandler, instruments: list, - intrinsic_values: dict[str, Decimal], oi_by_strikes: dict[str, dict[str, Decimal]], from_trio: asyncio.Queue, to_trio: trio.abc.SendChannel, ) -> None: + intrinsic_values: dict[str, dict[str, Decimal]] = {} total_intrinsic_value: Decimal = Decimal('Infinity') max_pain: Decimal = Decimal(0) @@ -933,7 +933,6 @@ async def open_oi_feed( ) -> to_asyncio.LinkedTaskChannel: expiry_date: str = '6DEC24' instruments: list[Symbol] = [] - intrinsic_values: dict[str, dict[str, Decimal]] = {} oi_by_strikes: dict[str, dict[str, Decimal]] async with get_client( @@ -953,7 +952,6 @@ async def open_oi_feed( aio_open_interest_feed_relay, fh, instruments, - intrinsic_values, oi_by_strikes, ) ) as (first, chan)