1. XenoPyax

    XenoPyax New Member

    hey Hypixel'ers,

    I am trying to get all active auctions so I can sort them and save them but i dont seem to understand how I can get all the page ,with this method I am getting only 2 pages and the pageNumber is different everytime. Anyone that can help me with this I dont want to write my own API for this if I dont have to.
        public static void startSkyBlockMarketUpdater() {
            marketTimer = new Timer();
            marketTimer.scheduleAtFixedRate(new TimerTask() {
                public void run() {
                    Main.getHypixelAPI().getSkyBlockAuctions(0).whenComplete((a, b) -> {
                        //TODO: get Data an write to DB
                        JSONFile jsonFile = Main.getTempMarketFile();
                        for(int page = 0; page < a.getTotalPages(); page++) {
            }, 0, 120*1000);
  2. Auctions are constantly changing, and to avoid performance issues, the API keeps a local cache of auctions that is refreshed frequently (approximately once per second)
    There is various metadata available in a response. I would recommend sending a single request to the auctions endpoint, and then use the totalPages value from that response to request all those page requests simultaneously. If you want to play it safe, request a couple pages over the total pages count as well.
    • Like Like x 1

Share This Page