# Matching Engines and Venue Logic — fintech-algorithms > 21 algorithms in 4 families, sliced out of the > fintech-algorithms reference. Zero-dependency TypeScript: plain arrays and objects in, > plain values out. This file covers D12 only. D12 · 21 topics · 4 families · 0 verified Install: npm install fintech-algorithms Agent skill (install it rather than re-deriving this file): npx skills add IslamBaraka90/Fintech-Algorithms-Library what it is: https://docs.thefintechbuilder.com/guides/agent-skill/ Source: fintech-algorithms@0.12.0 · payload schema 2.0.0 Reference payload: https://docs.thefintechbuilder.com/reference/payload.json Version endpoint: https://docs.thefintechbuilder.com/version.json Domain page: https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/ Full index (324 topics across 13 domains): https://docs.thefintechbuilder.com/llms.txt Verification tiers: - verified — the worked example is the figure published in the algorithm's article, replayed and asserted by the test suite on every run. The arithmetic cannot drift without the build failing. Treat the numbers as reproducible. - contract — the module loads, the entry point is callable and its declared signature matches the compiled code. The example is real captured output, but no independently published figure asserts it. Treat the shape as reliable and the numbers as unattested. Full explanation: https://docs.thefintechbuilder.com/guides/verification/ Each entry: name — signature — archetype — verification tier — docs URL From the docs URL, mechanically: import subpath — swap the https://docs.thefintechbuilder.com/ prefix for fintech-algorithms/ and drop the trailing slash markdown page — append index.md; same contract as the HTML page, a fraction of the bytes ## D12-F01 — Continuous Matching https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/continuous-matching/ - Price-Time Priority — `priceTimePriority(incomingRaw, restingRaw)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/continuous-matching/price-time-priority/ - Pro-Rata Matching — `proRataMatching(incomingRaw, priceRaw, lotRaw, restingRaw)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/continuous-matching/pro-rata-matching/ - Size-Time Priority — `sizeTimePriority(incomingRaw, priceRaw, lotRaw, restingRaw)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/continuous-matching/size-time-priority/ - Hybrid Pro-Rata/Time Matching — `calculate(topicId, inputs)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/continuous-matching/hybrid-pro-rata-time-matching/ ## D12-F02 — Auctions https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/auctions/ - Maximum-Executable-Volume Auction — `maximumExecutableVolumeAuction(ordersRaw, referenceRaw, tickRaw)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/auctions/maximum-executable-volume-auction/ - Minimum-Imbalance Tie-Break — `minimumImbalanceTieBreak(ordersRaw, referenceRaw, tickRaw)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/auctions/minimum-imbalance-tie-break/ - Opening-Cross Price — `openingCrossPrice(orders, previousClose, tick, low, high)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/auctions/opening-cross-price/ - Closing-Cross Price — `closingCrossPrice(orders, reference, tick, low, high)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/auctions/closing-cross-price/ - Volatility-Auction Reopening — `volatilityAuctionReopening(inputs)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/auctions/volatility-auction-reopening/ ## D12-F03 — Order Controls https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-controls/ - Tick-Size Validation — `tickSizeValidation(price_atoms, tick_size_atoms, price_scale, effective_policy_id)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-controls/tick-size-validation/ - Price-Band Validation — `priceBandValidation(side, limit_price_atoms, lower_band_atoms, upper_band_atoms, band_as_of_ns, inclusive)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-controls/price-band-validation/ - Self-Trade Prevention — `selfTradePrevention(incoming_order, resting_orders, mode)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-controls/self-trade-prevention/ - Cancel-on-Disconnect — `cancelOnDisconnect(disconnected_session_id, disconnect_type, trigger_disconnect_types, policy, orders)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-controls/cancel-on-disconnect/ - Fat-Finger Limit — `fatFingerLimit(side, limit_price_atoms, reference_price_atoms, quantity, max_quantity, max_notional_atoms, max_aggressive_deviation_bps)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-controls/fat-finger-limit/ - Circuit-Breaker Trigger — `circuitBreakerTrigger(reference_close_atoms, current_index_atoms, level_thresholds_bps, previously_triggered_level)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-controls/circuit-breaker-trigger/ ## D12-F04 — Order Lifecycle and Queue State https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-lifecycle-and-queue-state/ - Limit-Order Lifecycle State Machine — `limitOrderLifecycle(orderIdRaw, orderQuantityRaw, eventsRaw)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-lifecycle-and-queue-state/limit-order-lifecycle-state-machine/ - Cancel/Replace Priority Rule — `cancelReplacePriority(originalRaw, replacementRaw)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-lifecycle-and-queue-state/cancel-replace-priority-rule/ - Partial-Fill and Residual-Quantity Processing — `partialFillResidual(orderQuantityRaw, fillsRaw)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-lifecycle-and-queue-state/partial-fill-and-residual-quantity-processing/ - Queue Position and Ahead-Volume Calculation — `queuePositionAheadVolume(ordersRaw, targetIdRaw)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-lifecycle-and-queue-state/queue-position-and-ahead-volume-calculation/ - Iceberg/Reserve-Order Replenishment — `icebergReplenishment(totalRaw, initialRaw, displaySizeRaw, fillsRaw, priorityRaw)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-lifecycle-and-queue-state/iceberg-reserve-order-replenishment/ - Marketable-Order Multi-Level Sweep — `marketableOrderSweep(incomingRaw, restingRaw)` — record-transform — contract — https://docs.thefintechbuilder.com/matching-engines-and-venue-logic/order-lifecycle-and-queue-state/marketable-order-multi-level-sweep/