From ed47023b5e6a93a4fd34cc669bdab84a308bf864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20L=C3=B6ffler?= Date: Mon, 6 May 2024 10:48:06 +0300 Subject: [PATCH] Make streaming.Order more interchangeable with betting.Order --- betfair_parser/spec/streaming/type_definitions.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/betfair_parser/spec/streaming/type_definitions.py b/betfair_parser/spec/streaming/type_definitions.py index 7710868..13a78e4 100644 --- a/betfair_parser/spec/streaming/type_definitions.py +++ b/betfair_parser/spec/streaming/type_definitions.py @@ -353,12 +353,12 @@ def bsp_liability(self): return self.bsp @property - def order_reference(self): + def customer_order_ref(self): """The customer's order reference for this order (None if one was not set)""" return self.rfo @property - def strategy_reference(self): + def customer_strategy_ref(self): """The customer's strategy reference for this order (empty string if one was not set)""" return self.rfs @@ -426,6 +426,13 @@ def lapse_status_reason_code(self): """The reason that some or all of this order has been lapsed (None if no portion of the order is lapsed""" return self.lsrc + @property + def bet_id(self): + # interchangeability with betting.Order + return self.id + + avg_price_matched = average_price_matched # interchangeability with betting.Order + class MatchedOrder(BaseMessage, array_like=True, frozen=True): price: Price