Woops, drop paper mode detection on client side..
parent
e7437cb722
commit
a4b8fb2d6b
|
@ -37,7 +37,6 @@ from ._messages import (
|
|||
Cancel,
|
||||
BrokerdPosition,
|
||||
)
|
||||
from ..brokers import get_brokermod
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._messages import (
|
||||
|
@ -246,13 +245,6 @@ async def open_ems(
|
|||
loglevel=loglevel,
|
||||
) as portal:
|
||||
|
||||
mod = get_brokermod(broker)
|
||||
if (
|
||||
not getattr(mod, 'trades_dialogue', None)
|
||||
or mode == 'paper'
|
||||
):
|
||||
mode = 'paper'
|
||||
|
||||
from ._ems import _emsd_main
|
||||
async with (
|
||||
# connect to emsd
|
||||
|
|
|
@ -353,7 +353,6 @@ async def open_brokerd_dialog(
|
|||
# a paper-simulator clearing engine.
|
||||
|
||||
# load the paper trading engine
|
||||
exec_mode = 'paper'
|
||||
log.info(f'{broker}: Entering `paper` trading mode')
|
||||
|
||||
# load the paper trading engine as a subactor of this emsd
|
||||
|
@ -370,11 +369,12 @@ async def open_brokerd_dialog(
|
|||
loglevel=loglevel,
|
||||
)
|
||||
|
||||
# TODO: ideally choose only one of these ep names..
|
||||
# take the first supported ep we detect
|
||||
# on the backend mod.
|
||||
trades_endpoint: Callable
|
||||
for ep_name in [
|
||||
'trades_dialogue', # legacy
|
||||
'open_trade_dialog', # probably final name?
|
||||
'trades_dialogue', # legacy
|
||||
]:
|
||||
trades_endpoint = getattr(
|
||||
brokermod,
|
||||
|
|
Loading…
Reference in New Issue