diff --git a/piker/clearing/_allocate.py b/piker/clearing/_allocate.py index f14728a1..7ee2b0be 100644 --- a/piker/clearing/_allocate.py +++ b/piker/clearing/_allocate.py @@ -23,10 +23,9 @@ from typing import Optional from bidict import bidict from pydantic import BaseModel, validator -from msgspec import Struct +# from msgspec import Struct from ..data._source import Symbol -from ._messages import BrokerdPosition, Status from ..pp import Position @@ -202,7 +201,12 @@ class Allocator(BaseModel): if order_size < slot_size: # compute a fractional slots size to display slots_used = self.slots_used( - Position(symbol=sym, size=order_size, avg_price=price) + Position( + symbol=sym, + size=order_size, + avg_price=price, + bsuid=sym, + ) ) return { diff --git a/piker/clearing/_paper_engine.py b/piker/clearing/_paper_engine.py index a11e9ea2..9e70dce2 100644 --- a/piker/clearing/_paper_engine.py +++ b/piker/clearing/_paper_engine.py @@ -264,6 +264,7 @@ class PaperBoi: Symbol(key=symbol), size=pp_msg.size, avg_price=pp_msg.avg_price, + uid=symbol.front_fqsn(), ) pp_msg.size, pp_msg.avg_price = pp.lifo_update(size, price) diff --git a/piker/ui/order_mode.py b/piker/ui/order_mode.py index 5ee53bd4..03132b8e 100644 --- a/piker/ui/order_mode.py +++ b/piker/ui/order_mode.py @@ -33,10 +33,10 @@ import trio from PyQt5.QtCore import Qt from .. import config +from ..pp import Position from ..clearing._client import open_ems, OrderBook from ..clearing._allocate import ( mk_allocator, - Position, ) from ._style import _font from ..data._source import Symbol @@ -607,6 +607,9 @@ async def open_order_mode( symbol=symbol, size=0, avg_price=0, + + # XXX: BLEH, do we care about this on the client side? + bsuid=symbol, ) msg = pps_by_account.get(account_name) if msg: