Skip to content

Commit b5d5df3

Browse files
arturbegclaude
andcommitted
chore: regenerate ws-exec async models for postOnly/GTT (specs 3.0.1)
The ws-exec createOrder frame $refs CreateOrderRequest, so the AsyncAPI-generated models also carry postOnly + GTT now. Keeps the committed generated code in sync with a fresh generate-ws.sh run (CI enforces this). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8d3fbd7 commit b5d5df3

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

sdk/async_api/order.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Order(BaseModel):
1717
limit_px: str = Field(alias='''limitPx''')
1818
order_type: OrderType = Field(description='''Order type aligned with the on-chain `OrderDetails.orderType` enum: LIMIT = limit order, STOP_LOSS = stop-loss trigger order, TAKE_PROFIT = take-profit trigger order.''', alias='''orderType''')
1919
trigger_px: Optional[str] = Field(default=None, alias='''triggerPx''')
20-
time_in_force: Optional[TimeInForce] = Field(description='''Order time in force (IOC = Immediate or Cancel, GTC = Good Till Cancel)''', default=None, alias='''timeInForce''')
20+
time_in_force: Optional[TimeInForce] = Field(description='''Order time in force (IOC = Immediate or Cancel, GTC = Good Till Cancel, GTT = Good Till Time)''', default=None, alias='''timeInForce''')
2121
reduce_only: Optional[bool] = Field(description='''Whether this is a reduce-only order, exclusively used for LIMIT IOC orders.''', default=None, alias='''reduceOnly''')
2222
status: OrderStatus = Field(description='''Order status''')
2323
created_at: int = Field(alias='''createdAt''')

sdk/async_api/time_in_force.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
class TimeInForce(Enum):
44
IOC = "IOC"
5-
GTC = "GTC"
5+
GTC = "GTC"
6+
GTT = "GTT"

sdk/async_exec_api/create_order_request.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ class CreateOrderRequest(BaseModel):
1111
limit_px: str = Field(alias='''limitPx''')
1212
qty: Optional[str] = Field(default=None)
1313
order_type: OrderType = Field(description='''Order type aligned with the on-chain `OrderDetails.orderType` enum: LIMIT = limit order, STOP_LOSS = stop-loss trigger order, TAKE_PROFIT = take-profit trigger order.''', alias='''orderType''')
14-
time_in_force: Optional[TimeInForce] = Field(description='''Order time in force (IOC = Immediate or Cancel, GTC = Good Till Cancel)''', default=None, alias='''timeInForce''')
14+
time_in_force: Optional[TimeInForce] = Field(description='''Order time in force (IOC = Immediate or Cancel, GTC = Good Till Cancel, GTT = Good Till Time)''', default=None, alias='''timeInForce''')
1515
trigger_px: Optional[str] = Field(default=None, alias='''triggerPx''')
1616
reduce_only: Optional[bool] = Field(description='''Reduce-only intent. Perp only; spot markets must set this to false. Maps to on-chain `OrderDetails.reduceOnly`.''', default=None, alias='''reduceOnly''')
17+
post_only: Optional[bool] = Field(description='''Post-only (maker-only) intent: the order must rest and never cross as a taker. Valid on GTC/GTT; rejected on IOC. Maps to on-chain `OrderDetails.postOnly`.''', default=None, alias='''postOnly''')
1718
signature: str = Field(description='''EIP-712 signature over the `Order(uint256 verifyingChainId, uint256 deadline, OrderDetails order)` envelope. See `docs/eip712.md` for the exact typehash string and signing algorithm.''')
1819
nonce: str = Field(description='''Monotonically increasing per-signer nonce. Maps to on-chain `OrderDetails.nonce`.''')
1920
signer_wallet: str = Field(alias='''signerWallet''')
@@ -40,13 +41,13 @@ def unwrap_additional_properties(cls, data):
4041
if not isinstance(data, dict):
4142
data = data.model_dump()
4243
json_properties = list(data.keys())
43-
known_object_properties = ['exchange_id', 'symbol', 'account_id', 'is_buy', 'limit_px', 'qty', 'order_type', 'time_in_force', 'trigger_px', 'reduce_only', 'signature', 'nonce', 'signer_wallet', 'deadline', 'expires_after', 'client_order_id', 'additional_properties']
44+
known_object_properties = ['exchange_id', 'symbol', 'account_id', 'is_buy', 'limit_px', 'qty', 'order_type', 'time_in_force', 'trigger_px', 'reduce_only', 'post_only', 'signature', 'nonce', 'signer_wallet', 'deadline', 'expires_after', 'client_order_id', 'additional_properties']
4445
unknown_object_properties = [element for element in json_properties if element not in known_object_properties]
4546
# Ignore attempts that validate regular models, only when unknown input is used we add unwrap extensions
4647
if len(unknown_object_properties) == 0:
4748
return data
4849

49-
known_json_properties = ['exchangeId', 'symbol', 'accountId', 'isBuy', 'limitPx', 'qty', 'orderType', 'timeInForce', 'triggerPx', 'reduceOnly', 'signature', 'nonce', 'signerWallet', 'deadline', 'expiresAfter', 'clientOrderId', 'additionalProperties']
50+
known_json_properties = ['exchangeId', 'symbol', 'accountId', 'isBuy', 'limitPx', 'qty', 'orderType', 'timeInForce', 'triggerPx', 'reduceOnly', 'postOnly', 'signature', 'nonce', 'signerWallet', 'deadline', 'expiresAfter', 'clientOrderId', 'additionalProperties']
5051
additional_properties = data.get('additional_properties', {})
5152
for obj_key in unknown_object_properties:
5253
if not known_json_properties.__contains__(obj_key):

sdk/async_exec_api/time_in_force.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
class TimeInForce(Enum):
44
IOC = "IOC"
5-
GTC = "GTC"
5+
GTC = "GTC"
6+
GTT = "GTT"

0 commit comments

Comments
 (0)