Rate Limits & Best Practices
Rate limits and best practices for using the BlueGamma API efficiently.
Rate Limits
Limit
Value
Best Practices
1. Cache Responses
from functools import lru_cache
from datetime import datetime
@lru_cache(maxsize=100)
def get_swap_rate(index: str, tenor: str, date: str = None):
# Cache key includes date to refresh daily
date = date or datetime.now().strftime("%Y-%m-%d")
response = requests.get(
"https://api.bluegamma.io/v1/swap_rate",
params={"index": index, "tenor": tenor},
headers={"x-api-key": API_KEY}
)
return response.json()Data Type
Cache Duration
2. Batch Your Requests
3. Use Appropriate Endpoints
If you need...
Use this endpoint
4. Handle Errors Gracefully
5. Use Valuation Time for Consistency
Common Mistakes to Avoid
Mistake
Solution
Need Higher Limits?
Last updated
Was this helpful?

