Skip to content

CLOB feature request: server-enforced order time-to-book / late-cancel #98

@jacobianvertex

Description

@jacobianvertex

Summary

Feature request for CLOB to support a server-enforced order freshness constraint: reject or auto-cancel an order if it cannot reach the book within a caller-specified latency budget.

This is intended to prevent stale orders from resting or filling after the caller has already timed out the request or moved on.

Problem

On latency spikes, POST /order can take from hundreds of milliseconds to many seconds to ACK. During that in-flight window:

  • The client may not yet have the order ID returned by the create response.
  • Client-side HTTP timeouts only abandon the local request; they do not guarantee the order will stop server-side.
  • cancel-all and market-level cancel flows may not catch an order that has not reached the book yet.
  • If the order is later accepted, it can rest or fill at a stale price, creating adverse or "zombie" fills.

This is most painful on fast, short-duration markets where the market can move materially inside one slow ACK window.

Requested CLOB behavior

Evaluate a first-class CLOB/API primitive for one or more of the following:

  1. Server-side time-to-book / max-staleness: reject an order if it cannot book within N ms of signing or receipt.
  2. Server-side late-cancel: auto-cancel a create request that exceeds a caller-specified deadline before ACK/book.
  3. Short TTL / sub-60s expiry semantics where safe, so stale orders cannot rest after arrival.
  4. Deterministic order-id cancellation semantics that reliably tombstone an in-flight order before it can book.

Scope note

This should be evaluated as a CLOB/API execution constraint, not an SDK-only timeout option. Once the CLOB primitive exists, SDKs can expose it cleanly as an order submission option.

GitHub context

Related reports

Environment

Affects CLOB clients and direct REST integrations. Reported against v2 CLOB after the 2026-04-28 cutover.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions