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(
|
async def aio_open_interest_feed_relay(
|
||||||
fh: FeedHandler,
|
fh: FeedHandler,
|
||||||
instruments: list,
|
instruments: list,
|
||||||
intrinsic_values: dict[str, Decimal],
|
|
||||||
oi_by_strikes: dict[str, dict[str, Decimal]],
|
oi_by_strikes: dict[str, dict[str, Decimal]],
|
||||||
from_trio: asyncio.Queue,
|
from_trio: asyncio.Queue,
|
||||||
to_trio: trio.abc.SendChannel,
|
to_trio: trio.abc.SendChannel,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
|
intrinsic_values: dict[str, dict[str, Decimal]] = {}
|
||||||
total_intrinsic_value: Decimal = Decimal('Infinity')
|
total_intrinsic_value: Decimal = Decimal('Infinity')
|
||||||
max_pain: Decimal = Decimal(0)
|
max_pain: Decimal = Decimal(0)
|
||||||
|
|
||||||
|
@ -933,7 +933,6 @@ async def open_oi_feed(
|
||||||
) -> to_asyncio.LinkedTaskChannel:
|
) -> to_asyncio.LinkedTaskChannel:
|
||||||
expiry_date: str = '6DEC24'
|
expiry_date: str = '6DEC24'
|
||||||
instruments: list[Symbol] = []
|
instruments: list[Symbol] = []
|
||||||
intrinsic_values: dict[str, dict[str, Decimal]] = {}
|
|
||||||
oi_by_strikes: dict[str, dict[str, Decimal]]
|
oi_by_strikes: dict[str, dict[str, Decimal]]
|
||||||
|
|
||||||
async with get_client(
|
async with get_client(
|
||||||
|
@ -953,7 +952,6 @@ async def open_oi_feed(
|
||||||
aio_open_interest_feed_relay,
|
aio_open_interest_feed_relay,
|
||||||
fh,
|
fh,
|
||||||
instruments,
|
instruments,
|
||||||
intrinsic_values,
|
|
||||||
oi_by_strikes,
|
oi_by_strikes,
|
||||||
)
|
)
|
||||||
) as (first, chan)
|
) as (first, chan)
|
||||||
|
|
Loading…
Reference in New Issue