Orderbook Simulation
OrderbookSim is a C++ application simulating a financial market order book. It efficiently manages and matches buy and sell orders while calculating the Volume-Weighted Average Price (VWAP).
Public Member Functions | Public Attributes | List of all members
addOrder.OrderEntryGUI Class Reference

Public Member Functions

def __init__ (self, master)
 
def create_widgets (self)
 
def add_order (self)
 
def reset (self)
 
def __init__ (self, master)
 
def create_widgets (self)
 
def add_order (self)
 
def reset (self)
 

Public Attributes

 master
 
 orderbook
 
 order_id_counter
 
 order_type_mapping
 
 type_var
 
 side_var
 
 price_entry
 
 qty_entry
 

Detailed Description

GUI application for adding orders to an order book.
This class uses Tkinter to provide a graphical interface where users can specify
order details and submit them to the order book.

Attributes:
    master (tk.Tk): The root window for the GUI application.
    orderbook (orderbook.Orderbook): The order book instance created through Pybind11.
    order_id_counter (int): Counter for generating unique order IDs.
    order_type_mapping (dict): Mapping of order type names to integer values used in the order book.
    type_var (tk.StringVar): Variable for holding the order type selected by the user.
    side_var (tk.StringVar): Variable for holding the order side (buy/sell) selected by the user.
    price_entry (tk.Entry): Entry field for inputting the order price.
    qty_entry (tk.Entry): Entry field for inputting the order quantity.

Constructor & Destructor Documentation

◆ __init__() [1/2]

def addOrder.OrderEntryGUI.__init__ (   self,
  master 
)
Initializes the OrderEntryGUI with necessary Tkinter widgets and sets up the order book instance.

Args:
    master (tk.Tk): The main window in which the GUI is displayed.

◆ __init__() [2/2]

def addOrder.OrderEntryGUI.__init__ (   self,
  master 
)
Initializes the OrderEntryGUI with necessary Tkinter widgets and sets up the order book instance.

Args:
    master (tk.Tk): The main window in which the GUI is displayed.

Member Function Documentation

◆ add_order() [1/2]

def addOrder.OrderEntryGUI.add_order (   self)
Adds an order to the order book with the details provided by the user.
Validates the input fields, generates a new order ID, and displays a confirmation message.
If any input is invalid, an error message is shown.

◆ add_order() [2/2]

def addOrder.OrderEntryGUI.add_order (   self)
Adds an order to the order book with the details provided by the user.
Validates the input fields, generates a new order ID, and displays a confirmation message.
If any input is invalid, an error message is shown.

◆ create_widgets() [1/2]

def addOrder.OrderEntryGUI.create_widgets (   self)
Creates and arranges the Tkinter widgets in the main window.
Adds labels, input fields, option menus, and buttons for user interaction.

◆ create_widgets() [2/2]

def addOrder.OrderEntryGUI.create_widgets (   self)
Creates and arranges the Tkinter widgets in the main window.
Adds labels, input fields, option menus, and buttons for user interaction.

◆ reset() [1/2]

def addOrder.OrderEntryGUI.reset (   self)
Resets all input fields to their default state, clearing previous entries.

◆ reset() [2/2]

def addOrder.OrderEntryGUI.reset (   self)
Resets all input fields to their default state, clearing previous entries.

Member Data Documentation

◆ master

addOrder.OrderEntryGUI.master

◆ order_id_counter

addOrder.OrderEntryGUI.order_id_counter

◆ order_type_mapping

addOrder.OrderEntryGUI.order_type_mapping

◆ orderbook

addOrder.OrderEntryGUI.orderbook

◆ price_entry

addOrder.OrderEntryGUI.price_entry

◆ qty_entry

addOrder.OrderEntryGUI.qty_entry

◆ side_var

addOrder.OrderEntryGUI.side_var

◆ type_var

addOrder.OrderEntryGUI.type_var

The documentation for this class was generated from the following file: