Skip to main content
POST
/
api
/
v2
/
ethereum
/
entity
/
mev-timing
💎 MEV Timing
curl --request POST \
  --url https://beaconcha.in/api/v2/ethereum/entity/mev-timing \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "entity": "Lido",
  "chain": "mainnet"
}
'
import requests

url = "https://beaconcha.in/api/v2/ethereum/entity/mev-timing"

payload = {
"entity": "Lido",
"chain": "mainnet"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({entity: 'Lido', chain: 'mainnet'})
};

fetch('https://beaconcha.in/api/v2/ethereum/entity/mev-timing', 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://beaconcha.in/api/v2/ethereum/entity/mev-timing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entity' => 'Lido',
'chain' => 'mainnet'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://beaconcha.in/api/v2/ethereum/entity/mev-timing"

payload := strings.NewReader("{\n \"entity\": \"Lido\",\n \"chain\": \"mainnet\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://beaconcha.in/api/v2/ethereum/entity/mev-timing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entity\": \"Lido\",\n \"chain\": \"mainnet\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://beaconcha.in/api/v2/ethereum/entity/mev-timing")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entity\": \"Lido\",\n \"chain\": \"mainnet\"\n}"

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "timestamp": 1,
      "date": "2023-12-25",
      "slots_with_relay_winners": 1,
      "timing_breakdown": {
        "on_time_mev": 1,
        "timing_games": 1,
        "aggressive_tg": 1
      },
      "median_slot_offset_ms": 123,
      "histogram": [
        {
          "slot_offset_ms_min": 123,
          "slot_offset_ms_max": 123,
          "count": 1,
          "max_value": "<string>"
        }
      ]
    }
  ],
  "range": {
    "slot": {
      "start": 1,
      "end": 1
    },
    "epoch": {
      "start": 1,
      "end": 1
    },
    "timestamp": {
      "start": 1,
      "end": 1
    }
  },
  "paging": {
    "next_cursor": "<string>"
  }
}
{
"error": "Bad request. Please check your input and try again."
}
{
"error": "Unauthorized. Please provide a valid API key."
}
{
"error": "endpoint not allowed for your subscription tier. upgrade your subscription at https://beaconcha.in/pricing."
}
{
"error": "The requested resource was not found."
}
{
"error": "method not allowed: GET. all public API endpoints use POST."
}
{
"error": "Rate limit exceeded. Please try again later."
}
{
"error": "internal server error. please try again later."
}
{
"error": "An unexpected error occurred."
}

Authorizations

Authorization
string
header
required

Authorization header with value: Bearer YOUR_TOKEN. Refer to the API Keys section to create your API key.

Body

application/json
entity
string
required

The name of the entity to retrieve MEV timing statistics for (e.g. "Lido", "Coinbase"). Matching is case-sensitive; use the exact name as returned by the entities overview endpoint.

chain
enum<string>
default:mainnet

The Ethereum chain to query.

Available options:
mainnet,
hoodi
sub_entity
string

Optional sub-entity to scope the statistics. Omit or pass an empty string to get the entity-level aggregate. Matching is case-sensitive; use the exact name as returned by the sub-entities overview endpoint.

range
Unix Timestamp · object

Specify a time range using either Unix timestamps or epoch numbers. If left null, the API will query the entire available history of the selected validators.

cursor
string
default:""

Cursor value for pagination. See our pagination guide for more details.

page_size
integer
default:10

The number of items to return per page.

Required range: 1 <= x <= 10

Response

Successful response.

Paginated response containing per-day MEV timing statistics for the entity.

data
object[]
required
range
object
required

The range of data covered by the results, specified in slots, epochs, and Unix timestamps.

paging
object