iceberg api confusion

jits_1998
hi,

please help me confirm the following parameters will work for both nifty (50) and bank nifty (15).

leg_count = orderInputParams.qty//750+1
...
to api:
iceberg_legs = leg_count,
iceberg_quantity = 750,
quantity=orderInputParams.qty,

I keep getting all kinds of errors when i try to have different config for iceberg orders. I know for Nifty it will place extra orders, i am good with it for now.

Thanks.
  • jits_1998
    i am getting invalid iceberg quantity for nifty. total quantity is 1050
  • jits_1998
    someone please help with formulas

    i am sending order for 1050 quantity nifty, iceberg_legs = 2, iceberg_quantity = 450

    tried with iceberg_quantity = 600

    either it says quantity is invalid or iceberg_quantity is invalid.
  • jits_1998
    @sujith can you please help
  • jits_1998
    looks like the validation on iceberg_quantity is that it should be nearest multiple of lot size for total quantity / leg count
  • sujith
    You may try this formula
    s = quantity / Max(legCount, 2)
    iceberg_qty = (s/lotSize).ceil() * lotSize
  • sutolani@gmail.com
    What further checks are needed...For eg, hypothetically, if I want to Sell 1500 Contracts of MIDCAPNIFTY in 3 legs, with above formula, Iceberg Quantitiy comes as 500....but 500 is NOT a mutilple of 75 which is the midcapnifty Lot Size....
  • sujith
    The first check should be to check if the quantity being sent should be a multiple of lot size.
Sign In or Register to comment.