How to get/calculate the Moving Average value of any stock/index?

We get history data and intraday data stream, but is there any library or SDK to get the range moving average. Or any formula to calculate 20 EMA/ 9EMA?

Thanks for reaching out.

The Upstox API does not offer an SDK for the specified objective. You might consider looking into alternative solutions, such as GitHub - TA-Lib/ta-lib-python: Python wrapper for TA-Lib (http://ta-lib.org/)., which offers support for technical analysis.