Incorrect Timeout rate API.

Sort:
stephen_33

Ok but "the match endpoint"? I can't think of any process of calculating the timeout rate for the player I highlighted that can possibly give a result of 100%. What data is being used to produce that, a different player's perhaps?

The only explanation that might make some sense is if the values in the match endpoint have become frozen and reflect a state many months ago when the player did have some timeouts.

Martin_Stahl

My understanding is it was pulling data fed from the new process which is calculated differently so ends up not being what the stat is. I don't know the specifics, just that the update to the stats endpoint were made to take advantage of that data.

I had assumed the match endpoint was being fed from the stats one, but that doesn't seem to be the case.

Tricky_Dicky

Looks to me as though another change on the Web page stats is that Standard daily and C960 daily TO's may also have been seperated. That is also not reflected in the API currently.

Here is an example https://www.chess.com/member/sacrificethehorse

Tricky_Dicky
stephen_33 wrote:

At the other extreme:-

Same match: https://api.chess.com/pub/match/1666315

"username": "alexandru1001", "rating": 1170, "timeout_percent": 100

..but here: https://api.chess.com/pub/player/alexandru1001/stats

"timeout_percent": 0

which seems to correspond with the webpage (no value given)

How is it possible that the value given in that match can indicate 100% timeout rate when the player actually has a zero rate? You have to go back to 5/Nov. of last year to find a single timeout!

The value given in the match is complete garbage.

The 100% looks to be C960 only

https://www.chess.com/games/archive/alexandru1001?gameTypesdaily%5B%5D=chess960&gameOwner=other_game&gameType=daily&timeSort=desc

Martin_Stahl

Good catch.

Pawnlings

Pawnlings

I've been talking to a staff member for a bit that's talking to the devs. He confirms what the assumption is it seems.

stephen_33

What are we to make of this case? ...

https://www.chess.com/member/insilicoheart

All the games of @InSilicoHeart from January of last year are shown as timed-out, so my maths gives 100% for that but the webpage clearly indicates a timeout rate of just "39% Last 90 days".

The player's stats endpoint gives "timeout_percent": 30 for Standard and "timeout_percent": 35 for Chess960.

From this match: https://api.chess.com/pub/match/1662993

The timeout rate here agrees with the webpage: "timeout_percent": 39

Which figure can be safely used to determine a player's actual rate of timeouts because all of these seem to be wrong?

Tricky_Dicky

This is getting silly. The problem now is the time line.

In the example:

For daily std it's 11 TO's from 28 completed games in the last 90 days = 39%

For daily c960 their are no games in the last 90 days. So the logic seems to be go back to the last 20 completed games. There are only 17 total in archieve with 5 TO's so = 35%

These are the figures posted in API . For Daily std that agrees with Web page.

However Web stats don't display a daily C960 TO value.

Conclusion. If their are 20+ games in last 90 days archive then API with agree with Web stats

If not then there is no way to x-check.

Not clear what will be displayed for Web if there are 20+ games but outside the 90 days window.

stephen_33

Not sure what happened there because when I looked at the Daily games of @InSilicoHeart yesterday they were all shown as timed-out on the first page and they went back to last year.

Now when I look, hardly any are timed out. This site is starting to resemble a hall of mirrors.

Tricky_Dicky

From the first lines of the spec.

The PubAPI is a read-only REST API that responds with JSON-LD data. Our goal is to re-package all currently public data from the website and make it available via the PubAPI. 

There seems to a drift away from this principle. It is no longer completely a reflection of the web pages.

stephen_33

Richard, the API has never truly abided by that principle since the start.

For example, every player in a team match in the registration stage displays their Daily rating and the match endpoint provides the same rating.

But while every player in a team match in the in_progress stage displays their Daily rating, the endpoint does not provide that rating. Why? I've never understood this and it's caused me a headache since I started using the API.