
Order Lifecycle
If you're building an OMS or EMS, this walks you through order state machines, FIX protocol flows, and all the edge cases that bite you in production. It covers the full lifecycle from order entry through fills, cancels, and replacements, including the race conditions between cancel requests and executions that cause most bugs. You'll find the canonical state definitions (New, Pending New, Accepted, Partially Filled, and the terminal states), valid transitions, ClOrdID chaining for cancel/replace workflows, and pre-submission validation patterns. The material on CAT audit trails and order persistence for failover is solid. This is the reference you want when debugging why an order hit an impossible state or designing recovery logic.
- skills.sh installs
- 780
- GitHub stars
- 224
- last updated
- Aug 21, 2026
Install
$ npx -y skills add joellewis/finance_skills --skill order-lifecycle --agent claude-codeInstalls into .claude/skills of the current project.
Files
Order Lifecycle
Core Concepts
Order State Machine
The order state machine is the central abstraction in any order management system. It defines every state an order can occupy and every valid transition between states. A correctly implemented state machine prevents impossible transitions (such as filling a canceled order), ensures audit trail completeness, and provides the foundation for order status reporting to clients, counterparties, and regulators.
Canonical order states:
Sponsors
Details
- Repository
- github.com/joellewis/finance_skills
- Categories
- Backend & APIs, Security, Documentation, Debugging, Sales & Marketing, Design & UI/UX, Finance & Trading
- First seen
- Jun 3, 2026
More from joellewis/finance_skills
All 84- Market Data776
- Diversification769
- Currencies And Fx765
- Historical Risk761
- Liquidity Management756
- Bet Sizing755
- Time Value Of Money754
- Account Transfers753
- Volatility Modeling753
- Financial Planning Workflow751
- Emergency Fund748
- Performance Metrics746
- Data Quality745
- Return Calculations745
- Lending741
- Savings Goals741
- Trade Execution739
- Fund Vehicles737
- Forward Risk733
- Privacy Data Security731
- Performance Reporting729
- Equities727
- Tax Efficiency724
- Anti Money Laundering723