I need to know how to get or retrieve latest price at which order is placed from order or position API, as i thought from position API [average price] column it gives the latest entry price weather it is long or short but it gives the total average price of the day, for e.g today i placed two order for ICICI bank 1) sell order at 09:30 @ 631.40 and 2) sell order at 11:00 @ 630, so to calculate the 2nd order pnl i need the entry price of 630, but in API position it is giving me total average price, whereas in the API order i can see that in average price it shows the price i need , but when i'm retrieving the price i'm getting two prices.
but when i'm retrieving the price i'm getting two prices. So how to get the latest entry price.
Are you filtering the above order detail from the complete order book history API? If yes, then you can know about the latest entry order from the respective order_timestamp field. You can check all order response fields here.
If yes, then you can know about the latest entry order from the respective
order_timestamp
field. You can check all order response fields here.