Skip to content

Rejection Reasons

OrderRejectionReason

Bases: Enum

Enumeration of canonical order rejection reasons.

This enumeration defines the system-level classification of order rejection causes. It provides a stable, brokers-agnostic taxonomy for programmatic handling of rejected orders.

Value Semantics
UNKNOWN The 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 order rejection causes.
    It provides a stable, brokers-agnostic taxonomy for programmatic handling of rejected orders.

    | Value     | Semantics                                                                 |
    |-----------|---------------------------------------------------------------------------|
    | `UNKNOWN` | The 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 brokers. It provides a stable, brokers-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 brokers.
    It provides a stable, brokers-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 brokers. It provides a stable, brokers-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 brokers.
    It provides a stable, brokers-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()