OrderBook

Order books of various kinds may be created to facilitate the trade of a single asset between player/agents.

Specification for the OrderBook interface which each order book must implement:

The interface includes functions to create and cancel LimitOrder and execute market orders, as well as do initialization and bookkeeping

It also includes functions to get 'snapshot' meta-data about the OrderBook

Remarks:

See definitions of LimitOrder and GenericPlayer.

The players are responsible for doing accounting about the proceeds and costs of buying and selling the assets. Order books have no knowledge of the actual quantity of asset that are outstanding, or whether the Players actually have enough money or assets on hand to realistically complete the transaction. To that extent, the order books act on faith.

At present several order books have been implemented: