Rate Limits & Tiers¶
blockparty enforces per-(provider, api_key) rate limiting using a token
bucket algorithm. Rate limit budgets are shared across all clients that use
the same credential (via ProviderSet or the same RateLimitRegistry).
Provider tiers¶
Each provider has built-in tier enums encoding their known plan limits:
Provider |
Tier |
RPS |
RPD |
|---|---|---|---|
Etherscan |
|
3 |
100,000 |
Etherscan |
|
5 |
100,000 |
Etherscan |
|
10 |
200,000 |
Etherscan |
|
20 |
500,000 |
Etherscan |
|
30 |
1,000,000 |
Routescan |
|
2 |
10,000 |
Routescan |
|
5 |
100,000 |
Routescan |
|
10 |
200,000 |
Routescan |
|
20 |
500,000 |
Routescan |
|
30 |
1,000,000 |
Routescan |
|
30 |
1,500,000 |
Blockscout |
|
~5 |
— |
Blockscout |
|
~10 |
— |
Custom rate limits¶
For enterprise plans or non-standard limits:
from blockparty import AsyncBlockpartyClient, CustomRateLimit
client = AsyncBlockpartyClient(
chain_id=8453,
explorer_type="etherscan",
api_key="ENTERPRISE_KEY",
tier=CustomRateLimit(rps=50, rpd=2_000_000),
)
Blockscout adaptive limits¶
Blockscout communicates rate limits dynamically via response headers
(X-Ratelimit-Limit, X-Ratelimit-Remaining, X-Ratelimit-Reset).
The RateLimitBudget adapts its token bucket capacity from these headers
on every response, so the initial tier value is only used until the first
successful call.