`orders place --autoslice` shows ✓ and hides slices that Kite rejected
Summary
kite orders place --autoslice --confirm prints ✓ Order submitted and the parent order ID even when Kite rejected some of the slices. The failed slices and their errors aren't shown, so it looks as if the full quantity was placed.
Steps to reproduce
- Serve
autoslice_response.jsonfrom a mock Kite API forPOST /orders/regular, astests/cli_output.rsdoes. In that response, the third of four children is an error:MarginException, "Insufficient funds. Required margin is 228365.92 but available margin is 228358.50." For the command below, exportKITE_API_ROOTwith that server's base URL,KITE_API_KEY=test-key, andKITE_ACCESS_TOKEN=test-token. - Run
kite orders place --exchange NSE --tradingsymbol INFY --transaction-type BUY --order-type LIMIT --quantity 1 --product CNC --price 1500 --validity DAY --autoslice --confirm.
Expected
The output shows each slice's order ID, or the reason it failed. It doesn't show a plain ✓ when a slice failed.
Actual
✓ Order submitted BUY 1 NSE:INFY LIMIT @ 1500 CNC DAY
Order ID 1914227164488687616
hint: check its status with `kite orders get 1914227164488687616`
The command exits 0. Only --json output includes children.
Cause
write_result prints order_id and returns, so children is never read. Its caller is send_unless_dry_run.
This issue covers the CLI only. The TUI has a similar gap: spawn_place_order keeps only order_id, and the order ticket turns autoslice on by itself above the freeze quantity.
Found using the kiteconnect-mocks fixtures only. I haven't placed a live autoslice order.