Hello all, i want to convert only product type of my position via api call and got the funtion which is convert_position(), we need to pass following parameter in that
in above parameter we get exchange,tradingsymbol,quantity,and product from position book. where to get position_type, transaction_type to pass in the function for that position. @sujith@rakeshr
The position type can be either day or overnight. Following are the steps, 1. Use the positions list from net array of positions response. 2. The formula for checking if it is day or overnight position_type, if you have only one type of Qty i.e either day or overnightQty, is as follows
But, if you have both overnight and day qty as well, then it will be something like: 1> If you want to convert only overnight_quantity, then you will have to use position_type = overnight 2> If you want to convert only day qty, i.e qty-overnightQty, then you will have to use position_type= day.
day
orovernight
.Following are the steps,
1. Use the positions list from net array of positions response.
2. The formula for checking if it is day or overnight position_type, if you have only one type of Qty i.e either day or overnightQty, is as follows But, if you have both overnight and day qty as well, then it will be something like:
1> If you want to convert only
overnight_quantity
, then you will have to useposition_type = overnight
2> If you want to convert only
day qty, i.e qty-overnightQty,
then you will have to useposition_type= day
.The transaction type can be either
BUY
orSELL