Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    trading order recovery tests

    1

    Replay and audit trading order events to identify duplicate fills, race conditions, and unresolved broker states.

    $18

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned
    trading order recovery tests

    trading order recovery tests

    Example session with this skill installed

    Analyze the order event logs in log_export_20231012.json to identify any duplicate fills or unresolved states during the 09:30 AM reconnect window.

    • Read your context and instructions
    • Compiled the trading order recovery
    • Generated the document

    I have processed the provided order event logs through the replay helper. The analysis identified one duplicate fill notification and one unresolved state caused by a race between a cancel request and a late execution report.

    Order Recovery Analysis Report

    Order IDIntentDetected EventsStatusConflict/Finding
    ORD-99281BUY 500 AAPLSUBMIT, RECONNECT, FILL, FILLRESOLVEDDuplicate fill notification flagged at 09:31:04. Position count corrected.
    ORD-99285SELL 200 TSLASUBMIT, CANCEL_REQ, FILL, CANCEL_ACKUNRESOLVEDRace condition: Fill received after cancel request, followed by Cancel Ack. Requires broker side check.
    ORD-99302BUY 100 MSFTSUBMIT, RECONNECT, ACKSUCCESSNormal recovery after connection loss.

    Technical Findings

    The replay tool flagged ORD-99285 because the state machine reached a terminal 'Filled' state before receiving a 'Canceled' acknowledgement. This suggests the venue processed the fill before the cancel message arrived, despite the local sequence. Application logic should be reviewed to handle CANCEL_ACK arriving post-fill without throwing a state transition error.

    Data References:

    • Source: log_export_20231012.json
    • Helper Version: 1.0.2-offline
    • Script: scripts/analyze.py

    Next steps

    1. Manually verify the execution status of ORD-99285 via the broker's administrative portal.
    2. Update the application's order state machine to gracefully ignore CANCEL_ACK if the order is already in a terminal FILLED state.
    3. Add the ORD-99285 sequence to the synthetic test suite to prevent regression.

    trading-order-recovery-tests.pdf

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    What you get

    Detect duplicate fill notifications in recorded event logs.Audit order state transitions during reconnect or timeout events.Identify race conditions between cancellations and execution reports.Generate incident reports for broker-side state discrepancies.

    About this skill

    The problem

    Race conditions between order fills and cancellations often lead to duplicate position tracking or hung states. Manually auditing event logs to identify where a recovery logic failed during a reconnect or timeout is slow and error-prone.

    What it does

    • Replays recorded order-event fixtures to detect duplicate broker notifications and fill replays.
    • Correlates asynchronous event sequences into single economic order intents for clear auditing.
    • Identifies terminal-state conflicts where transport reordering causes illegal state transitions.
    • Flags unresolved broker states that require manual intervention or logic updates.

    Frameworks & tools

    Python 3 for analysis scripts, JSON for event fixture schemas, and isolated application test harnesses.

    Why this beats prompting it yourself

    General LLMs struggle with the strict state machine logic required for trading order lifecycles. This skill uses a defined model for handling complex races like ack-after-fill or partial-fill-during-cancel, ensuring technical accuracy over vague summaries.

    Use cases

    • Analyzing logs after a production reconnect event to check for missed fills.
    • Validating new order-management logic against synthetic failure injection fixtures.
    • Generating incident reports for broker state discrepancies.

    Known limitations

    Strictly an offline replay checker. It does not provide broker clients, automatic retries, or production recovery automation.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 13 days ago

    • Passed all security checks, Safe to install

    Needs access to

    Alpaca

    Listed13 days ago

    What's inside

    Frequently Asked Questions