Skip to content

tpluspy: support attached trigger orders#132

Merged
farnyser merged 3 commits intomainfrom
attached-trigger-orders
Mar 11, 2026
Merged

tpluspy: support attached trigger orders#132
farnyser merged 3 commits intomainfrom
attached-trigger-orders

Conversation

@farnyser
Copy link
Collaborator

No description provided.

@farnyser farnyser requested a review from antazoey February 23, 2026 15:34
@farnyser farnyser self-assigned this Feb 23, 2026
@farnyser farnyser force-pushed the attached-trigger-orders branch from d950089 to 5dec806 Compare February 23, 2026 15:52

@model_serializer
def serialize_model(self) -> dict[str, dict[str, Any] | str]:
if self.parent_order_id is not None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is exclude_none=True kwarg on model dump, just as fyi
also can simplify this

data = {"trigger": self.trigger.serialize_model()}
if self.parent_order_id is not None:
    data["parent_order_id"] = self.parent_order_id

@farnyser farnyser force-pushed the attached-trigger-orders branch from da8f992 to e18c739 Compare March 8, 2026 17:56
@farnyser farnyser merged commit 49f858f into main Mar 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants