Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid Error 429 Too Many Requests when loading large inventory #265

Open
Mr-VIT opened this issue Apr 17, 2021 · 6 comments
Open

Avoid Error 429 Too Many Requests when loading large inventory #265

Mr-VIT opened this issue Apr 17, 2021 · 6 comments

Comments

@Mr-VIT
Copy link
Contributor

Mr-VIT commented Apr 17, 2021

SteamCommunity.prototype.getUserInventory:

get(inventory, currency, body.more_start);

maybe it is worth adding a delay? I don't know the exact rate limit to avoid 429

setTimeout(get, DELAY, inventory, currency, body.more_start);
@DoctorMcKay
Copy link
Owner

If you're getting rate-limited, it's because you're requesting too many inventories from the same IP. Requesting multiple pages of the same inventory would not cause a rate-limit (except perhaps hugely massive inventories), since obviously nobody would be able to load the inventory from their browser.

@Mr-VIT
Copy link
Contributor Author

Mr-VIT commented Apr 18, 2021

I load only 1 inventory and on ~15 page hit 429 error

@DoctorMcKay
Copy link
Owner

Please try getUserInventoryContents instead.

@Mr-VIT
Copy link
Contributor Author

Mr-VIT commented Apr 21, 2021

few days ago getUserInventoryContents endpoint was broken (may be still broken for some) for many invenories with error EYldRefreshAppIfNecessary failed with EResult 55/20, but old endpoint works.

Steam still uses /json/ endpoint for trade offer making window

@DoctorMcKay
Copy link
Owner

Parts of Steam break all the time. getUserInventoryContents is more stable than getUserInventory since it's not rate-limiting you when you try to load a large inventory. If the GC goes down, then naturally getUserInventoryContents isn't going to work when it tries to contact that GC. The old endpoint is likely just serving up its stale cache when it can't contact the GC, which means it's giving you outdated information without any indication that it's outdated.

If you can tell me exactly what delay prevents you from getting rate-limited, and if it's a reasonable length of time, then I'll consider adding it. I'm not going to spend any of my personal time updating a deprecated, unstable endpoint though.

@nolddor
Copy link
Contributor

nolddor commented Nov 4, 2022

Steam changed once again rate-limits, see existing PR on node-steam-tradeoffer-manager

DoctorMcKay/node-steam-tradeoffer-manager#330

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants