Repository navigation
fix(orders): split iceberg legs like Kite web when no leg quantity is given - #11
Merged
Merged
Conversation
… given kite orders place --variety iceberg sent no iceberg_quantity unless the caller passed one. Kite web always sends it, computed as the quantity over the legs rounded up to whole lots, and so does the TUI ticket. The CLI now looks up the instrument's lot size in the cached instrument master and sends the same value. An explicit --iceberg-quantity still wins, and an instrument missing from the master is an error that asks for the flag.
mr-karan
force-pushed
the
fix/orders-iceberg-quantity
branch
from
November 16, 2026 08:37
e3c910f to
de40bc4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
kite orders place --variety icebergshould send the same order Kite web sends. Kite web always sendsiceberg_quantity, computed asceil(quantity / legs / lot_size) * lot_size(OrderWindow.vue,icebergQty). The TUI ticket does the same. The CLI sent nothing unless the caller passed--iceberg-quantity. This was flagged while reviewing #8.What changed
--iceberg-quantity,orders placelooks up the instrument's lot size in the cached instrument master and sends Kite web's per-leg quantity. Dry runs show it.--iceberg-quantitystill wins.--iceberg-quantityrather than guessing.Verification
101over 4 legs of lot 1 gives26, and750over 4 legs of lot 75 gives225./orders.cargo clippy -D warningsand the fullcargo testpass locally.No live iceberg order was placed.