Placing Bracket and Cover Orders on the Exchange

This chapter introduces various types of bracket and cover orders that can be placed on exchanges via the broker APIs. The recipes include code for placing 12 types of orders and querying their statuses, canceling open orders, and exiting completed orders. These recipes will be a fundamental part of your algorithmic trading strategies. Understanding all of the types of orders and knowing which one to place for the given requirement is crucial for building a successful trading strategy.

Each order has four attributes that together define the order completely:

  • Order transaction type
  • Order type
  • Order code
  • Order variety

For placing an order, all four attributes should be known precisely. To know ...

Get Python Algorithmic Trading Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.