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 | |
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 | |
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.
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.
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.
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.
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.
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.
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.
def addOrder.OrderEntryGUI.reset | ( | self | ) |
Resets all input fields to their default state, clearing previous entries.
def addOrder.OrderEntryGUI.reset | ( | self | ) |
Resets all input fields to their default state, clearing previous entries.
addOrder.OrderEntryGUI.master |
addOrder.OrderEntryGUI.order_id_counter |
addOrder.OrderEntryGUI.order_type_mapping |
addOrder.OrderEntryGUI.orderbook |
addOrder.OrderEntryGUI.price_entry |
addOrder.OrderEntryGUI.qty_entry |
addOrder.OrderEntryGUI.side_var |
addOrder.OrderEntryGUI.type_var |