2.8 KiB
@hanzo/matching-engine › Globals › "Book"
External module: "Book"
Index
Classes
Interfaces
Type aliases
Variables
Functions
Type aliases
OrderBookMap
Ƭ OrderBookMap: Map‹string, Decimal›
Defined in Book.ts:59
a map of order price strings to decimals
OrderBookTree
Ƭ OrderBookTree: AVLTree‹string, Decimal›
Defined in Book.ts:54
a avl tree of order price strings to decimals
OrderHeap
Ƭ OrderHeap: FibonacciHeap‹Order›
Defined in Book.ts:64
a priorty queue of orders
OrderMap
Ƭ OrderMap: Map‹string, Order›
Defined in Book.ts:69
a map of order price strings to decimals
Variables
Const naturalOrderCollator
• naturalOrderCollator: Collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'})
Defined in Book.ts:21
sorts array by natural order of string
Functions
Const askComparator
▸ askComparator(a: Order, b: Order): number
Defined in Book.ts:43
min-heap comparator function
Parameters:
| Name | Type |
|---|---|
a |
Order |
b |
Order |
Returns: number
negative if b.price > a.price, ties broken by creation time
Const bidComparator
▸ bidComparator(a: Order, b: Order): number
Defined in Book.ts:29
max-heap comparator function
Parameters:
| Name | Type |
|---|---|
a |
Order |
b |
Order |
Returns: number
negative if b.price < a.price, ties broken by creation time