You can fetch the data rquired from graphql.
This query would provide the mot up to date & the first ever data.
This data could be used to calculate the average liquidityRate since inception.
paramsHistory(first: 1, orderDirection: asc, orderBy: timestamp){
lastUpdateTimestamp: 1611926412,
liquidityIndex: "1031830159181667334741382194",
variableBorrowIndex: "1048002659480593195934069307",
liquidityIndex: "1021187617641523092754480830",
variableBorrowIndex: "1034162815675781948442542345",
const archivedRate = calculateAverageRate(
result.paramsHistory[0].liquidityIndex,
result.paramsHistory[0].timestamp,
result.lastUpdateTimestamp