bourse.core.OrderBook.place_order(bid: bool, vol: int, trader_id: int, price: int = None) int

Place a new order on the market

Create and place a new order, will immediately place the order on the market, matching if possible.

Parameters:
bid: bool

If True order will be placed on bid-side otherwise on the ask-side

vol: int

Order volume

trader_id: int

Id of the agent/trader placing the order

price: int = None

Order price, if omitted then order will be placed as a market order

Returns:

int – Id of the new order which can then be used to modify and query the state of the order.