Rate Limits
Blockline implements rate limiting to ensure fair usage and maintain API performance for all users. This guide explains the rate limits, how to stay within them, and how to handle rate limit errors.Rate Limit Overview
Rate limits are applied per API key and per endpoint. Each endpoint
has its own separate rate limit.
Endpoint Rate Limits
| Endpoint | Rate Limit | Window |
|---|---|---|
POST /analyze-trade | 6 requests | Per minute |
POST /backfill-transaction | No limit | - |
GET /transaction/:signature | 6 requests | Per minute |
POST /wallet/:address/signatures | 6 requests | Per minute |
POST /enhance-metadata | 6 requests | Per minute |
Global Rate Limit
In addition to per-endpoint limits, there’s a global rate limit:- 30 requests per minute across all
/api/*routes
Rate Limit Headers
Every API response includes rate limit headers:Maximum number of requests allowed in the current window
Number of requests remaining in the current window
Unix timestamp when the rate limit window resets
Handling Rate Limits
429 Too Many Requests
When you exceed the rate limit, the API returns a 429 status code:Retry Strategy
Implement exponential backoff when you receive a 429 error:Best Practices
Monitor rate limit headers
Monitor rate limit headers
Check
X-RateLimit-Remaining before making requests:Implement request queuing
Implement request queuing
Use a queue to control request rate:
Use caching effectively
Use caching effectively
The API provides built-in caching for some endpoints:
- Wallet signatures: 5-minute cache
- Transaction details: 5-minute cache
- Enhanced metadata: 48-hour cache
Batch requests when possible
Batch requests when possible
Instead of making multiple individual requests:
- Use
/analyze-tradeto get all transactions in a slot range - Then use
/enhance-metadataonly for transactions you need details on - Use
hint_signaturein/wallet/:address/signaturesfor efficiency
Special Case: /backfill-transaction
Since backfill operations are async and resource-intensive:- Use sparingly and only when necessary
- Don’t make rapid concurrent backfill requests
- Monitor the request ID returned for completion status
Upgrading Limits
Need higher rate limits for production workloads?Contact Us for Enterprise Plans
Monitoring Your Usage
Track your API usage in the Dashboard:- Request count per endpoint
- Rate limit hits over time
- Peak usage periods
- Error rates including 429s