lichess-org / lichess-org/api

Rate limiting for challenge creation is not clearly documented

Open
#264 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
597
Forks
176
Avg merge
1d 4h
Merged PRs (30d)
6

Description

Hi, I'm basically trying to get my bot to play as many games as the rate limiting allows. All I've seen in the docs is:

All requests are rate limited using various strategies, to ensure the API remains responsive for everyone. Only make one request at a time. If you receive an HTTP response with a 429 status, please wait a full minute before resuming API usage.

So when I encounter a 429 for challenge creation I backoff for 2 mins, but then I still get 429 responses for hours afterwards when making a request at 2 min intervals. The docs indicate I'm backing off for a sufficient amount of time but clearly I'm not. What duration is being used to measure the request rate?

Worth noting I'm continuing to have the event stream held open in parallel while making challenges, would this be causing continuous 429 responses?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the API documentation covering challenge creation, HTTP 429 responses, and the event stream. Verify the rate-measurement window, retry guidance, and whether an open event stream affects challenge requests; the documentation is done when these behaviors and limits are stated clearly.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.