Trading Service Latency Instrumentation and Diagnosis

    by Claude Workflow Lab

    1

    Add a per-trade timing ledger (signal to order to fill to protected) to a crypto trading service, then diagnose jumpy RTT, slow feed hops and single slow fills with playbooks and dependency-free probes.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    What it does

    • Adds a per-trade timing ledger: signal, order, accept, fill, protected
    • Playbooks for jumpy round trips, slow feed hops and single slow fills
    • Dependency-free WebSocket and packet-capture probes with clock-offset checks

    Trading Service Latency Instrumentation and Diagnosis

    Example session with this skill installed

    One of my entries filled 900 ms after the signal and I do not know why. Walk me through finding whether it was our code, the network or the exchange, and add the timing ledger to my Go trading service.

    • Read your context and instructions
    • Compiled the trading service latency

    Example output on a fictional setup (illustrative).

    Single-fill diagnosis, following references/single-fill-diagnosis.md:

    1. Collected the signal stamp, our read-loop arrival stamp, order send time and the exchange's own fill time from its fill history.
    2. Clock check first: ws_probe.py reported our clock offset to the exchange as +3 ms, so cross-host subtraction is usable to about that precision.
    3. Split of the delay: signal to our arrival 40 ms (feed hop), arrival to order send 12 ms (our code), send to exchange accept 610 ms (ack late), accept to fill 4 ms. The big block sits between send and accept.
    4. Socket warmth check: the order socket had been idle for 11 minutes; the first message after idle paid a new TLS and path setup. Matches the playbook.

    Verdict: not our logic, not the matching engine; a cold order socket. Fix: keep-alive pings on the order socket and a warm-up message before expected signals.

    Ledger plan: stamp the read loop, add timing fields to the order-update struct, build the ledger package, render ack=unknown until ack capture lands, build and vet both modules, then ack capture last.

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

    About this skill

    Answer the question that averages cannot: for this trade, where did the time go?

    What is inside:

    • SKILL.md: how to build a per-trade ledger in a trading service and its exchange client, in an order where partial work is shippable (additive stamps first, ack capture last because it touches live order flow). It lists the five traps that give confident but wrong numbers, such as mixing clocks and mixing accept with ack.
    • references/: five playbooks. Latency jumps (per-flow path pinning versus queueing), feed-ingress attribution (clock offset, network, your read path or the vendor), socket warmth, single-fill diagnosis from logs plus the exchange's fill history, and live-box measurement pitfalls.
    • scripts/ws_probe.py: dependency-free WebSocket ping/pong probe with percentiles and clock offset.
    • scripts/pcap_turnaround.py: reads a packet capture to measure how fast a peer answers, with its jitter bound.

    It is for developers who run their own crypto execution code and want evidence before blaming the exchange, the network or themselves. It needs a codebase you can edit, a way to restart the service, and Python 3 for the probes. The ledger work is done inline in one thread, since the risk sits in one message-router function.

    This skill is also part of the Crypto Listing & Announcement Research Kit pack at a lower per-skill price.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 day ago

    Software
    Python 3 (standard library only) for the probes

    A trading service and exchange client you can edit (examples are Go-flavoured, rules apply to any language with a monotonic clock). tcpdump on your box for the packet-capture script.

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Listed1 day ago

    What's inside

    Frequently Asked Questions

    Add a per-trade timing ledger (signal to order to fill to protected) to a crypto trading service, then diagnose jumpy RTT, slow feed hops and single slow fills with playbooks and dependency-free probes.

    This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

    Connect your AI agent to Agensi through MCP, then ask it to use Trading Service Latency Instrumentation and Diagnosis on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

    New in Trading & Investing

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Trading & Investing.