Resources dedicated to exposing and explaining the various endpoints that the Rated API supports.
https://api.rated.network/version/network/entity/resource
Parameter | Description |
---|---|
version | The version of the API you are on. Currently the API is in v0 |
network | The network you are querying |
entityId | The class of entity you are querying for. This could be either of Validators, Operators and Network |
resource | The specific resource you are querying for |
Day 0
encompasses the 225 epoch period between epochs [0, 225), and maps to datetime 2020-12-01 12:00:23 UTC
to 2022-12-02 12:00:11 UTC
. The reasoning for this is to make sure that days are always equal in terms of included epochs (i.e. guaranteed to have 225 epochs each).
That being said, for performance
and rewards
v1 endpoints, we have enabled a utc
parameter which users the option retrieve data based on UTC time. The epochs are partitioned into days based on the starting timestamp of an epoch (i.e. timestamp of the first slot in an epoch). This means epochs belong to the (UTC) day they were started in. The rewards partitioned this way instead of at the slot-level, as doing so by the latter would make accounting around midnight quite complicated (especially attestation rewards where the rewarded action and the actual reward have a time lag). Thus, validator activity that occurs between 23:57 and 00:03 will be accounted for in the previous day. This way all days will have 225 epochs as with the default timing.
As an example for Ethereum mainnet:
Day 0 would be from:
2020-12-01 12:00:23
(genesis) to 2020-12-02 00:03:23 UTC
2020-12-02 00:03:35
to 2020-12-03 00:03:23 UTC
2020-12-02 23:57:11 UTC
so despite ending on 2020-12-03 00:03:23 UTC
, it still counted under Day 1 (which is 2020-12-02
).
granularity
query parameter can be used. For example, to obtain monthly aggregates for validator index 100
on Ethereum: