The reason I ask this is because the "Convert Position" API requires a value for transaction_type (BUY / SELL).
Each Position returned by the Positions API is the consolidated transactions for a Single (Unique) Instrument. It is easy to determine if a Position can be converted by checking the "Quantity" value to ensure that it is greater than 0 (Net Position). For Open Positions (Quantity > 0), the buy_quantity field can be compared to the sell_quantity field and LONG / SHORT can be determined.
As per my understanding, the buy_quantity is the sum of overnight_quantity and day_buy_quantity for LONG positions. Since there is no sample given for an overnight SHORT position, I am not sure of what values to expect. If I SHORT 1 Lot NIFTY FUT (or OPT) as CNC, then will we have the following values?
Net Position Day 1 - SHORT 1 Lot NIFTY FUT (Near Month)
quantity = 1
day_buy_quantity = 0
buy_quantity = 0
day_sell_quantity = 1
sell_quantity = 1
overnight_quantity = 0
Day 2 - No Transactions on NIFTY FUT (Near Month)
quantity = 1
day_buy_quantity = 0
buy_quantity = 0
day_sell_quantity = 0
sell_quantity = 1
overnight_quantity = 1
Day 3 - BUY 1 Lot NIFTY FUT (Near Month)
quantity = 0
day_buy_quantity = 1
buy_quantity = 1
day_sell_quantity = 0
sell_quantity = 1
overnight_quantity = 1
Would you please confirm this? The only other way to confirm this is to actually take a SHORT FUT / OPT position overnight and check the JSON response payload - a rather expensive affair
Each Position returned by the Positions API is the consolidated transactions for a Single (Unique) Instrument. It is easy to determine if a Position can be converted by checking the "Quantity" value to ensure that it is greater than 0 (Net Position). For Open Positions (Quantity > 0), the buy_quantity field can be compared to the sell_quantity field and LONG / SHORT can be determined.
As per my understanding, the buy_quantity is the sum of overnight_quantity and day_buy_quantity for LONG positions. Since there is no sample given for an overnight SHORT position, I am not sure of what values to expect. If I SHORT 1 Lot NIFTY FUT (or OPT) as CNC, then will we have the following values?
Net Position
Day 1 - SHORT 1 Lot NIFTY FUT (Near Month)
quantity
field of net positions.I asked a very specific question about SHORT overnight positions that is not covered in your documentation.
This is an opportunity for you to answer that question and improve your product documentation.
Please confirm whether the scenario outlined above is correct or not. And if not, what is the correct payloads.