Skip to content

NewOrderTimeInForceEnum should support GTE_GTC for TP/SL orders #446

@zionhann

Description

@zionhann

Currently, the NewOrderTimeInForceEnum does not include the GTE_GTC option, which is required for take-profit (TP) and stop-loss (SL) orders on USDs Futures (and likely on other clients as well).

The GTE_GTC option ensures that TP/SL orders are automatically cancelled when the related position is closed. This behaviour prevents any remaining TP/SL orders from staying active after the position has been exited.

class NewOrderTimeInForceEnum(Enum):
    GTC = "GTC"
    IOC = "IOC"
    FOK = "FOK"
    GTX = "GTX"
    GTD = "GTD"
+  GTE_GTC = "GTE_GTC"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions