Skip to content

Rejection Reasons

OrderRejectionReason

Bases: Enum

Enumeration of canonical order rejection reasons.

This enumeration defines the system-level classification of reasons for which an order request may be rejected by a broker. It provides a stable, broker-agnostic taxonomy for programmatic handling and observability of order rejections.

Value Semantics
UNKNOWN The order rejection reason could not be classified into a known category.
Source code in src/onesecondtrader/models/rejection_reasons.py
class OrderRejectionReason(enum.Enum):
    """
    Enumeration of canonical order rejection reasons.

    This enumeration defines the system-level classification of reasons for which an order request may be rejected by a broker.
    It provides a stable, broker-agnostic taxonomy for programmatic handling and observability of order rejections.

    | Value     | Semantics                                                                 |
    |-----------|---------------------------------------------------------------------------|
    | `UNKNOWN` | The order rejection reason could not be classified into a known category. |
    """

    UNKNOWN = enum.auto()

ModificationRejectionReason

Bases: Enum

Enumeration of canonical order modification rejection reasons.

This enumeration defines the system-level classification of reasons for which an order modification request may be rejected by a broker. It provides a stable, broker-agnostic taxonomy intended for programmatic handling and observability of modification rejections.

Value Semantics
UNKNOWN The modification rejection reason could not be classified into a known category.
Source code in src/onesecondtrader/models/rejection_reasons.py
class ModificationRejectionReason(enum.Enum):
    """
    Enumeration of canonical order modification rejection reasons.

    This enumeration defines the system-level classification of reasons for which an order modification request may be rejected by a broker.
    It provides a stable, broker-agnostic taxonomy intended for programmatic handling and observability of modification rejections.

    | Value     | Semantics                                                                        |
    |-----------|----------------------------------------------------------------------------------|
    | `UNKNOWN` | The modification rejection reason could not be classified into a known category. |
    """

    UNKNOWN = enum.auto()

CancellationRejectionReason

Bases: Enum

Enumeration of canonical order cancellation rejection reasons.

This enumeration defines the system-level classification of reasons for which an order cancellation request may be rejected by a broker. It provides a stable, broker-agnostic taxonomy intended for programmatic handling and observability of cancellation rejections.

Value Semantics
UNKNOWN The cancellation rejection reason could not be classified into a known category.
Source code in src/onesecondtrader/models/rejection_reasons.py
class CancellationRejectionReason(enum.Enum):
    """
    Enumeration of canonical order cancellation rejection reasons.

    This enumeration defines the system-level classification of reasons for which an order cancellation request may be rejected by a broker.
    It provides a stable, broker-agnostic taxonomy intended for programmatic handling and observability of cancellation rejections.

    | Value     | Semantics                                                                        |
    |-----------|----------------------------------------------------------------------------------|
    | `UNKNOWN` | The cancellation rejection reason could not be classified into a known category. |
    """

    UNKNOWN = enum.auto()