Lets say, I am doing MIS Futures BUY or SELL, is there a way to know, if it was a BUY or SELL order I had placed in this code... PositionResponse posResponse = kite.GetPositions(); List dayPositions = posResponse.Day;
foreach (Position dayPos in dayPositions) { // BUY or SELL ?? }
In dayPosition, is there a way to know originally, if it was a BUY or SELL order?
There is no way to find if current position is a result of BUY or SELL order. However, you may check if the position is long or short using quantity field. Additionally, each position has buy quantity and sell quantity field, maybe you can associate buy or sell order at your end.
quantity
field.Additionally, each position has
buy quantity
andsell quantity
field, maybe you can associate buy or sell order at your end.