Usecase example

gully
Let me explain the use case flow

I execute a order of a particular scrip,lets say Sbin @43 intraday(BO).
I execute again the same scrip SBIN @42 intraday(BO).

With PI/Nest as a trading terminal I have seen that the ADMIN position usually would combine this two order and show the P/L based on the average price of both the order. Is this the same case here for Kite? - I assume that it would be so since at the run time you are using the same component.

My next part of the question is if I assume the above premise as True, then is there any way from the API I get to see the admin position of the particular order explained in the above scenario? Also if yes then what is the mechanism. I poll with the order id for the admin position?(Your server would crash for sure) or web-socket is to the rescue?
  • Kailash
    That's correct. The net position shows you a combined value.

    It's not possible to see the P&L of an order, but the /positions API gives you a set of "day" entries (https://kite.trade/docs/connect/v1/#positions) that give you statistics for the day's positions. Maybe that'll be useful. If you enter any positions tomorrow, look at the "day" entries and see if they help.

    To do any sort of live P&L, you should use streaming prices from the WebSocket. Polling is not recommended.
Sign In or Register to comment.