Skip to content

Release 1.0.2

Choose a tag to compare

@github-actions github-actions released this 03 May 02:05
· 13 commits to main since this release

Release Notes

Added

  • OrderBookL3: Add interested_num_levels parameter to constructor for efficient top-N level tracking
    • New constructor signature includes optional interested_num_levels parameter (defaults to 10)
    • When set to a non-zero value, only top-N level changes trigger observer notifications
    • Setting to 0 maintains backward compatibility (all levels trigger notifications)
    • Reduces observer overhead for use cases that only care about top of book
  • OrderBookL3: Add template method getBestLevel<Side>() for compile-time side selection
    • Returns pointer to best price level for the specified side (Buy or Sell)
    • Template specializations for Side::Buy and Side::Sell
    • More efficient than runtime branching for side-agnostic algorithms
    • Returns nullptr if no orders exist on that side
  • PriceLevelUpdate: Add num_orders in PriceLevelUpdate; update related notifyPriceLevelUpdate methods
  • TopOfBookUpdate: Add change_flags in TopOfBook event; update related notifyTopOfBookUpdate methods

Changed

  • BREAKING CHANGE: OrderBookL3::modifyOrder() signature updated to include timestamp and priority parameters
    • Old signature: modifyOrder(OrderId, Price, Quantity, seq_num=0, is_last_in_batch=true)
    • New signature: modifyOrder(OrderId, Price, Quantity, Timestamp new_timestamp, uint64_t new_priority=0, seq_num=0, is_last_in_batch=true)
    • new_timestamp is now required (no default value)
    • new_priority defaults to 0, meaning "use timestamp as priority" for FIFO ordering (matches addOrder behavior)
    • Priority changes at same price level now trigger re-insertion to maintain correct queue position
    • Order timestamp and priority are properly updated on modification
  • BREAKING CHANGE: OrderBookL3::deleteOrder() signature updated to include timestamp parameter
    • Old signature: deleteOrder(OrderId, seq_num=0, is_last_in_batch=true)
    • New signature: deleteOrder(OrderId, Timestamp timestamp, seq_num=0, is_last_in_batch=true)
    • timestamp is now required (no default value)
    • Rename PriceLevelChangeFlag to ChangeFlag
  • Changed Quantity type from int64_t to uint64_t in types.hpp
    • Negative quantities are now invalid at the type system level
    • Prevents semantic errors and improves type safety
  • Update executeOrder method to include timestamp parameter; adjust related tests
  • Changed executeOrder to virtual function