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).
Typedefs
Usings.hpp File Reference

Defines type aliases commonly used in the trading system. More...

#include <numeric>
#include <vector>
#include <cstdint>

Go to the source code of this file.

Typedefs

using Price = std::int32_t
 Represents the price of an order or trade. More...
 
using Quantity = std::uint32_t
 Represents the quantity or volume of assets in an order or trade. More...
 
using OrderId = std::uint64_t
 Represents a unique identifier for an order. More...
 
using OrderIds = std::vector< OrderId >
 A collection of unique order identifiers. More...
 

Detailed Description

Defines type aliases commonly used in the trading system.

This file provides convenient type definitions for key data types such as Price, Quantity, and OrderId. These aliases improve code readability and maintainability throughout the codebase.

Typedef Documentation

◆ OrderId

Represents a unique identifier for an order.

Defined as a 64-bit unsigned integer, allowing for a large range of unique identifiers.

◆ OrderIds

A collection of unique order identifiers.

Represents a vector of OrderId values, useful for managing groups of orders.

◆ Price

Represents the price of an order or trade.

Defined as a 32-bit signed integer. Price values can be positive or negative.

◆ Quantity

Represents the quantity or volume of assets in an order or trade.

Defined as a 32-bit unsigned integer, as quantities cannot be negative.