It looks like you're new here. If you want to get involved, click one of these buttons!
iceberg_legs = ceil(qty / freeze_qty)
order_id = kite.place_order(variety='iceberg',
iceberg_legs=iceberg_legs,
tradingsymbol=tradingsymbol,
exchange=exch,
transaction_type=buy_sell,
iceberg_quantity=freeze_qty,
order_type=otype,
price=price,
trigger_price=t_price,
product=nrml_mis,
tag='bnf_multi_iceberg')
quantity
field while placing iceberg order.You can refer to the example params for placing iceberg order here.
For slice calculation, you can refer to this thread.
The total quantity of the iceberg can't be 1900 since it is not a multiple of lot size.
Partial fill happens in multiples of 15 (lot size), a partial fill of 700 is not possible. You can place an independent stoploss order of sliced quantity or wait for everything to execute and place another iceberg order for exit. It is up to you, how you want to code.
Am I correct in assuming:
If the order quantity is: freeze quantity x 2 + 15x4
The orders will be separate i.e.
I will have to place a iceberg order for: freeze quantity x 2.
Second order: NRML/MIS type 15 x 4
Same way for the stop-loss order?
I would try the code in a sandbox environment, but unfortunately I don't believe that option is available.
Thanks
The total number of legs allowed is 2 to 10. After first leg gets executed, the second order is placed automatically by the system itself.
The iceberg order backend is designed in such a way that it requires both
iceberg_quantity
andiceberg_legs
to be sent from the frontend.You can use this logic for iceberg_quantity calculation