Staking Data

Best Practices

Recommended patterns for using the Staking Rewards API efficiently.

Best Practices

This is not a complete list of all the best practices, but it is a good starting point.

Limits and Efficiency

  • Reduce API calls for improved efficiency and lower latency
  • Use the limit property strategically to transfer only necessary data
  • Leverage pagination with mandatory limit and optional offset parameters
  • Prefer higher limit values with offset iteration over multiple lower-limit requests
  • Cache data locally when feasible
  • Apply appropriate filters and parameters to optimize requests
  • Adhere to rate limiting guidelines
  • Design applications to handle errors gracefully (timeouts, server issues)

Featuring Data in Publications and Websites

When publishing API data, proper attribution is essential. Recommended format:

<a href="https://stakingrewards.com" rel="dofollow">Source: Stakingrewards.com</a>

This should appear on each page featuring the data.

Security

  • Secure API key storage using environment variables or encrypted solutions
  • Avoid hardcoding endpoint URLs; use dynamic construction instead
  • Maintain current software and operating system updates

Data Integrity

  • Validate retrieved data against standards before processing
  • Confirm proper formatting and presence of all required fields

Terms of Service, Updating and Maintenance

  • Follow API terms of service guidelines
  • Stay current with API versions and changes

On this page