Expect fqsn input to paper clearing engine
parent
e9e76e0626
commit
e8c261279d
|
@ -417,8 +417,7 @@ async def open_brokerd_trades_dialogue(
|
|||
# actor to simulate the real IPC load it'll have when also
|
||||
# pulling data from feeds
|
||||
open_trades_endpoint = paper.open_paperboi(
|
||||
broker=broker,
|
||||
symbol=symbol,
|
||||
fqsn='.'.join([symbol, broker]),
|
||||
loglevel=loglevel,
|
||||
)
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ from dataclasses import dataclass
|
|||
|
||||
from .. import data
|
||||
from ..data._normalize import iterticks
|
||||
from ..data._source import uncons_fqsn
|
||||
from ..log import get_logger
|
||||
from ._messages import (
|
||||
BrokerdCancel, BrokerdOrder, BrokerdOrderAck, BrokerdStatus,
|
||||
|
@ -446,7 +447,7 @@ async def trades_dialogue(
|
|||
|
||||
ctx: tractor.Context,
|
||||
broker: str,
|
||||
symbol: str,
|
||||
fqsn: str,
|
||||
loglevel: str = None,
|
||||
|
||||
) -> None:
|
||||
|
@ -455,8 +456,7 @@ async def trades_dialogue(
|
|||
async with (
|
||||
|
||||
data.open_feed(
|
||||
broker,
|
||||
[symbol],
|
||||
[fqsn],
|
||||
loglevel=loglevel,
|
||||
) as feed,
|
||||
|
||||
|
@ -490,15 +490,16 @@ async def trades_dialogue(
|
|||
|
||||
@asynccontextmanager
|
||||
async def open_paperboi(
|
||||
broker: str,
|
||||
symbol: str,
|
||||
fqsn: str,
|
||||
loglevel: str,
|
||||
|
||||
) -> Callable:
|
||||
'''Spawn a paper engine actor and yield through access to
|
||||
'''
|
||||
Spawn a paper engine actor and yield through access to
|
||||
its context.
|
||||
|
||||
'''
|
||||
broker, symbol, expiry = uncons_fqsn(fqsn)
|
||||
service_name = f'paperboi.{broker}'
|
||||
|
||||
async with (
|
||||
|
@ -517,7 +518,7 @@ async def open_paperboi(
|
|||
async with portal.open_context(
|
||||
trades_dialogue,
|
||||
broker=broker,
|
||||
symbol=symbol,
|
||||
fqsn=fqsn,
|
||||
loglevel=loglevel,
|
||||
|
||||
) as (ctx, first):
|
||||
|
|
Loading…
Reference in New Issue