bourse.core.OrderBook.modify_order(order_id: int, new_price: int = None, new_vol: int = None)

Modify an order

Modify the price and/or volume of an order. Only decreasing the volume of an order will maintain the priority of the order, otherwise the order will be replaced. Increasing/decreasing the price can result in the order being executed.

Notes

The order will keep its existing order-id

Parameters:
order_id: int

Id of the order to modify

new_price: int = None

New price of the order. If omitted the price of the order remains unchanged.

new_vol: int = None

New volume of the order. The order will be increased/decreased relative to the current available order of the volume.