Add an option `BrokerdPosition.bs_mktid` field
Such that backends can deliver their own internal unique `MktPair.bs_mktid` when they can't seem to get it right via the `.fqme: str` export.. (COUGH ib, you piece of sh#$). Also add todo for possibly replacing the msg with a `Position.summary()` "snapshot" as a better and more rigorously generated wire-ready msg.qt_w_graceful_SIGINT
parent
b0f273f091
commit
9ea857298c
|
@ -301,6 +301,9 @@ class BrokerdError(Struct):
|
||||||
|
|
||||||
# TODO: yeah, so we REALLY need to completely deprecate
|
# TODO: yeah, so we REALLY need to completely deprecate
|
||||||
# this and use the `.accounting.Position` msg-type instead..
|
# this and use the `.accounting.Position` msg-type instead..
|
||||||
|
# -[ ] an alternative might be to add a `Position.summary() ->
|
||||||
|
# `PositionSummary`-msg that we generate since `Position` has a lot
|
||||||
|
# of fields by default we likely don't want to send over the wire?
|
||||||
class BrokerdPosition(Struct):
|
class BrokerdPosition(Struct):
|
||||||
'''
|
'''
|
||||||
Position update event from brokerd.
|
Position update event from brokerd.
|
||||||
|
@ -313,3 +316,4 @@ class BrokerdPosition(Struct):
|
||||||
avg_price: float
|
avg_price: float
|
||||||
currency: str = ''
|
currency: str = ''
|
||||||
name: str = 'position'
|
name: str = 'position'
|
||||||
|
bs_mktid: str|int|None = None
|
||||||
|
|
Loading…
Reference in New Issue