Skip to content

Commit

Permalink
Make streaming.Order more interchangeable with betting.Order
Browse files Browse the repository at this point in the history
  • Loading branch information
ml31415 committed May 6, 2024
1 parent 6ef0926 commit ed47023
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions betfair_parser/spec/streaming/type_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ed47023

Please sign in to comment.