local MarketplaceService = game:GetService("MarketplaceService")
local assetId = 26011378
local productInfo = MarketplaceService:GetProductInfo(assetId, Enum.InfoType.Asset)
print(productInfo.PriceInRobux)
It returns 7 which is the original price of the limited, how would I get it’s recent average price? I used the catalog api system it worked in the website but I don’t know how to log it in studio so I found a way to log an items price with marketplace service, but it only returned the original price. How would I get the recent average price? (RAP)
I am not sure if its possible or not to be sincere, but using the HttpService maybe you could get a jSON file with all the data you need for the specified limited.
if data then
local averagePrice = 0
for i, v in pairs (data["data"]) do
if data["data"][i]["recentAveragePrice"] then
averagePrice += data["data"[i]["recentAveragePrice"]
end
end
end
local Success, Result = pcall(HttpService.GetAsync, HttpService, Endpoint:format(UserId))
local Response = HttpService:JSONDecode(Result)
local TotalRap = 0
for i, Asset in pairs(Response.data) do
TotalRap += Asset.recentAveragePrice
end
print(TotalRap)