How to show graph with current position of stock price and past position to show in graph

to show graph for each individual stock with its latest ltp and performace through out day which api should i use. what should be the minX maxX, minY maxY value should be

Thank you for reaching out.

To retrieve past trades, you can use the Holdings API: Get Holdings | Upstox Developer API. For current-day data, please utilize the Positions API: Get Positions | Upstox Developer API.

For the latest stock prices, you can access the LTP (Last Traded Price) through the market data WebSocket: Market Data Feed | Upstox Developer API. You can then calculate the profit from the purchase price with the current stock price.

I hope this information is helpful.