API AuthenticationClick to view API Authentication details
API calls require authentication with API key via Authorization request header or URL property. Calls are made to one of the Solana Rewards Rates API endpoints found in your app's dashboard.
For example: https://solana-rewards.datahub.figment.io
Here's some boilerplate to get you started.
Fetch with Header
Fetch with Parameter
CURL with Header
CURL with Parameter
fetch("https://solana-rewards.datahub.figment.io/rates",{ method:'POST',// can also be 'GET', 'PUT' or any appropriate method headers:{ "Authorization":"<api_key>", "Content-Type":"application/json"// if method is 'POST' }, body:JSON.stringify({ // JSON Payload }) })
fetch("https://solana-rewards.datahub.figment.io/apikey/{{apikey}}/rates",{ method:'POST',// can also be 'GET', 'PUT' or any appropriate method headers:{ "Content-Type":"application/json"// if method is 'POST' }, body:JSON.stringify({ // JSON Payload }) })
We aggregate all rewards received by all validators and divide this by the aggregated balances of all validators at the beginning of the period.
It includes all rewards, on both consensus and execution layers.
Query Parameters
figment(optional): if true is passed we will return the reward rate for Figment validators only. If omitted or any other value is passed we will return the reward rate of the network as a whole.
Response
date - Specific date associated with value (staking reward rates).