Modules implementing the Book service are broker-specific, and provide execution services for backtesting, paper and live execution of trades.

A typical environment should run one Book service for each broker traded with, and configure each available trading account (paper and live) into the Book service.

Note that modules implementing the Book service typically require the corresponding broker's Data module to also be running; this is primarily to facilitate simulating fills in backtests.

Your scripts and strategies then open a Book against a configured Account, in order to execute trades against it.

Each Book opened can be for either Backtesting, Paper trading or Live trading.

Each Book is also either Simple, Complex or Continuous, each with different functionality available and serviced by a separate and different API. A strategy's type & behaviour should generally fall into a single book type. E.g. simple single-position strategies are Simple and use Simple books. Execution algos to automate the building/disposing of a position are Execution strategies and use Execution books.

Precise behaviour and features are broker-dependent to some degree (e.g. in whether long and short positions can be held simultaneously on the same instrument) - and any such differences or special features are noted in the documentation for each broker's module. However the APIs are standardised across all, and the differences are queryable for programmatically.

Book types