def update_order(bet_id): # updating an order instruction = filters.update_instruction(bet_id=bet_id, new_persistence_type="PERSIST") update_order = trading.betting.update_orders(market_id=market_id, instructions=[instruction]) print(update_order.status) for order in update_order.update_instruction_reports: print("Status: %s" % order.status)
def test_update_instruction(self): response = update_instruction("1.123", "LAPSE") assert response == {"betId": "1.123", "newPersistenceType": "LAPSE"}
def create_update_instruction(self) -> dict: return filters.update_instruction( bet_id=self.bet_id, new_persistence_type=self.order_type.persistence_type)
def test_update_instruction(self): response = update_instruction('1.123', 'LAPSE') assert response == {'betId': '1.123', 'newPersistenceType': 'LAPSE'}