Пример #1
0
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)
Пример #2
0
 def test_update_instruction(self):
     response = update_instruction("1.123", "LAPSE")
     assert response == {"betId": "1.123", "newPersistenceType": "LAPSE"}
Пример #3
0
 def create_update_instruction(self) -> dict:
     return filters.update_instruction(
         bet_id=self.bet_id,
         new_persistence_type=self.order_type.persistence_type)
Пример #4
0
 def test_update_instruction(self):
     response = update_instruction('1.123', 'LAPSE')
     assert response == {'betId': '1.123', 'newPersistenceType': 'LAPSE'}