Make default order size to decimal
parent
adb11fb778
commit
ffea96f1b5
|
@ -91,12 +91,11 @@ async def submit_order(
|
||||||
# TODO: i guess we should still test the old sync-API?
|
# TODO: i guess we should still test the old sync-API?
|
||||||
# client.send_nowait(order)
|
# client.send_nowait(order)
|
||||||
|
|
||||||
|
# Wait for position message before moving on to verify flow(s)
|
||||||
|
# for the multi-order position entry/exit.
|
||||||
msgs: list[Status | BrokerdPosition] = []
|
msgs: list[Status | BrokerdPosition] = []
|
||||||
async for msg in trades_stream:
|
async for msg in trades_stream:
|
||||||
print(f'Rx Order resp: {msg}')
|
|
||||||
match msg:
|
match msg:
|
||||||
|
|
||||||
# Wait for position message before moving on
|
|
||||||
case {'name': 'position'}:
|
case {'name': 'position'}:
|
||||||
ppmsg = BrokerdPosition(**msg)
|
ppmsg = BrokerdPosition(**msg)
|
||||||
msgs.append(ppmsg)
|
msgs.append(ppmsg)
|
||||||
|
@ -187,8 +186,6 @@ async def atest_buy(
|
||||||
tuple[str, str], # brokername, acctid
|
tuple[str, str], # brokername, acctid
|
||||||
list[BrokerdPosition],
|
list[BrokerdPosition],
|
||||||
]
|
]
|
||||||
|
|
||||||
assert loglevel == 'info'
|
|
||||||
async with (
|
async with (
|
||||||
open_ems(
|
open_ems(
|
||||||
fqme,
|
fqme,
|
||||||
|
@ -196,7 +193,7 @@ async def atest_buy(
|
||||||
loglevel=loglevel,
|
loglevel=loglevel,
|
||||||
) as (
|
) as (
|
||||||
client, # OrderClient
|
client, # OrderClient
|
||||||
trades_stream,
|
trades_stream, # tractor.MsgStream
|
||||||
startup_pps,
|
startup_pps,
|
||||||
accounts,
|
accounts,
|
||||||
dialogs,
|
dialogs,
|
||||||
|
@ -211,7 +208,7 @@ async def atest_buy(
|
||||||
trades_stream,
|
trades_stream,
|
||||||
fqme,
|
fqme,
|
||||||
action='buy',
|
action='buy',
|
||||||
size=1,
|
size=0.01,
|
||||||
)
|
)
|
||||||
|
|
||||||
last_order = sent[-1]
|
last_order = sent[-1]
|
||||||
|
|
Loading…
Reference in New Issue