Skip to main content

Crate silhouette_mvp_orderbook

Crate silhouette_mvp_orderbook 

Source
Expand description

A price-time priority order book matching engine for Silhouette.

This crate provides a high-performance order matching engine with support for:

  • Limit and market orders
  • Price-time priority matching
  • Order cancellation
  • Batch settlement with remainder handling
  • Decimal price/size validation following Hyperliquid rules

§Main Components

  • OrderBook - The main order book implementation
  • OrderBuilder - Fluent API for constructing orders
  • types - Core types like Order, Match, and BatchResult
  • validation - Price and size validation following exchange rules
  • error - Error types for the matching engine

Re-exports§

pub use builder::OrderBuilder;
pub use config::OrderBookConfig;
pub use error::MatcherError;
pub use orderbook::OrderBook;
pub use types::BatchResult;
pub use types::CancellationResult;
pub use types::Match;
pub use types::Order;
pub use types::OrderSide;
pub use types::Remainder;

Modules§

builder
config
Configuration management for the order book.
error
orderbook
types
validation

Functions§

create_orderbook
Creates a new order book instance