Skip to content

Update README.md for cursor integration - #34

Open
mahecode wants to merge 1 commit into
zerodha:masterfrom
mahecode:patch-1
Open

Update README.md for cursor integration #34
mahecode wants to merge 1 commit into
zerodha:masterfrom
mahecode:patch-1

Conversation

@mahecode

Copy link
Copy Markdown

No description provided.

Sundeepg98 added a commit to Sundeepg98/kite-mcp-server that referenced this pull request Apr 20, 2026
Task zerodha#34 — push DDD from ~93 to ~97. Replaces OrderSpec/QuantitySpec/
PriceSpec composition with the single kc/domain.NewOrderPlacement
aggregate root (plus NewQuantity/NewMoney in modify's optional-change
path).

place_order.go: Execute now constructs NewOrderPlacement and fails
fast if the aggregate rejects any invariant. Aggregate owns the
{instrument, qty, price, txType, orderType} checks.

modify_order.go: For quantity changes (cmd.Quantity > 0) — NewQuantity
rejects <= 0. For price changes on non-MARKET/SL-M orders — NewMoney
rejects <= 0. "0 means don't change" convention preserved.

usecases_write_test.go (test-alignment per task brief):
- TestPlaceOrder_ValidationFailures expectations now match aggregate
  error text ("requires a valid instrument", "requires a positive
  quantity"). Added explicit "empty exchange" case.
- TestPlaceOrder_BrokerResolveError: exchange populated so the test
  reaches the broker-resolve step rather than the new aggregate gate.

Full kc/usecases suite green. Diff <80 LOC incl. tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant