Update api.py
Now intrinsic values list is initialize in the aio_open_interest_feed_relay instead in the scope above.max_pain_deribit
parent
cbc5168b8d
commit
ec1da6134b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue