HypixelDev / PublicAPI

Official Java implementation of the Hypixel Public API.
https://api.hypixel.net
MIT License
533 stars 151 forks source link

Skyblock Auctions API incredibly over complicated. #380

Closed mikuhl-dev closed 3 years ago

mikuhl-dev commented 3 years ago

The newest auctions are on the last page. Meaning you have to request page 0 to find out what the last page is. To find changes in auctions you have to request EVERY SINGLE PAGE to see what has changed. Cloudflare caches each page every 60 seconds, depending when OTHER USERS requested the page after the cache expired. With the internal updates every 60 seconds, pages can be up to TWO MINUTES delayed. Let alone if you request all pages in one go, you will have pages from different updates because each page is cached on THEIR OWN TIMER.

If the auctions were reversed, that means you would reduce requests from ~60-80 requests PER MINUTE to about 1 or 2, having to only request page 0 and up until you find something you already seen before. Even better, when auctions get updated in some sort of way, if they are then bumped back up to the front with an update timestamp, you then only have to request page 0 and up until you find something with an update timestamp greater than when you last checked.