Comment on page
⚖
Staking API
http://staking.chainup.net/${protocol}/mainnet/${token}
Supporting Protocol
Protocol | Network |
ethereum | mainnet |
Path Params
Parameter Name | Data Type | Mandatory | Description |
protocol | string | true | Protocol(ethereum) |
token | string | true | The user is bound to the Staking token and authenticated through the token. |
Create token
- 1.ChainUp creates a token and sends it to the customer via email.
- 2.The client generates token.
Only the validators of the ChainUpCloud platform are counted.
Query the user’s historical cumulative rewards for validators
HTTP Request
Get /api/v1/validator/total-rewards
Path Params: No param
Request Params
Parameter Name | Data Type | Mandatory | Description |
page | int | false | Page number (default is 1) |
limit | int | false | Number of items per page (default is 10, maximum supported is 1000) |
Response
Parameter Name | Data Type | Description |
el_total_reward | string | Total revenue of the execution layer (unit: eth) (real revenue on the chain, if there is settlement, it needs to be calculated separately) |
cl_total_reward | string | Total income of the consensus layer (unit: eth) |
total_reward | string | Total revenue of execution layer + consensus layer (unit: eth) |
cl_balance | string | Consensus layer balance (unit: eth) |
status | string | Validator status |
validators_active_count | int | Number of active validators |
validators_total_count | int | Total number of validators |
validators_total_rewards | string | Accumulated total rewards for validators |
validators_total_cl_balance | string | Total balance of validator consensus layer |
Example:
{
"code": "200",
"msg": "Success",
"pagination": {
"page": 1,
"limit": 10,
"total": 2
},
"data": {
"validator_details": [
{
"validator_index": 1,
"pubkey":"0x8000025593183bad1730e78b87b6bce428492e3bf9142d2609032daf674596f955d6403481c7d84809905a262c0136e2",
"el_total_reward": "0.039144409",
"cl_total_reward": "0.0446064811764954",
"total_reward": "0.0837508901764954",
"cl_balance": "32.0837508901764954",
"effective_balance": "32",
"status": "active"
},
{
"validator_index": 2,
"pubkey":"0x8000091c2ae64ee414a54c1cc1fc67dec663408bc636cb86756e0200e41a75c8f86603f104f02c856983d2783116be13",
"el_total_reward": "0.039144409",
"cl_total_reward": "0.0446064811764954",
"total_reward": "0.0837508901764954",
"cl_balance": "32.0837508901764954",
"effective_balance": "32",
"status": "active"
}
],
"validators_active_count": 2,
"validators_total_count": 2,
"validators_total_rewards": "0.3246064811764954",
"validators_total_cl_balance": "64.3246064811764954"
}
}
Query the daily rewards of user verifiers within the specified date (HTTP Request)
Get /api/v1/validator/daliy-rewards
Path Params: No param
Request Params
Parameter Name | Data Type | Mandatory | Description |
start_date | string | false | Start date (YYYY-MM-DD) (UTC+8) |
end_date | string | false | End date (YYYY-MM-DD) (UTC+8) |
page | int | false | Page number (default is 1) |
limit | int | false | Number of items per page (default is 10, maximum supported is 1000) |
Note: Request date limit is one month at most
- 1.start_date cannot be less than the current date -30 days.
- 2.end_date cannot be greater than the current date.
- 3.If no date is passed in, the reward data of the previous day will be queried by default.
Example :start_date="2023-07-01"end_date="2023-07-03"The date to be queried is [2023-07-01, 2023-07-03) left closed and right open interval
Response
Parameter Name | Data Type | Description |
date | string | Date (UTC+8) |
el_reward | string | Execution layer income (unit: eth) (real income on the chain, if there is settlement, it needs to be calculated separately) |
cl_reward | string | Consensus layer income (unit: eth) |
total_reward | string | Total revenue of execution layer + consensus layer (unit: eth) |
validators_active_count | int | Number of validators generating revenue |
Example:
{
"code": "200",
"msg": "Success",
"pagination": {
"page": 1,
"limit": 1,
"total": 2
},
"data": {
"reward": [
{
"date": "2023-07-1",
"el_reward": "0.039144409",
"cl_reward": "0.0446064811764954",
"total_reward": "0.0837508901764954",
"validators_active_count": 2
},
{
"date": "2023-07-2",
"el_reward": "0.039144409",
"cl_reward": "0.0446064811764954",
"total_reward": "0.0837508901764954",
"validators_active_count": 2
}
]
}
}
code | message |
200 | Success |
400 | Param error |
401 | Authentication failed |
404 | Path Not Found |
500 | Server error |
4001 | Date format is incorrect |
4002 | Date can not be greater than today |
4003 | Only support nearly 30 reward data |
Last modified 2mo ago