How to get a limiteds product info?

I think It’s should be In #help-and-feedback:scripting-support

1 Like

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.

Thank you for telling me, changed.

I used http service and it gives me all the info I need, I just don’t know how to return it properly into a script.

Hey, here is a topic that explains it better!

As I know you CAN NOT send requests to Roblox. But you can use proxy. Read more about it here!

Alrigth using the information I found from there, I got to this point.

I don’t know exactly how to get the rap from that, but the data gave me this when I printed it:

image

How do I refer to data > 1 > recentAveragePrice?

data[“data”][1][“recentAveragePrice”]

Alright, thank you. How would I add each ones recentAveragePrice?

My code now:

Try this:

local total = 0
for i = 1, #data["data"] do
   pcall(function()
      total = total + data["data"][i]["recentAveragePrice"]
   end)
end

after that return total and print it

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

That doesn’t return anything for some reason.

This one returns them all individually still even when I return and print it.

What do you mean? It’s not supposed to return a value

Oh my bad, I added a print to it and it prints, it just still returns them all individually for some reason. image

Print the averageprice, not the iteration value

I am printing the average price.image

you are printing it every iteration

print it outside of the loop.

also clean up that loop code -_-

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)

OHHH, excuse me, I didn’t know the definition of iteration :smile: thank you!

Also something interesting, it prints only the last ones rap. Not the combined rap.
image (My combined rap is around 14k+)

Current code:

local HttpService = game:GetService("HttpService")

local UserId = 1397701424
local Endpoint =  "https://inventory.rprxy.xyz/v1/users/%d/assets/collectibles"

local success, result = pcall(HttpService.GetAsync, HttpService, Endpoint:format(UserId))

local data = HttpService:JSONDecode(result)

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
	
	print(averagePrice)
end