Rewards API - Ethereum
API AuthenticationClick to view API Authentication details
Authorization
request header or URL
property. Calls are made to one of the Ethereum Rewards API endpoints found in your app's dashboard. For example:
https://eth-rewards.datahub.figment.io
- Fetch with Header
- Fetch with Parameter
- CURL with Header
- CURL with Parameter
fetch("https://eth-rewards.datahub.figment.io/v2/rewards", {
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://eth-rewards.datahub.figment.io/apikey/{{apikey}}/v2/rewards", {
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
})
})
curl -X POST 'https://eth-rewards.datahub.figment.io/v2/rewards' \
--header 'Content-Type: application/json' \
--header 'Authorization: <api_key>' \
--data '{
// JSON Payload
}'
curl -X POST 'https://eth-rewards.datahub.figment.io/apikey/{{apikey}}/v2/rewards' \
--header 'Content-Type: application/json' \
--data '{
// JSON Payload
}'
Available Methods
ETH Rewards by validator address
Returns gross validator rewards
{
"data": [
{
"accounts": [
"0x968c329ed829636a0bbbb57a25d9634ffd0d17bc1ff33adf93fd6a98920a82a83de930b9f2dddaebc4104ac90581ada0"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000013666 ETH",
"currency": "ETH",
"numeric": 13666000000000,
"exp": 18,
"type": "staking",
"recipient": "0x968c329ed829636a0bbbb57a25d9634ffd0d17bc1ff33adf93fd6a98920a82a83de930b9f2dddaebc4104ac90581ada0"
}
],
"period": "164726",
"validator": "0x968c329ed829636a0bbbb57a25d9634ffd0d17bc1ff33adf93fd6a98920a82a83de930b9f2dddaebc4104ac90581ada0",
"timestamp": "2022-12-03T14:46:24Z",
"withdrawal_credentials": "0x0100000000000000000000001cedc0f3af8f9841b0a1f5c1a4ddc6e1a1629074"
},
{
"accounts": [
"0x968c329ed829636a0bbbb57a25d9634ffd0d17bc1ff33adf93fd6a98920a82a83de930b9f2dddaebc4104ac90581ada0"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000013569 ETH",
"currency": "ETH",
"numeric": 13569000000000,
"exp": 18,
"type": "staking",
"recipient": "0x968c329ed829636a0bbbb57a25d9634ffd0d17bc1ff33adf93fd6a98920a82a83de930b9f2dddaebc4104ac90581ada0"
}
],
"period": "164727",
"validator": "0x968c329ed829636a0bbbb57a25d9634ffd0d17bc1ff33adf93fd6a98920a82a83de930b9f2dddaebc4104ac90581ada0",
"timestamp": "2022-12-03T14:52:48Z",
"withdrawal_credentials": "0x0100000000000000000000001cedc0f3af8f9841b0a1f5c1a4ddc6e1a1629074"
}
],
"meta": {
"network": "ethereum",
"period_unit": "epoch"
}
}
SpecificationView Specification
Body
accounts
takes an array of validator's public addresses. 50 max. Required.start
andend
are epoch numbers (as integers) or timestamps (as strings "YYYY-MM-DD"). Required.aggregation
allows you to get rewards by epoch (default if nothing is passed) or by day (ifdaily
is passed).
Response
The response is broken down between meta
and data
meta
network
is the name of the network queriedperiod_unit
is the unit of theperiod
field underdata
:epoch
ordaily
data
is an array of objects, one for each period and accounts, containing:validator
is the validator that distributed the rewardsperiod
is the epoch number (only present when no aggregation is requested)timestamp
is the timestamp of the end of the periodrewards
is an array of objects.- The formula to compute the final rewards in the
currency
unit isnumeric x 10^(-exp)
(text
being the string version of this). type
is eitherstaking
(for consensus layer rewards) ortips
(for execution layer rewards).recipient
is the address of the rewards recipient.
- The formula to compute the final rewards in the
balances
is an array of objects containingnumeric
,exp
,currency
, andtext
. It returns the validator's current balance
MEV fields
When a reward is of type tips
we attach extra metadata for data.rewards
sender
is the "from" address of the tips transactiontx_hash
is the transaction identifier for the tips payoutslot
is the consensus layer slot at which the block proposal occurredblock
is the execution layer block in which the transaction was includedis_mev
indicates if the block was built with MEVmev_service
specifies which service built the MEV block
There can be multiple type=tips
objects per period: one per proposed blocks. We don't aggregate them in one object because they could have different recipient addresses. type=staking
only have one object: we aggregate all subtypes (block proposals, attestations, sync committees, slashing)
Limitations
- This API serves data for the last 7 days for epoch and 60 days for daily aggregation
- This API returns rewards for Figment validators only
- Data is available approximately an hour after the end of the day or epoch. When requesting daily for the current day, the data will be available but obviously partially complete as the day progresses.
FAQ
- Reward Types:
staking
type rewards are the net aggregation of all consensus layer rewards: block proposal, attestation, sync committee and slashing. There is one staking bucket per period.tips
type rewards are the effective amount received by the fee recipient of the proposed block on the execution layer. There can be multiple buckets per period (one per block proposed) - Negative Rewards: In theory, there could be a negative rewards amount for a day. But slashing events are rare. Current negative amounts would more likely be caused by repeatedly missing attestations and/or sync committee votes.
ETH Rewards by withdrawal address
Returns gross validator rewards
{
"data": [
{
"accounts": [
"0x8cc1e20644cefd72737768a4d501288437705ddb52411f95567e29319dcdd609bd15b4c80ca0f3ff7d320d9868ee0c02"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000013666 ETH",
"currency": "ETH",
"numeric": 13666000000000,
"exp": 18,
"type": "staking",
"recipient": "0x8cc1e20644cefd72737768a4d501288437705ddb52411f95567e29319dcdd609bd15b4c80ca0f3ff7d320d9868ee0c02"
}
],
"period": "164726",
"validator": "0x8cc1e20644cefd72737768a4d501288437705ddb52411f95567e29319dcdd609bd15b4c80ca0f3ff7d320d9868ee0c02",
"timestamp": "2022-12-03T14:46:24Z",
"withdrawal_credentials": "0x010000000000000000000000ed488e6cc4b030eb5bfdde3227c3d5da2b9040e8"
},
{
"accounts": [
"0x8cc1e20644cefd72737768a4d501288437705ddb52411f95567e29319dcdd609bd15b4c80ca0f3ff7d320d9868ee0c02"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000013569 ETH",
"currency": "ETH",
"numeric": 13569000000000,
"exp": 18,
"type": "staking",
"recipient": "0x8cc1e20644cefd72737768a4d501288437705ddb52411f95567e29319dcdd609bd15b4c80ca0f3ff7d320d9868ee0c02"
}
],
"period": "164727",
"validator": "0x8cc1e20644cefd72737768a4d501288437705ddb52411f95567e29319dcdd609bd15b4c80ca0f3ff7d320d9868ee0c02",
"timestamp": "2022-12-03T14:52:48Z",
"withdrawal_credentials": "0x010000000000000000000000ed488e6cc4b030eb5bfdde3227c3d5da2b9040e8"
},
{
"accounts": [
"0x8e0776a9c0c895ba1b6d136d7d47fb142287b56d5d70ef6c05e18e19ba60425324f8d9c2ac5113984b348b79ca20502e"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000013666 ETH",
"currency": "ETH",
"numeric": 13666000000000,
"exp": 18,
"type": "staking",
"recipient": "0x8e0776a9c0c895ba1b6d136d7d47fb142287b56d5d70ef6c05e18e19ba60425324f8d9c2ac5113984b348b79ca20502e"
}
],
"period": "164726",
"validator": "0x8e0776a9c0c895ba1b6d136d7d47fb142287b56d5d70ef6c05e18e19ba60425324f8d9c2ac5113984b348b79ca20502e",
"timestamp": "2022-12-03T14:46:24Z",
"withdrawal_credentials": "0x010000000000000000000000ed488e6cc4b030eb5bfdde3227c3d5da2b9040e8"
},
{
"accounts": [
"0x8e0776a9c0c895ba1b6d136d7d47fb142287b56d5d70ef6c05e18e19ba60425324f8d9c2ac5113984b348b79ca20502e"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000013569 ETH",
"currency": "ETH",
"numeric": 13569000000000,
"exp": 18,
"type": "staking",
"recipient": "0x8e0776a9c0c895ba1b6d136d7d47fb142287b56d5d70ef6c05e18e19ba60425324f8d9c2ac5113984b348b79ca20502e"
}
],
"period": "164727",
"validator": "0x8e0776a9c0c895ba1b6d136d7d47fb142287b56d5d70ef6c05e18e19ba60425324f8d9c2ac5113984b348b79ca20502e",
"timestamp": "2022-12-03T14:52:48Z",
"withdrawal_credentials": "0x010000000000000000000000ed488e6cc4b030eb5bfdde3227c3d5da2b9040e8"
},
{
"accounts": [
"0x9008570e9ecc3779030df0d70b6819247432a7e70ea6ef494652f920692a2ccd4aafb9feb570659ddaa29c5a0d29994b"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000013666 ETH",
"currency": "ETH",
"numeric": 13666000000000,
"exp": 18,
"type": "staking",
"recipient": "0x9008570e9ecc3779030df0d70b6819247432a7e70ea6ef494652f920692a2ccd4aafb9feb570659ddaa29c5a0d29994b"
}
],
"period": "164726",
"validator": "0x9008570e9ecc3779030df0d70b6819247432a7e70ea6ef494652f920692a2ccd4aafb9feb570659ddaa29c5a0d29994b",
"timestamp": "2022-12-03T14:46:24Z",
"withdrawal_credentials": "0x010000000000000000000000ed488e6cc4b030eb5bfdde3227c3d5da2b9040e8"
},
{
"accounts": [
"0x9008570e9ecc3779030df0d70b6819247432a7e70ea6ef494652f920692a2ccd4aafb9feb570659ddaa29c5a0d29994b"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000010136 ETH",
"currency": "ETH",
"numeric": 10136000000000,
"exp": 18,
"type": "staking",
"recipient": "0x9008570e9ecc3779030df0d70b6819247432a7e70ea6ef494652f920692a2ccd4aafb9feb570659ddaa29c5a0d29994b"
}
],
"period": "164727",
"validator": "0x9008570e9ecc3779030df0d70b6819247432a7e70ea6ef494652f920692a2ccd4aafb9feb570659ddaa29c5a0d29994b",
"timestamp": "2022-12-03T14:52:48Z",
"withdrawal_credentials": "0x010000000000000000000000ed488e6cc4b030eb5bfdde3227c3d5da2b9040e8"
},
{
"accounts": [
"0xa2ce5e3fdb77aca2c2559d18f7adb31955f7ec6d547bb2098803cb277399965a3124327a115ef97709285245667b48e0"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000013666 ETH",
"currency": "ETH",
"numeric": 13666000000000,
"exp": 18,
"type": "staking",
"recipient": "0xa2ce5e3fdb77aca2c2559d18f7adb31955f7ec6d547bb2098803cb277399965a3124327a115ef97709285245667b48e0"
}
],
"period": "164726",
"validator": "0xa2ce5e3fdb77aca2c2559d18f7adb31955f7ec6d547bb2098803cb277399965a3124327a115ef97709285245667b48e0",
"timestamp": "2022-12-03T14:46:24Z",
"withdrawal_credentials": "0x010000000000000000000000ed488e6cc4b030eb5bfdde3227c3d5da2b9040e8"
},
{
"accounts": [
"0xa2ce5e3fdb77aca2c2559d18f7adb31955f7ec6d547bb2098803cb277399965a3124327a115ef97709285245667b48e0"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000013569 ETH",
"currency": "ETH",
"numeric": 13569000000000,
"exp": 18,
"type": "staking",
"recipient": "0xa2ce5e3fdb77aca2c2559d18f7adb31955f7ec6d547bb2098803cb277399965a3124327a115ef97709285245667b48e0"
}
],
"period": "164727",
"validator": "0xa2ce5e3fdb77aca2c2559d18f7adb31955f7ec6d547bb2098803cb277399965a3124327a115ef97709285245667b48e0",
"timestamp": "2022-12-03T14:52:48Z",
"withdrawal_credentials": "0x010000000000000000000000ed488e6cc4b030eb5bfdde3227c3d5da2b9040e8"
},
{
"accounts": [
"0xa2ee5d468ef53d82368d9026e321ab2c6d47f44c33b7b9f62369bf6dcf37fb0208f95dd6b485325ce1bbf5fec7ad45bb"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000013666 ETH",
"currency": "ETH",
"numeric": 13666000000000,
"exp": 18,
"type": "staking",
"recipient": "0xa2ee5d468ef53d82368d9026e321ab2c6d47f44c33b7b9f62369bf6dcf37fb0208f95dd6b485325ce1bbf5fec7ad45bb"
}
],
"period": "164726",
"validator": "0xa2ee5d468ef53d82368d9026e321ab2c6d47f44c33b7b9f62369bf6dcf37fb0208f95dd6b485325ce1bbf5fec7ad45bb",
"timestamp": "2022-12-03T14:46:24Z",
"withdrawal_credentials": "0x010000000000000000000000ed488e6cc4b030eb5bfdde3227c3d5da2b9040e8"
},
{
"accounts": [
"0xa2ee5d468ef53d82368d9026e321ab2c6d47f44c33b7b9f62369bf6dcf37fb0208f95dd6b485325ce1bbf5fec7ad45bb"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000013569 ETH",
"currency": "ETH",
"numeric": 13569000000000,
"exp": 18,
"type": "staking",
"recipient": "0xa2ee5d468ef53d82368d9026e321ab2c6d47f44c33b7b9f62369bf6dcf37fb0208f95dd6b485325ce1bbf5fec7ad45bb"
}
],
"period": "164727",
"validator": "0xa2ee5d468ef53d82368d9026e321ab2c6d47f44c33b7b9f62369bf6dcf37fb0208f95dd6b485325ce1bbf5fec7ad45bb",
"timestamp": "2022-12-03T14:52:48Z",
"withdrawal_credentials": "0x010000000000000000000000ed488e6cc4b030eb5bfdde3227c3d5da2b9040e8"
},
{
"accounts": [
"0xac3ed947685ae451f813e6a5d3938881f583ee71aba6770c6fc19e86273bffd876dd64db2f217521671fe658dfd86aec"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000010231 ETH",
"currency": "ETH",
"numeric": 10231000000000,
"exp": 18,
"type": "staking",
"recipient": "0xac3ed947685ae451f813e6a5d3938881f583ee71aba6770c6fc19e86273bffd876dd64db2f217521671fe658dfd86aec"
}
],
"period": "164726",
"validator": "0xac3ed947685ae451f813e6a5d3938881f583ee71aba6770c6fc19e86273bffd876dd64db2f217521671fe658dfd86aec",
"timestamp": "2022-12-03T14:46:24Z",
"withdrawal_credentials": "0x010000000000000000000000ed488e6cc4b030eb5bfdde3227c3d5da2b9040e8"
},
{
"accounts": [
"0xac3ed947685ae451f813e6a5d3938881f583ee71aba6770c6fc19e86273bffd876dd64db2f217521671fe658dfd86aec"
],
"chain_id": "mainnet",
"rewards": [
{
"text": "0.000013569 ETH",
"currency": "ETH",
"numeric": 13569000000000,
"exp": 18,
"type": "staking",
"recipient": "0xac3ed947685ae451f813e6a5d3938881f583ee71aba6770c6fc19e86273bffd876dd64db2f217521671fe658dfd86aec"
}
],
"period": "164727",
"validator": "0xac3ed947685ae451f813e6a5d3938881f583ee71aba6770c6fc19e86273bffd876dd64db2f217521671fe658dfd86aec",
"timestamp": "2022-12-03T14:52:48Z",
"withdrawal_credentials": "0x010000000000000000000000ed488e6cc4b030eb5bfdde3227c3d5da2b9040e8"
}
],
"meta": {
"network": "ethereum",
"period_unit": "epoch"
}
}
SpecificationView Specification
Body
addresses
takes an array of withdrawal addresses. Required.start
andend
are epoch numbers (as integers) or timestamps (as strings "YYYY-MM-DD"). Required.aggregation
allows you to get rewards by epoch (default if nothing is passed) or by day (ifdaily
is passed).
Response
The response is broken down between meta
and data
meta
network
is the name of the network queriedperiod_unit
is the unit of theperiod
field underdata
:epoch
ordaily
data
is an array of objects, one for each period and address, containing:validator
is the validator that distributed the rewardsaccounts
is an array containing the validator address that received the rewardswithdrawal_credentials
of the validator entityperiod
is the epoch number (only present when no aggregation is requested)timestamp
is the timestamp of the end of the periodrewards
is an array of objects.- The formula to compute the final rewards in the
currency
unit isnumeric x 10^(-exp)
(text
being the string version of this). type
is eitherstaking
(for consensus layer rewards) ortips
(for execution layer rewards).recipient
is the address of the rewards recipient.
- The formula to compute the final rewards in the
balances
is an array of objects containingnumeric
,exp
,currency
, andtext
. It returns the validator's current balance
MEV fields
When a reward is of type tips
we attach extra metadata for data.rewards
sender
is the "from" address of the tips transactiontx_hash
is the transaction identifier for the tips payoutslot
is the consensus layer slot at which the block proposal occurredblock
is the execution layer block in which the transaction was includedis_mev
indicates if the block was built with MEVmev_service
specifies which service built the MEV block
There can be multiple type=tips
objects per period: one per proposed blocks. We don't aggregate them in one object because they could have different recipient addresses. type=staking
only have one object: we aggregate all subtypes (block proposals, attestations, sync committees, slashing)
Limitations
- This API serves data for the last 7 days for epoch and 60 days for daily aggregation
- This API returns rewards for Figment validators only
- Data is available approximately an hour after the end of the day or epoch. When requesting daily for the current day, the data will be available but obviously partially complete as the day progresses.
FAQ
- Reward Types:
staking
type rewards are the net aggregation of all consensus layer rewards: block proposal, attestation, sync committee and slashing. There is one staking bucket per period.tips
type rewards are the effective amount received by the fee recipient of the proposed block on the execution layer. There can be multiple buckets per period (one per block proposed) - Negative Rewards: In theory, there could be a negative rewards amount for a day. But slashing events are rare. Current negative amounts would more likely be caused by repeatedly missing attestations and/or sync committee votes.