Skip to main content
POST
MIDL provides a single JSON-RPC endpoint that supports all standard Ethereum 2.0 JSON-RPC methods, making it a drop-in replacement for EVM-compatible blockchain interactions.

JSON-RPC Methods:

Block Methods

eth_getBlockByNumber

Get block information by block number. Parameters:
  1. blockNumber (string): Block number in hex or “latest”, “earliest”, “pending”
  2. includeTransactions (boolean): If true, returns full transaction objects
Example Request:
Example Response:

eth_getBlockByHash

Get block information by block hash. Parameters:
  1. blockHash (string): Block hash in hexadecimal format
  2. includeTransactions (boolean): If true, returns full transaction objects
Example Request:

eth_blockNumber

Get the current block number. Parameters: None Example Request:
Example Response:

Transaction Methods

eth_getTransactionByHash

Get transaction information by transaction hash. Parameters:
  1. transactionHash (string): Transaction hash in hexadecimal format
Example Request:
Example Response:

eth_getTransactionReceipt

Get transaction receipt by transaction hash. Parameters:
  1. transactionHash (string): Transaction hash in hexadecimal format
Example Request:
Example Response:

Account Methods

eth_getBalance

Get account balance for a specific address. Parameters:
  1. address (string): Account address in hexadecimal format
  2. blockParameter (string): Block number in hex, or “latest”, “earliest”, “pending”
Example Request:
Example Response:

eth_getTransactionCount

Get the transaction count (nonce) for an account. Parameters:
  1. address (string): Account address in hexadecimal format
  2. blockParameter (string): Block number in hex, or “latest”, “earliest”, “pending”
Example Request:
Example Response:

Network Methods

eth_gasPrice

Get the current gas price. Parameters: None Example Request:
Example Response:

eth_chainId

Get the network chain ID. Parameters: None Example Request:
Example Response:

Error Handling

Standard JSON-RPC 2.0 error responses:

Integration Examples

Web3.js

Ethers.js

Rate Limits

API calls are subject to your plan’s rate limits. See billing documentation for details on threshold billing and plan limits.

Authorizations

api-key
string
header
required

Project API Key

Body

application/json

JSON-RPC request payload

jsonrpc
enum<string>
required

JSON-RPC version

Available options:
2.0
method
enum<string>
required

The RPC method to call

Available options:
eth_getBlockByNumber,
eth_getBlockByHash,
eth_blockNumber,
eth_getTransactionByHash,
eth_getTransactionReceipt,
eth_getBalance,
eth_getTransactionCount,
eth_gasPrice,
eth_chainId
id
required

Request identifier

params
any[]

Method parameters

Response

JSON-RPC response payload

jsonrpc
enum<string>
required
Available options:
2.0
id
required
result
any

Result data (present on success)

error
object

Error object (present on error)