Always cast `Order.symbol: str` for now
To make nested `msgspec.Struct`s work we need to tell the codec that the `.symbol` is some struct def, since we don't really need to enforce that (yet) we're just going to enc/dec as `str` until we further formalize and/or need something more complex.pre_overruns_ctxcancelled
parent
ef2d0c46d4
commit
0e0338e217
|
@ -29,7 +29,6 @@ from typing import (
|
|||
|
||||
from msgspec import field
|
||||
|
||||
from ..accounting._mktinfo import Symbol
|
||||
from ..data.types import Struct
|
||||
|
||||
|
||||
|
@ -94,7 +93,8 @@ class Order(Struct):
|
|||
|
||||
# internal ``emdsd`` unique "order id"
|
||||
oid: str # uuid4
|
||||
symbol: str | Symbol
|
||||
# TODO: figure out how to optionally typecast this to `MktPair`?
|
||||
symbol: str # | MktPair
|
||||
account: str # should we set a default as '' ?
|
||||
|
||||
price: float
|
||||
|
|
Loading…
Reference in New Issue