Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bundle data API #460

Merged
merged 8 commits into from
Jan 6, 2025
Merged

feat: bundle data API #460

merged 8 commits into from
Jan 6, 2025

Conversation

irrun
Copy link
Contributor

@irrun irrun commented Nov 22, 2024

Description

4.4.1.3 Query Bundle Data

This API enables MEV data analysts to query bundle information from builders.
It is particularly useful for MEV data providers who need to analyze market trends and create analytics dashboards.
For instance, to accurately measure MEV market activity, providers can use this API to display metrics such as
daily bundle counts and bundles per block in their analytics panels.

Request:

{
  "jsonrpc": "2.0",
  "method": "mev_bundles",
  "params": [
    {
      "fromBlock": "0x1",
      "toBlock": "0x3"
    }
  ],
  "id": 1
}

Params:

  • fromBlock: It is hex value of a block number.
  • toBlock: Either the hex value of a block number OR block tags: "latest", "pending" or nil. Defaults to "latest". It
    should be no less than fromBlock and less than fromBlock+100.

Response:

  • Return bundles whose first-received-height(receivedBlock) is within the block range [fromBlock, toBlock].
{
  "jsonrpc": "2.0",
  "result": [
    {
      "receivedBlock": "0x1",
      "bundles": [
        ["0x88...44b", "0x89..45b"], // tx hase list in the bundle
        ["0x90...46b"]
      ]
    },
    {
      "receivedBlock": "0x2",
      "bundles": [
        ["0x23...24b", "0x39..45b"],
        ["0x43...55a", "0x45..33a", "0x39..45b"]  //  it is possible that a same tx hash exists in different block
      ]
    }
  ],
  "id": 1
}

BEPs/BEP322.md Outdated Show resolved Hide resolved
BEPs/BEP322.md Outdated Show resolved Hide resolved
BEPs/BEP322.md Outdated Show resolved Hide resolved
BEPs/BEP322.md Outdated Show resolved Hide resolved
@unclezoro unclezoro merged commit 8c1e757 into master Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants