API reference
Resources dedicated to exposing and explaining the various endpoints that the Rated API supports.
You can access our API's Swagger documentation via api.rated.network/docs
Making sense of the API input
The standard form of the Rated API looks something like this 👇
At the highest level, here's how you should interpret the class of instructions you are passing to it:
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
How time works for Ethereum
Ethereum
All rewards and performance metrics are hosted under the "effectiveness" endpoint.
By default, the API returns data in daily chunks (24h / 225 epoch / 7200 slot increments), starting from Beacon Chain genesis. As such, 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:
Slot 0 to 3615
Epoch 0 to 112
Time period:
2020-12-01 12:00:23
(genesis) to2020-12-02 00:03:23 UTC
Day 1 would be from:
Slot 3616 to 10815
Epoch 113 to 337
Time period:
2020-12-02 00:03:35
to2020-12-03 00:03:23 UTC
Epoch 337 started on
2020-12-02 23:57:11 UTC
so despite ending on2020-12-03 00:03:23 UTC
, it still counted under Day 1 (which is2020-12-02
).
Subsequent days would follow the same pattern as Day 1. Excluding Day 0, there will always be 7200 slots and 225 epochs in a day.
Solana
The "rewards" and "performance" endpoints, which contains validator rewards and performance data respectively, returns data in daily chunks, indexed on UTC days, epochs, or 20 minute intervals.
The "latency" endpoint, which mainly contains data on validator voting latency, returns real-time data over the last 20 minutes.
Entity granularity on Ethereum
The Rated API supports querying for rewards, performance and metadata at the validator pubkey level, all the way up to a pre-configured operator (list of pubkeys) or pool (list of operators).
We have the capability to aggregate statistics on an arbitrary number of keys, and can pre-configure entity aggregations that follow continuously updated registries (e.g. rated.network/o/Lido).
If that's relevant to your use case, get in touch with us via hello@rated.network.
Time window aggregation on Ethereum
The Rated API also supports aggregation, so days can be rolled up in weeks, months, quarters, years and even all time on Ethereum.
To use this feature, the granularity
query parameter can be used. For example, to obtain monthly aggregates for validator index 100
on Ethereum:
Last updated