max_pain_daemon

Nelson Torres 2025-01-30 01:40:56 +00:00
parent 78fe0986fc
commit 1e6b1867b4
1 changed files with 29 additions and 0 deletions

29
max_pain.py 100644
View File

@ -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)