Fat-Finger Limit
Install and import
npm install fintech-algorithmsimport { fatFingerLimit } from "fintech-algorithms/matching-engines-and-venue-logic/order-controls/fat-finger-limit";Signature
fatFingerLimit(side, limit_price_atoms, reference_price_atoms, quantity, max_quantity, max_notional_atoms, max_aggressive_deviation_bps)Blocks obviously erroneous orders on quantity, notional and aggressive price deviation. The last automated check between a mistyped order and a market-wide incident.
Parameters
| Name | Type | Notes |
|---|---|---|
side | "buy" | "sell" | Order side. |
limit_price_atoms | number | Limit price in atoms. min: 0 · integer: true |
reference_price_atoms | number | Reference price the deviation is measured against. min: 0 · integer: true |
quantity | number | Order quantity. min: 0 · integer: true |
max_quantity | number | Maximum permitted quantity. min: 0 · integer: true |
max_notional_atoms | number | Maximum permitted notional in atoms. min: 0 · integer: true |
max_aggressive_deviation_bps | number | Maximum permitted aggressive deviation from the reference, in basis points. min: 0 · integer: true |
Returns
{ valid, breached_checks, quantity, notional, deviation_bps }
Which specific checks failed rather than a bare rejection — a participant cannot correct what they are not told.
Errors
- When a limit is negative — throws
Complexity: time O(1),
space O(1).
Worked example
executed Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.
Input
"buy"10150001000000400050005000000000200Call
fatFingerLimit(side, limit_price_atoms, reference_price_atoms, quantity, max_quantity, max_notional_atoms, max_aggressive_deviation_bps)Returns
object with 11 fields: side, limit_price_atoms, reference_price_atoms, quantity, order_notional_atoms, aggressive_deviation_bps, checks, violations, …
{
"side": "buy",
"limit_price_atoms": 1015000,
"reference_price_atoms": 1000000,
"quantity": 4000,
"order_notional_atoms": 4060000000,
"aggressive_deviation_bps": 150,
"checks": {
"quantity": {
"value": 4000,
"limit": 5000,
"passed": true
},
"notional": {
"value": 4060000000,
"limit": 5000000000,
"passed": true
},
"aggressive_deviation_bps": {
"value": 150,
"limit": 200,
"passed": true
}
},
"violations": [],
"valid": true,
"reason": "within-configured-limits",
"state": "accepted"
}Other exports
This module also exports
tickSizeValidation, priceBandValidation, selfTradePrevention, cancelOnDisconnect, circuitBreakerTrigger, calculate. Every module additionally exports run as an alias of its
primary function, and a meta object carrying its catalog id, domain, family,
shape and article URL.
Diagrams
How it works
This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.
References
- Cboe Titanium U.S. Equities/Options Web Portal Port Controls Specification — Cboe Global Markets
- Cboe Titanium U.S. Equities FIX Specification — Cboe Global Markets
- Commission Delegated Regulation (EU) 2017/584 — European Commission
- Evidence boundary