Skip to content

Bundle API

Ethereum Bundle API 1.0

Endpoints


POST /eth_callBundle

Simulate a bundle of transactions

Description

Simulate a bundle of transactions at the top of a given block with the state of another (or the same) block. This can be used to simulate future blocks with the current state, or it can be used to simulate a past block. The sender is responsible for signing the transactions and using the correct nonce and ensuring validity.

Request body

{
    "txs": [
        "string"
    ],
    "blockNumber": "string",
    "stateBlockNumberOrHash": "string",
    "coinbase": "string",
    "timestamp": 219,
    "timeout": 282,
    "gasLimit": 48,
    "difficulty": "string",
    "baseFee": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "type": "object",
    "properties": {
        "txs": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "description": "An array of signed transaction data in hexadecimal format."
        },
        "blockNumber": {
            "type": "string",
            "description": "The block number for which the bundle is targeted."
        },
        "stateBlockNumberOrHash": {
            "type": "string",
            "description": "The block number or hash for which the state should be used."
        },
        "coinbase": {
            "type": "string",
            "nullable": true,
            "description": "The address of the miner of the block; optional."
        },
        "timestamp": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "description": "The timestamp of the block; optional."
        },
        "timeout": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "description": "Timeout in milliseconds for the simulation; optional."
        },
        "gasLimit": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "description": "Gas limit for the block; optional."
        },
        "difficulty": {
            "type": "string",
            "nullable": true,
            "description": "The difficulty of the block; optional, in hexadecimal."
        },
        "baseFee": {
            "type": "string",
            "nullable": true,
            "description": "The base fee per gas of the block; optional, in hexadecimal."
        }
    }
}

Response 200 OK

{
    "results": [
        {
            "gasUsed": 0
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "results": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "gasUsed": {
                        "type": "integer",
                        "description": "The amount of gas used by the transaction."
                    }
                }
            }
        }
    }
}

Response 400 Bad Request


POST /eth_estimateGasBundle

Estimate gas for a bundle of transactions

Description

Estimate the gas required for executing a bundle of transactions without actually sending them to the network. This is useful for predicting gas usage and costs.

Request body

{
    "txs": [
        "string"
    ],
    "blockNumber": "string",
    "stateBlockNumberOrHash": "string",
    "coinbase": "string",
    "timestamp": 46,
    "timeout": 83,
    "gasLimit": 173,
    "difficulty": "string",
    "baseFee": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "type": "object",
    "properties": {
        "txs": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "description": "An array of signed transaction data in hexadecimal format."
        },
        "blockNumber": {
            "type": "string",
            "description": "The block number for which the bundle is targeted."
        },
        "stateBlockNumberOrHash": {
            "type": "string",
            "description": "The block number or hash for which the state should be used."
        },
        "coinbase": {
            "type": "string",
            "nullable": true,
            "description": "The address of the miner of the block; optional."
        },
        "timestamp": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "description": "The timestamp of the block; optional."
        },
        "timeout": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "description": "Timeout in milliseconds for the simulation; optional."
        },
        "gasLimit": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "description": "Gas limit for the block; optional."
        },
        "difficulty": {
            "type": "string",
            "nullable": true,
            "description": "The difficulty of the block; optional, in hexadecimal."
        },
        "baseFee": {
            "type": "string",
            "nullable": true,
            "description": "The base fee per gas of the block; optional, in hexadecimal."
        }
    }
}

Response 200 OK

{
    "results": [
        {
            "gasUsed": 0
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "results": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "gasUsed": {
                        "type": "integer",
                        "description": "The estimated amount of gas used by the transaction."
                    }
                }
            }
        }
    }
}

Response 400 Bad Request


Schemas

CallBundleArgs

Name Type
baseFee string| null
blockNumber string
coinbase string| null
difficulty string| null
gasLimit integer(int64)| null
stateBlockNumberOrHash string
timeout integer(int64)| null
timestamp integer(int64)| null
txs Array<string>