API Examples
These examples demonstrate how to use the CLOBr API to fetch market depth data. Replace YOUR_API_KEY
with your actual API key, which you can generate in your account settings.
Select a programming language:
# Request market depth data for a token
curl -X GET "https://clobr.io/api/v1/market-depth?token_address=9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump" \
-H "x-api-key: YOUR_API_KEY"
API Best Practices
- Cache responses when appropriate to minimize API usage and improve your application's performance.
- Implement error handling in your code to gracefully handle API rate limits and other potential errors.
- Use the refresh_data_threshold parameter to avoid unnecessary data refreshes and optimize your API usage.
- Keep your API keys secure and never expose them in client-side code or public repositories.
- Monitor your usage to ensure you stay within your account's limits and avoid service disruptions.