Auction House update timings

API Discussion
How has everyone gone about making sure their auction data is as up to date as can be?
(Looking particularly at the US Auction data here)

From my what I can gather the updates appear to happen sequentially one after the other in 2 groups, 60 houses in 1 group, 59 in the other. Each house appears to be updated about 1 minute apart from each other meaning group 1's auction houses are updated every hour whilst group 2's auctions houses are updated every 59 minutes.

I thought I had deducted an order of which the houses were being updated in but that order seemed to go out the window when they API went down last.

Have I misinterpreted something here? Or am I looking at it in the wrong way?
Looking at this with fresh eyes, when I generate a list of modified times for each realm it looks like each house could be updated sequentially, but the timing between each house changes.
  • house gets updated
  • 55 seconds pass
  • house gets updated
  • 5 seconds pass
  • house gets updates
  • 55 seconds pass
  • house gets updated
  • 5 seconds pass
  • etc

Is anyone aware of the order of the houses always stays the same?

I could probably re order my list prior to each call but just wanted to see how others have tackled this.

Edit: Looking again, I am leaning more towards my initial thoughts, two sets of auction house groups. One group whose houses updating once every hour and another whose houses update once every 59 minutes.
After checking erorus' page @
It would certainly appear that some updates are done every 59 minutes whilst others are 60 minutes.

I guess my confusion lies with how to determine which auction houses fall into which group without manually reviewing a snapshot of each realm and manually creating a new order from that information. I did this initially but after the recent API outage this order went out the window.
The method that TUJ uses doesn't try to establish an order of realms, or attempt to determine which update "group" each realm is in. It operates on one assumption: when the system is working, the interval between snapshots for any given realm is consistent.

Pick a realm, say, Sargeras. Pretend we don't know the interval or where it's at yet. We'll assume the interval is 2 hours.

It's 1:00 now. We download the snapshot. It was dated at 12:15. Since we assume the interval is 2 hours, we expect the next snapshot at 2:15. We wait.

2 minutes early, at 2:13, we check the snapshot date again. We expect it still to say 12:15, but to our surprise, it says 1:15. We adjust our Sargeras interval down to 1 hour, and expect the next snapshot at 2:15.

2:15 rolls around, and we check the snapshot. A new one was posted at 2:15 as we predicted. We expect the next snapshot at 3:15.

2 minutes early, at 3:13, we check the snapshot date. As we expected, it's still saying 2:15, so we wait for our predicted date.

We continue this way, establishing the minimum interval between snapshots by checking slightly earlier than the prediction, and if we see that another snapshot was done between our checks, we drop that interval down to the distance between those last 2 snapshots.

Our check interval becomes the smallest distance in time between snapshots that we observed in the past 72 hours.

Now, let's say that the AH starts acting up, and Sargeras starts generating snapshots every 90 minutes instead of every 60. We check at 4:15, but it still has 3:15's snapshots. We'll continue to check every few minutes, perhaps with some exponential back-off. (TUJ checks every 5 minutes after an expected snapshot for a while, then moves up to every 15 minutes after.)

Eventually we notice 4:45's snapshot. Our minimum interval is still an hour, so we'll expect the next one at 5:45.
5:43 comes along, we do our "early?" check, and still see 4:45's, no surprise there.
5:45 comes along, still the old snapshot of 4:45. 5:50, 5:55, 6:00, 6:05, all show 4:45's snapshot. Eventually we see 6:15's snapshot, which was 90 minutes after the last one, but we'll continue to check hourly after the last snapshot until the minimum interval over the past 72 hours becomes 90 minutes.

All that is just one realm. If you're tracking multiple realms, each has its own interval timer and we just check it when it's scheduled to be checked next.

The logic for all this can be found here:
There's a lot of extra stuff in there for handling the various kinds of errors you can get from the API, and I admit it's not very easy to follow, but it's there if you're curious.
Thank you very much for the detailed response. I'll be sure to check your git for any future queries I have relating the AH API.

Update Edit: Just wanted to say thanks again, I've been able to do a rough implementation based off your explanation.

Join the Conversation

Return to Forum