Skip to content

fix: Opensea 429 throttling#274

Merged
galvanizze merged 4 commits into
masterfrom
opensea-429-throttling
Jun 18, 2026
Merged

fix: Opensea 429 throttling#274
galvanizze merged 4 commits into
masterfrom
opensea-429-throttling

Conversation

@galvanizze

Copy link
Copy Markdown
Member

No description provided.

galvanizze and others added 4 commits June 18, 2026 11:14
…lure

get_data logged every HTTPError at ERROR before deciding whether to
retry, so successfully-retried 429/5xx throttling produced ERROR noise
(~1600/day from OpenSea in prod) despite zero actual failures, and the
same request was double-logged (ERROR then WARNING).

Now the ERROR log fires only on the genuine-failure return path (retries
exhausted, non-retryable status, or no sleep provider). Retryable errors
that will be retried log a single WARNING. This makes ERROR on the
fetch logger a reliable signal of real fetch failures.

Related to crypkit_app/microservices#2897

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tyekqa8ioFUnJt9c4dye7K
OpenSea returned HTTP 429 on ~14% of first-try requests at the 0.25s
(4 rps) rate limit, slightly above our key's budget. Current real
OpenSea load is only ~0.3-0.5 rps (flat, not bursty), so raise the
pacing interval to 0.75s (4 requests per 3 seconds, ~1.33 rps) to keep
requests well under the limit while retaining ample burst headroom.

Related to crypkit_app/microservices#2897

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tyekqa8ioFUnJt9c4dye7K
_get_reason returned only the HTTP status phrase (e.g. "Service
Temporarily Unavailable"), discarding the server's response body. Append
the body (truncated to 500 chars) so errors carry the actual message.

Harden MagicEden._should_retry to substring-match "SERVICE UNAVAILABLE"
so the 503 retry still fires now that the reason may include a body.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ndtG1bvGFomMdhosUADc3
The OpenSea rate_limit was changed to 0.75 (4 req/3s) but the
sleep-provider assertions in test_opensea.py still expected 0.25,
breaking CI on master. Update the three assertions to match.

Related to crypkit_app/microservices#2897

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tyekqa8ioFUnJt9c4dye7K
@galvanizze galvanizze changed the title Opensea 429 throttling fix: Opensea 429 throttling Jun 18, 2026
@galvanizze galvanizze requested a review from ladovina June 18, 2026 12:19
@galvanizze galvanizze merged commit 7761e2e into master Jun 18, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants