{"openapi":"3.1.0","info":{"title":"Elo Rating API","version":"1.0.0","description":"Compute Elo ratings — the rating system behind chess, esports, games and competitive leaderboards. The expected endpoint takes two players' ratings and returns each side's win probability using the classic logistic formula 1 / (1 + 10^((Rb − Ra) / 400)), names the favourite and reports the rating gap. The match endpoint applies a result — a win, loss or draw for player A — and returns both players' updated ratings, the exact points each one gained or lost, and the expected scores, using a configurable K-factor (32 by default; lower for established players, higher for newcomers, so ratings settle or move quickly as you choose). An upset is rewarded with a bigger swing and a draw shifts points toward the underdog, exactly as Elo intends. Everything is computed locally and deterministically, so it is instant and private — no players or leaderboard are stored. Ideal for games and esports matchmaking, chess and board-game apps, tournament and ladder systems, ranking and reputation features, and A/B-style skill comparisons. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This computes ratings from inputs you provide; it does not store a leaderboard or look up a player's rating.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/elo-api","description":"oanor gateway"}],"tags":[{"name":"Elo"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/expected":{"get":{"operationId":"get_v1_expected","tags":["Elo"],"summary":"Win probability","description":"","parameters":[{"name":"a","in":"query","required":true,"description":"Player A's rating","schema":{"type":"string"},"example":"2000"},{"name":"b","in":"query","required":true,"description":"Player B's rating","schema":{"type":"string"},"example":"1500"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"a":2000,"b":1500,"favorite":"a","expected_a":0.9468,"expected_b":0.0532,"rating_difference":500},"meta":{"timestamp":"2026-06-03T17:42:19.585Z","request_id":"78c30b48-d8cd-4469-9f60-2fd454f81f18"},"status":"ok","message":"Win probability","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/match":{"get":{"operationId":"get_v1_match","tags":["Elo"],"summary":"Update ratings","description":"","parameters":[{"name":"a","in":"query","required":true,"description":"Player A's rating","schema":{"type":"string"},"example":"1600"},{"name":"b","in":"query","required":true,"description":"Player B's rating","schema":{"type":"string"},"example":"1400"},{"name":"result","in":"query","required":true,"description":"a (A wins), b (B wins), draw — or 1, 0.5, 0","schema":{"type":"string"},"example":"a"},{"name":"k","in":"query","required":false,"description":"K-factor (default 32)","schema":{"type":"string"},"example":"32"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"a":1600,"b":1400,"k":32,"new_a":1608,"new_b":1392,"result":"a","change_a":8,"change_b":-8,"expected_a":0.7597,"expected_b":0.2403,"new_a_precise":1607.69,"new_b_precise":1392.31},"meta":{"timestamp":"2026-06-03T17:42:19.686Z","request_id":"cb65e19c-feeb-43cd-b42d-aac4d770fd70"},"status":"ok","message":"Update ratings","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Elo Rating API","notes":"Expected score Ea = 1 / (1 + 10^((Rb − Ra) / 400)); new rating = R + K × (score − expected). A higher K-factor makes ratings move faster (32 is common; 16–24 for established players, 40 for new ones). Ratings are returned rounded to whole numbers, with a precise value alongside. This computes ratings — it does not store players or a leaderboard. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/expected","params":{"a":"player A's rating (required)","b":"player B's rating (required)"},"returns":"the win probability of each player and the favourite"},{"path":"/v1/match","params":{"a":"player A's rating (required)","b":"player B's rating (required)","k":"K-factor (default 32)","result":"a (A wins), b (B wins), draw — or 1, 0.5, 0 for A"},"returns":"both updated ratings, the point changes and expected scores"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Compute Elo ratings — the rating system used in chess, esports, games and leaderboards. The expected endpoint returns each player's win probability from their two ratings (the classic 1 / (1 + 10^((Rb−Ra)/400)) formula), tells you the favourite and the rating gap. The match endpoint applies a result — a win, a loss or a draw for player A — and returns both players' updated ratings, the points gained and lost, and the expected scores, using a configurable K-factor (default 32). Pure local maths, no key."},"meta":{"timestamp":"2026-06-03T17:42:19.795Z","request_id":"af353ebe-e101-4a9c-8fd0-181168ef546d"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":4835,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":635,"monthly_call_quota":14350,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2625,"monthly_call_quota":194500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6425,"monthly_call_quota":1015000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/elo-api"}