api for live chess ratings

Sort:
Oldest
chuckmoulton

I checked the API documentation and looked at a few examples.  As far as I can tell, stats does not include live chess ratings -- at least, not for many variants.  Game monthly archives does include live chess ratings.

If I wanted to write a bot that would query my bughouse rating, it seems like I would need to use the API that downloads all games for the month to find that rating because of the omission in the stats API.  Is that correct?  So if I write a bot for Twitch that lets people type !rating in my chat to get my current bughouse rating, will I need to download all my games for the month every time?

skelos

https://www.chess.com/news/view/published-data-api#pubapi-endpoint-player-stats

 

chess_blitz is documented.

chess_bullet and chess_rapid appear not to be. I'll not that in the thread for minor documentation errata.

It's usually a good idea to check via a browser or print the complete result you're getting if you suspect something is missing.

 

https://api.chess.com/pub/player/dj_haubi/stats

{"chess_daily":{"last":{"rating":2203,"date":1559151203,"rd":45},"best":{"rating":2263,"date":1438772340,"game":"https://www.chess.com/daily/game/108786258"},"record":{"win":2271,"loss":959,"draw":1240,"time_per_move":8753,"timeout_percent":0},"tournament":{"points":166,"withdraw":1,"count":5,"highest_finish":1}},"chess960_daily":{"last":{"rating":1957,"date":1559064389,"rd":53},"best":{"rating":2099,"date":1531849340,"game":"https://www.chess.com/daily/game/189222740"},"record":{"win":606,"loss":224,"draw":299,"time_per_move":8753,"timeout_percent":0},"tournament":{"points":166,"withdraw":1,"count":5,"highest_finish":1}},"chess_rapid":{"last":{"rating":2298,"date":1438851159,"rd":103},"best":{"rating":2458,"date":1415702037,"game":"https://www.chess.com/live/game/1002243954"},"record":{"win":15,"loss":7,"draw":3}},"chess_bullet":{"last":{"rating":2491,"date":1533920800,"rd":158},"best":{"rating":2491,"date":1533920800,"game":"https://www.chess.com/live/game/883237025"},"record":{"win":845,"loss":92,"draw":25}},"chess_blitz":{"last":{"rating":2523,"date":1553283726,"rd":102},"best":{"rating":2529,"date":1531160570,"game":"https://www.chess.com/live/game/2929631194"},"record":{"win":824,"loss":368,"draw":151}},"tactics":{"highest":{"rating":2715,"date":1553347606},"lowest":{"rating":1938,"date":1405082851}},"lessons":{},"puzzle_rush":{"best":{"total_attempts":38,"score":35}}}
bcurtis

chess_daily, chess960_daily, chess_rapid, chess_bullet, and chess_blitz all show in the linked API endpoint and match the stats on that player's member page. Is the problem just the missing variant ratings?

chuckmoulton

Yes.