I found this on the Dev Fourm, but I am not sure on how to retrieve the current price it is selling for and also the RAP/Average price of a limited item.
Any ideas on how I could do it?
This is what I have so far and what I am looking for
local id = 21070012
local asset = game:GetService("MarketplaceService"):GetProductInfo(id)
print("Name: ".. asset.Name)
print("Item ID: ".. asset.AssetId)
print("Sales: ".. asset.Sales)
print("Original Price: ".. asset.PriceInRobux)
--Example of what I'm looking for:
--print("Current Price".. asset.Price)
--print("Average Price (RAP): ".. asset.AveragePrice)
--print("RAP After Sale: ".. asset.RAPAfterSale)
Like this. Change the numbers in the url to the desired item id.
local HTTPService = game:GetService("HttpService")
local URL = "https://economy.roproxy.com/v1/assets/1285307/resale-data" -- sparkle time fedora
local Success, Error = pcall(function()
local Data = HTTPService:GetAsync(URL)
Data = HTTPService:JSONDecode(Data)
print("Rap: " .. Data.recentAveragePrice)
end)
if not Success then
warn(Error)
end