From f2f7855e5444be6b87e7c1fe8f7fec4e15466e67 Mon Sep 17 00:00:00 2001 From: Nelson Torres Date: Tue, 26 Nov 2024 15:16:21 -0300 Subject: [PATCH] max_pain_daemon --- max_pain.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 max_pain.py diff --git a/max_pain.py b/max_pain.py new file mode 100644 index 00000000..22e30a6d --- /dev/null +++ b/max_pain.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +import trio +import tractor +from piker.brokers.deribit.api import ( + Client, + get_client, + maybe_open_oi_feed, +) + + +async def max_pain_daemon( +) -> None: + async with maybe_open_oi_feed() as oi_feed: + print('Im in...') + + +async def main(): + + async with tractor.open_nursery() as n: + + p: tractor.Portal = await n.start_actor( + 'max_pain_daemon', + enable_modules=[__name__], + infect_asyncio=True, + ) + await p.run(max_pain_daemon) + +if __name__ == '__main__': + trio.run(main)