From 34e6db6d983ef622b80d630132af2f187468f529 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 9 May 2022 10:56:47 -0400 Subject: [PATCH] Allow `None` for `BrokerdError.reqid` Found this caused breakage on `kraken` orders which triggered the "insufficient funds" error response. Makes sense since they won't generate an order id if the order can't ever be submitted. --- piker/clearing/_messages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piker/clearing/_messages.py b/piker/clearing/_messages.py index 7a48768c..1f07f0b0 100644 --- a/piker/clearing/_messages.py +++ b/piker/clearing/_messages.py @@ -242,7 +242,7 @@ class BrokerdError(BaseModel): # if no brokerd order request was actually submitted (eg. we errored # at the ``pikerd`` layer) then there will be ``reqid`` allocated. - reqid: Union[int, str] = '' + reqid: Optional[Union[int, str]] = None symbol: str reason: str