I was testing out my Java son trying to crash it and it seems I crashed something else. https://www.chess.com/club/matches/734460 This match appears as "in_progress" when the two games it has have finished. https://api.chess.com/pub/match/734460 Is this something rare that happens from time to time?
NichtGut Oct 8, 2018
For some users, there are no PGN's in the monthly archive games for 2017/07 Two such cases are: https://api.chess.com/pub/player/propugnator2/games/2017/07 https://api.chess.com/pub/player/walidmujahid/games/2017/07 PGNs for the months before and after the 7th month do seem to exits, though.
Tricky_Dicky Oct 3, 2018
For a very informal test, I ran a script that checks currently just shy of 300 accounts to see if any are closed. Very little disk I/O, just read the list. From api.chess.com, fetch the profile for each account to check the current status. My two tests used the same Wi-Fi(*) access to the same ADSL2+ modem to the same ISP (no VPNs this time around) and from all the way across the Pacific (although in case anything is cached on first lookup, I ran a warm-up). I ran tests on a Rasperry Pi 3B+ (ARM quad-core 1.4Ghz processor) and an older MacBook AIr (i7 processor of some vintage, dual-core, 2Ghz). No significant difference in wall-clock time, as expected. My current belief remains that my scripts wait on responses from api.chess.com, and for any substantial performance improvement at my end I am going to have to cache more aggressively. Wall clock time: ~2 minutes User CPU: ~7s (Raspberry Pi); ~2s (MacBook Air) Kernel CPU: .01-.02s in favour of the MacBook Air. Totally negligible w.r.t. the wall-clock time. The script is single threaded and waits on one response before making the next but retains a HTTP/1.1 SSL connection. This is not a terribly rigorous test, but I was interested to see how the Raspberry Pi handled the task. (I'm considering sitting one on my desk as an "always available" desktop machine which doesn't have either fan noise or disk noise. Back in the day I ran my desktop PC diskless and with an ultra-quiet power supply; I hate computer noise. So yes, I have a neat new toy. ) (*) The Wi-FI I don't think was the limiting factor, although it is only 2.4Ghz "N" and not 5Ghz "ac". I am making do with a second hand ADSL2+ modem I thought for a few weeks, but the Australian National Broadband Network roll-out has been delayed a year where I live. When I used 5Ghz "N" all I noticed was less reported signal strength. What I honestly care about is what content distribution networks make available locally, and after that international bandwidth.
If a program is written to work with different versions of Windows, such as 7, 8 and 10, will it work on a windows server edition ?
Christopher_Parsons Sep 30, 2018
After two weeks of ignoring OOP laws, good coding practices and thread safety I managed to put together a chess.com app designed to help club admins manage their club. It provides information about matches. I decided to share some snapshots of it and the data it processes. I released as a Beta so people think the app is bad because its a beta and not because I dont know how to program in Java. (I definitely know how to, thats why they call me Lil Gosling) If you want to try out here is the link to the .jar file https://github.com/AntonioBohne/Chess.com-ClubManager/releases It basically processes matches. Finished matches, current matches and registered match. Finished Matches Gathers the 10 last matches you played. Shows how many were lost, won and drawn. Displays results your club had with the black and white pieces (how many losses, wins and draws). It also shows you how many matches were lost due to checkmate, resignation and timeouts. It gives you a list with all players that timed out in their games and by just double clicking their name your browser will open the game where they timed out. Current matches Gathers ALL current matches and again shows all the previously mentioned information for both colors. How many losses, wins, draws and how many games are still being played. Also shows the players that have timed out and again, by just double clicking on their name you get sent to their game. (Next update will ban them if you click on their name 3 times). Registered matches Gathers ALL registered matches and shows the average users you have per match vs the average users your opponents have. Also compares average timeout percentage of all matches vs your opponents average timeout percentage. Finally compares the average rating of all matches vs the enemies average rating. You can also filter ALL your players from ALL matches by timeout percentage. If you want to see which players have a timeout percentage bigger than 10% you can also do it! And double clicking on their name will send you to their profile so you can corroborate that horrible 100% timeout percent is not a lie. And here are the snapshots. I tried to use .css blessings to give it a sleek material design feel so that everyone focuses on how good it looks (looks good to me) and not how my code is write only. Initial window Menu (the green letters means the app was able to find the club) Dashboard for finished matches (if you click on a slice it will show its value!) List of players that timed out Dashboard for current matches: 2170 games for each side? That explains why it took a little bit more than a minute to load... Show me the matches you analyzed Java Future matches dashboard Filter players by timeout percentage Two people with a timeout percentage bigger than 30. Nicht GUT! And if you do not want to wait for ALL matches to load just type the match ID. First ever chess.com match... The end
There is a member with the account name "@lph@" (at-lph-at). https://api.chess.com/pub/player/@lph@ This api.chess.com page can’t be found It may have been moved or deleted. HTTP ERROR 410 The player does exist: https://www.chess.com/member/@lph@ While the name is sub-optimal for V3 with the leading "@", api.chess.com should handle it, or if it can't and it's a very big deal to do so, perhaps the member could be persuaded to change the username. The player is using a free account; a few months of a premium account might be a sweetener if a username change is desirable.
A lot of people were asking for it. They wanted something great, something beautiful. Admins all over the world wanted an easy way to manage their Live Matches. Chess.com bureaucracy had added a great feature, live chess matches, but without Nichgut´s help they weren't able to release a JSON API for it. I am still waiting for erik to hire me so I can bring the JSON API for Live Matches to reality, in the meantime I summoned the powers of Java, the powers of beauty, and I came up with a Live Match Manager application for the masses. This app gathers ALL live matches from a certain club and allows you to save them into an Excel sheet. How convenient! I reused the look and feel from my previous Club Manager and implemented a beautifully scraper with JSOUP. Over 3 scraping classes with lots of methods and 4 data objects, all without comments. HOW BEAUTIFUL. The best part, its Open Source, which means you can enjoy it all while I sink into poverty! This one goes for you Richie Stallman! For the ones who dont appreciate my bad attempts at programming jokes here is the app working: For this example I decided to use Team Nicaragua. Since @El_Iniciado was the one that started it all by making a thread about it. If you dont want to gather all 24 matches from Team Nicaragua you can just write "10" for example and the program will gather the 10 most recent matches. If you leave it empty it will analyze ALL matches. Once the information is gathered the "Write Data" button will lightup so that you can select where to save your Excel Sheet Click on it and a beatiful popup will appear: No idea why the menu is in Spanish, my chess.com flag says Im from Deutschland! And finally. Open it and you get this. Tears of joy come out every time I see my creation: You can download the app from here: https://github.com/AntonioBohne/Chess.com-Scraper/releases Big thanks to Ritchie for creating C.
... or something like that. I have written a simple bash script that web-scrapes a player's current published supplement off of an alternate USCF rating lookup page. Any feedback would be appreciated. Link: https://github.com/DarthFloopy/CLI-Chess-Rating-Getter
We currently play a live chess league between national clubs of America, we have: Team Canada, Team USA, Team Mexico, Team Nicaragua, Costa Rica Live Chess, Team Puerto Rico, Team Dominican Republic, Team Venezuela, Team Peru, Ecuador Live Chess, Team Colombia, Argentina Live Chess, Chile Live Chess and Team Brazil Live. Our league is called Live Chess Pan-American League (LCPAL). The tournament format is a double robin hood system (all against all - twice), as in football, roundtrip. Per week each team plays 1 match, in total I have 7 matchs per week, for a duration of 8 1/2 months. Blitz mode 5/2, but next year we will add another time control (10/2 or 3/2, maybe). So, to define the teams' places at the end of each week, we do it in the following order: 1.- Sum of points 2.- If there is a tie of points, we use the Tie Break SB (Sonneborn-Berger) allots each player the total score of the players he defeated, half the score of those he tie, and nothing for the games he lost. 3.- Difference of total points: Points won - points lost, in all its games. Currently all calculations are made with excel formulas. This is an image of the weekly score (example): My wish list would be: 1.- Put the id of the match (every week) and that the system generates the score of the teams. 2.- Do a recalculation of the points of each game, for the closed accounts. 3.- Generate the final report. But, progress is made step by step, so any help in this process would be welcome.
Hi, I have noticed a couple of possible bugs/inconsistencies. This relates to my archive : https://api.chess.com/pub/player/djcaf/games/2018/07 Item #15 which should be for the game https://www.chess.com/daily/game/192749730 My rating was apparently (according to the web site, i.e. not the API) 1354 when the game ended If you download the PGN from the web site then the following ratings are returned: White: 1053 Black: 1354 The PGN data in the returned JSON for this game gives: White: 1071 Black: 1348 That is the first issue (inconsistency). Also in the JSON there are two fields for this game: White and Black. Under each is the rating; In this case; White > Rating: 1053 Black > Rating: 1354 Those match the rating after the game has been completed. The documentation (https://www.chess.com/news/view/published-data-api#pubapi-endpoint-games-archive) suggests those should be the rating at the start of the game. I am no bothered which way that works, but it seems that this is also an inconsistency. Thanks
Hey all, I just finished up this little app to visualize all of your chess games from chess.com. It provides info on opening frequency and piece counts per move for each game in an easy to digest series of graphs. Hope you give it try and give some feed back on what you would like to see more of! (ps. it might be a tad slow if you have a lot of games > 2000, so you might have to be patient, I'm currently working on improving performance) https://github.com/Bmcgarry194/chessvision Here is a gif of the app in action:
Hello guys, to speed up my learning process I wanted to download my pgn files to analyse it with an engine. Now i think i made too many calls to the API while testing, because I got an "Attempt to use a forbidden header was rejected: cookie" error and my IP got blocked. Now to my questions - Is there some way to be able to use the API again? - How can I avoid doing this again while testing my code?
andreamorandini Sep 11, 2018
This is something I've been mulling for a while. It's clearly not critical, but with the enhancement request for clubs by club_id and players by player_id, I'll send in the enhancement request and worst is I hear "No." Or "Well, probably not and we think it's low priority." Now and then someone provides a URL for one or more games. To get the PGN for that game or games, go to the website, select download and then in the pop-up select and copy or download according to preference. It would be "hands free" to download a game by ID/UUID. My first choice I think would be to get the full JSON for the game (programatically it's easy enough to ignore everything but the PGN if that is all that is wanted) and second choice to receive only the PGN.
https://www.chess.com/news/view/published-data-api#pubapi-endpoint-match-board The team match board endpoint is documented to contain a "team" element for each player in each game with its value being the url of the team the player played or is playing for in the match. 1. It's unclear if I should expect https://api.chess.com/. or https://www.chess.com/.. 2. Whatever I should expect, I'm not getting the "team" element at all. (Workaround: use the list of players from the team match endpoint, which I already have, instead of comparing on team @id or url, both of which I also have.) Documentation: https://www.chess.com/news/view/published-data-api#pubapi-endpoint-match-board { "board_scores":{ ... }, "games": [ { "white": { // details of the white-piece player: ... "team": "url" // url to club's profile },...} Example output: https://api.chess.com/pub/match/893502/1 {"board_scores":{"lrj2011":2,"impractical":0},"games":[{"url":"https://www.chess.com/daily/game/194799652","pgn":"[Event \"TMCL 2018 A1 R5 - Board 1\"]\n[Site \"Chess.com\"]\n[Date \"2018.05.15\"]\n[Round \"-\"]\n[White \"lrj2011\"]\n[Black \"Impractical\"]\n[Result \"1-0\"]\n[ECO \"B75\"]\n[ECOUrl \"https://www.chess.com/openings/B75-Sicilian-Defense-Open-Dragon-Yugoslav-Attack-7...a6\"]\n[WhiteElo \"2348\"]\n[BlackElo \"2275\"]\n[TimeControl \"1/259200\"]\n[Termination \"lrj2011 won by resignation\"]\n[StartTime \"16:05:28\"]\n[EndDate \"2018.07.10\"]\n[EndTime \"12:18:10\"]\n[Link \"https://www.chess.com/daily/game/194799652\"]\n\n1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 g6 6. Be3 Bg7 7. f3 a6 8. Qd2 Nbd7 9. O-O-O b5 10. g4 Bb7 11. h4 Nb6 12. h5 Rg8 13. hxg6 hxg6 14. g5 Nfd7 15. a3 Ne5 16. f4 Nec4 17. Qe1 Qc7 18. Bf2 Rc8 19. Rh3 d5 20. e5 e6 21. Na2 Bf8 22. Bxc4 dxc4 23. Nc3 b4 24. axb4 Bd5 25. b5 Ra8 26. Qg1 Nd7 27. Nxd5 exd5 28. Qg2 Qb7 29. Nc6 axb5 30. Qxd5 Ra1+ 31. Kd2 1-0","time_control":"1/259200","end_time":1531225090,"rated":true,"fen":"4kbr1/1q1n1p2/2N3p1/1p1QP1P1/2p2P2/7R/1PPK1B2/r2R4 b - - 2 31","start_time":1526400328,"time_class":"daily","rules":"chess","white":{"rating":2439,"result":"win","@id":"https://api.chess.com/pub/player/lrj2011","username":"lrj2011"},"black":{"rating":2324,"result":"resigned","@id":"https://api.chess.com/pub/player/impractical","username":"Impractical"},"eco":"https://www.chess.com/openings/B75-Sicilian-Defense-Open-Dragon-Yugoslav-Attack-7...a6","match":"https://api.chess.com/pub/match/893502"},{"url":"https://www.chess.com/daily/game/194799650","pgn":"[Event \"TMCL 2018 A1 R5 - Board 1\"]\n[Site \"Chess.com\"]\n[Date \"2018.05.15\"]\n[Round \"-\"]\n[White \"Impractical\"]\n[Black \"lrj2011\"]\n[Result \"0-1\"]\n[ECO \"A45\"]\n[ECOUrl \"https://www.chess.com/openings/A45-Indian-Game\"]\n[WhiteElo \"2275\"]\n[BlackElo \"2348\"]\n[TimeControl \"1/259200\"]\n[Termination \"lrj2011 won by resignation\"]\n[StartTime \"16:05:28\"]\n[EndDate \"2018.07.26\"]\n[EndTime \"11:02:16\"]\n[Link \"https://www.chess.com/daily/game/194799650\"]\n\n1. d4 Nf6 2. Bf4 g6 3. Nf3 Bg7 4. e3 O-O 5. Nc3 d5 6. Be2 c5 7. dxc5 Qa5 8. Nd2 Qxc5 9. Nb3 Qb6 10. Nb5 Ne8 11. c3 e5 12. Bg3 Be6 13. a4 a6 14. a5 Qd8 15. Na3 Nc6 16. Nc5 Nd6 17. b4 h5 18. h3 Nf5 19. Bh2 Qg5 20. g4 hxg4 21. hxg4 Nd6 22. Qc2 Bxg4 23. Rg1 Qh5 24. Bxg4 Qxh2 25. O-O-O e4 26. Nd7 Ne5 27. Rh1 Nd3+ 28. Kb1 Qxf2 29. Nxf8 Kxf8 30. Be2 Qxe3 31. Bxd3 exd3 32. Rxd3 Qe7 33. Rxd5 Ne4 34. Rd3 Rc8 35. Rhh3 Nxc3+ 36. Rxc3 Bxc3 0-1","time_control":"1/259200","end_time":1532602936,"rated":true,"fen":"2r2k2/1p2qp2/p5p1/P7/1P6/N1b4R/2Q5/1K6 w - - 0 37","start_time":1526400328,"time_class":"daily","rules":"chess","white":{"rating":2283,"result":"resigned","@id":"https://api.chess.com/pub/player/impractical","username":"Impractical"},"black":{"rating":2445,"result":"win","@id":"https://api.chess.com/pub/player/lrj2011","username":"lrj2011"},"eco":"https://www.chess.com/openings/A45-Indian-Game","match":"https://api.chess.com/pub/match/893502"}]}
This one's a bit tricky; I can imagine it may need a change to backend database storage. It's useful enough to me and I imagine to future chess.com internal use that I'm going to ask for it anyway. The player profile endpoint: https://www.chess.com/news/view/published-data-api#pubapi-endpoint-player ... has: "joined": 1178556600, // timestamp of registration on Chess.com I would like to see: "closed": 1188556600, // timestamp of account closure on Chess.com The advantage to me is that when calculating results for incomplete matches that have passed a deadline, I can tell when they were closed and not have to guess based on last_online time ... since people do sleep. A self-closure time and last_online time should be close. An abuse or fair_play_violations closure may not be. For chess.com, it provides a timestamp after which no moves can have been played; if desired in progress games can be timed out immediately and there is a record of when someone left, and if staff access an account (which seems to upset last_online time) there remains a record of when the account owner last accessed the account. In he case an account is reopened (which I have seen for self-closures, closures for abuse and fair play violations closures) the "closed" timestamp should be deleted and no longer provided. A potential problem exists were account profiles and/or stats are cached with the account considered closed, but the addition of a "closed" timestamp doesn't worsen that case. My particular impetus for wishing to know when a particular account was closed was for TMCL: one user's account was closed about the TMCL deadline. The last_online time preceded the deadline, but the exact time of closure is a mystery. Thanks for your consideration, Giles
andreamorandini Sep 3, 2018
I'm currently involved in collating the results of the first RR in the TMCL 2018 tournament. The match endpoint API requests I've been making have gone without a hitch & I'm impressed at just how robust that system is. At present I'm not even bothering to trap errors relating to my API server requests & there hasn't been a single failure (out of several hundred), so kudos to the developers! But I've hit a very small snag regarding the team name for the matches of just one of the groups taking part & it's this one:- World's Best Chess Players - Лучшие Шахматисты в мире I'm finding that the string I'm using, copied directly from the group's home page, doesn't correspond to the match endpoint name which is as follows:- World's Best Chess Players - \u041b\u0443\u0447\u0448\u0438\u0435 \u0428\u0430\u0445\u043c\u0430\u0442\u0438\u0441\u0442\u044b \u0432 \u043c\u0438\u0440\u0435 I recognise the (Russian cyrilic?) unicode character codes used to represent the cyrilic part of the name but I don't understand why this should be giving me a problem. We have a host of teams with names that contain non Latin characters & they're all fine. Another puzzle is this - when I do a comparison between the two strings using the command line of my Python (V3) interpreter like this... "World's Best Chess Players - Лучшие Шахматисты в мире" == "World's Best Chess Players - \u041b\u0443\u0447\u0448\u0438\u0435 \u0428\u0430\u0445\u043c\u0430\u0442\u0438\u0441\u0442\u044b \u0432 \u043c\u0438\u0440\u0435" ..the result is True. It's odd because my Python script is left treating the two names as if they're not the same but it appears to recognise them as the same on the command line, so what's going on? * This team name involves the same process as the one above but cause no problems.. Захід From a typical match endpoint for that group: "name":"\u0417\u0430\u0445\u0456\u0434"
stephen_33 Aug 31, 2018
Hi, In discussing a report with some other admins, it's come up that it would sometimes be useful to know when someone last played a team match. The stats endpoint gives "last" for chess_daily, chess960_daily, chess_blitz etc with timestamp, rating and Glicko RD. That's all good. I am unsure how much I want this (probably less than I want, say, a vote chess endpoint) and definitely less than a bug or two out there (rating inconsistency on team boards vs the website, if I remember right) but I'll throw it out. If other people want it, please chime in. If it would be difficult to do or slow, "Thanks, but no thanks" might be the right answer. The workaround for anyone who really needs this is to get the player's archive and work back through the games. That won't give the Glicko RD at the time of the most recent tournament game or whatever, but it would provide everything else. Thanks, Giles
I created a Java library that has useful methods that convert JSON data provided by the chess.com API endpoints into basic Java objects like Integers and Strings. This may prove useful to anyone that wanted to do something with the API data but wants to skip the whole JSON processing mess. For example, you can get a user´s rating in just one line of code with the library: int rating = UserJs.getBlitz("Nichtgut"); https://github.com/AntonioBohne/Chess.comJSON-JavaAPI You can download all the necessary files from there. Hopefully this helps someone (that isn´t me lol).
Hi guys, I would like to call the last 10 games from my archive, do you have an example of code to do this?
Italian-Player Aug 17, 2018
I created a String Array with all the users under the "all_time" JSON array. Chess.com says this club has 991 members. The string array only has 753 usernames. Just to doublecheck I manually copied everything after "all_time" and pasted it here: https://wordcounttools.com/ It also shows the word count for "username" is 753. Who is wrong?