Repository navigation
docs(orders): fix batch_create/batch_cancel examples for v2.4 typed responses - #275
Conversation
Code Review — PR #275docs(orders): fix batch_create/batch_cancel examples for v2.4 typed responses OverviewDocs-only patch to Verified the examples against the actual model definitions in CorrectnessBoth examples are accurate against the current models:
Minor Issues1. Implicit else:
print(entry.order.order_id, entry.order.status)
else:
assert entry.order is not None # spec: successful leg always has order
print(entry.order.order_id, entry.order.status)or at minimum add a comment so readers know why this is safe. 2. result = client.orders.batch_cancel([
BatchCancelOrdersRequestOrder(order_id="ord_abc", subaccount=0),
BatchCancelOrdersRequestOrder(order_id="ord_def", subaccount=1),
])
VerdictBoth changes are correct and necessary — the old examples would have raised Approve with nits. Either address the |
Closes #247
Part of #273 (post-v2.4 audit), Wave 0 docs patch.