Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "x10-python-trading-starknet"
version = "2.4.1"
version = "2.5.0"
description = "Python client for X10 API"
authors = ["X10 <tech@ex10.org>"]
repository = "https://github.com/x10xchange/python_sdk"
Expand Down
1 change: 1 addition & 0 deletions x10/models/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class TimeInForce(StrEnum):
GTT = "GTT"
IOC = "IOC"
FOK = "FOK"
TOB = "TOB"


class OrderSide(StrEnum):
Expand Down
3 changes: 3 additions & 0 deletions x10/signing/order_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ def validate_tpsl_order():
if time_in_force == TimeInForce.FOK:
raise ValidationError("FOK `time_in_force` value is deprecated")

if time_in_force == TimeInForce.TOB and not post_only:
raise ValidationError("`post_only` must be true for TOB `time_in_force`")

if expire_time is None:
raise ValidationError("`expire_time` must be provided")

Expand Down
Loading