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
8 changes: 4 additions & 4 deletions kalshi/models/orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ class BatchCreateOrdersResponseEntry(BaseModel):
class BatchCreateOrdersResponse(BaseModel):
"""Response from ``POST /portfolio/orders/batched``.

Spec ``components.schemas.BatchCreateOrdersResponse``. v3.0.0
BREAKING: previously the SDK returned ``list[Order]`` and crashed
Spec ``components.schemas.BatchCreateOrdersResponse``. Changed in v2.4.0
(breaking): previously the SDK returned ``list[Order]`` and crashed
with ``ValidationError`` on the first failed leg
(``Order.model_validate(None)``). Now returns the typed envelope so
callers can inspect per-leg ``order``/``error``/``client_order_id``.
Expand Down Expand Up @@ -402,8 +402,8 @@ class BatchCancelOrdersResponseEntry(BaseModel):
class BatchCancelOrdersResponse(BaseModel):
"""Response from ``DELETE /portfolio/orders/batched``.

Spec ``components.schemas.BatchCancelOrdersResponse``. v3.0.0
BREAKING: previously the SDK declared ``-> None`` and discarded the
Spec ``components.schemas.BatchCancelOrdersResponse``. Changed in v2.4.0
(breaking): previously the SDK declared ``-> None`` and discarded the
response body. Per-leg ``reduced_by_fp`` and any per-leg errors are
now surfaced.
"""
Expand Down
4 changes: 2 additions & 2 deletions kalshi/resources/orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def batch_create(
) -> BatchCreateOrdersResponse:
"""Place a batch of orders.

BREAKING in v3.0.0: previously returned ``list[Order]`` and would
Changed in v2.4.0 (breaking): previously returned ``list[Order]`` and would
crash with ``ValidationError`` on any partially-failed batch
(the spec marks each entry's ``order`` and ``error`` as nullable;
the old ``Order.model_validate(o.get("order", o))`` blew up the
Expand Down Expand Up @@ -511,7 +511,7 @@ def batch_cancel(
mix of both. String entries are wrapped as
``BatchCancelOrdersRequestOrder(order_id=<id>)`` before serialization.

BREAKING in v3.0.0: previously returned ``None`` and discarded
Changed in v2.4.0 (breaking): previously returned ``None`` and discarded
the server's per-leg response. Now returns
:class:`BatchCancelOrdersResponse` so callers can read the
load-bearing ``reduced_by_fp`` per entry (cents canceled) plus
Expand Down
Loading