Skip to content

docs(orders): stale "defaults to buy" comment on orders.create example (post-#242) #299

Closed

Description

@TexasCoding

Summary

docs/resources/orders.md:52 still carries a stale comment:

action="buy",                  # ActionLiteral, defaults to "buy"

action no longer has a default — v2.5's #242 makes it a required positional kwarg on orders.create() and removes the default on CreateOrderRequest. The matching breaking-change entry in CHANGELOG.md (v2.5.0 / Breaking changes) and docs/migration.md (v2.4 → v2.5) are accurate; only the resource-page example was missed in the doc sweep.

Why it matters

The misleading inline comment will get copy/pasted into user code as a "look, I can leave action off because it defaults" cue and produce a confusing TypeError: create() requires 'ticker', 'side', 'count', and 'action' after an SDK upgrade. The original silent-default behavior was the exact money-risk that motivated #242.

Suggested fix

Drop the trailing comment so the line reads:

action="buy",                  # ActionLiteral (required)

Optionally add a short callout above the example pointing at the migration guide:

Since v2.5, count and action are required on the kwarg path — see v2.4 → v2.5 migration.

Discovered by

Post-v2.5 multi-reviewer audit (Docs / docstring drift surface).

Activity

  1. added a commit that references this issue on May 21, 2026
    c6f9a63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions