Retrieving Limited Item RAP Data Into Game

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)
1 Like

For the price you can just do this:

local id = 21070012
local asset = game:GetService("MarketplaceService"):GetProductInfo(id)

print("Current Price".. asset.PriceInRobux)

For the RAP however, you’re going to need to use an HttpRequest:

2 Likes

This will provide the original price, not the current price.
Thank you for your help

1 Like

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

prints:
image

Actual Rap:

image

6 Likes