Get metadata on the Rated Ethereum API endpoints
curl --request GET \
--url https://api.rated.network/v1/eth/apiMetadata \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rated.network/v1/eth/apiMetadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rated.network/v1/eth/apiMetadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rated.network/v1/eth/apiMetadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rated.network/v1/eth/apiMetadata"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rated.network/v1/eth/apiMetadata")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rated.network/v1/eth/apiMetadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"day": 1337,
"endEpoch": 301049,
"endSlot": 9633599,
"fromDate": "2024-07-30T12:00:23",
"startEpoch": 300825,
"startSlot": 9626400,
"toDate": "2024-07-31T12:00:11"
}{
"detail": [
{
"msg": "<string>",
"type": "<string>",
"loc": [
"<string>"
]
}
]
}Metadata
Get metadata on the Rated Ethereum API endpoints
This endpoint returns information about the latest data available from Rated’s Ethereum API endpoints.
GET
/
v1
/
eth
/
apiMetadata
Get metadata on the Rated Ethereum API endpoints
curl --request GET \
--url https://api.rated.network/v1/eth/apiMetadata \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rated.network/v1/eth/apiMetadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rated.network/v1/eth/apiMetadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rated.network/v1/eth/apiMetadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rated.network/v1/eth/apiMetadata"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rated.network/v1/eth/apiMetadata")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rated.network/v1/eth/apiMetadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"day": 1337,
"endEpoch": 301049,
"endSlot": 9633599,
"fromDate": "2024-07-30T12:00:23",
"startEpoch": 300825,
"startSlot": 9626400,
"toDate": "2024-07-31T12:00:11"
}{
"detail": [
{
"msg": "<string>",
"type": "<string>",
"loc": [
"<string>"
]
}
]
}This endpoint is available only to annual commitment and custom Enterprise plans. Get in touch with [email protected] to learn more.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Available options:
mainnet, hoodi, holesky Query Parameters
Returns results based on UTC days (true) or ETH chain days (false)
Response
Successful Response