curl --request POST \
--url https://midl-regtest.gomaestro-api.org/v0/rpc \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1b4"
}Node RPC API
JSON-RPC
A drop-in replacement for Ethereum JSON-RPC interface supporting all standard methods.
POST
/
rpc
curl --request POST \
--url https://midl-regtest.gomaestro-api.org/v0/rpc \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1b4"
}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.
Get block information by block number.
Parameters:
Example Response:
Get block information by block hash.
Parameters:
Get the current block number.
Parameters: None
Example Request:
Example Response:
Get transaction information by transaction hash.
Parameters:
Example Response:
Get transaction receipt by transaction hash.
Parameters:
Example Response:
Get account balance for a specific address.
Parameters:
Example Response:
Get the transaction count (nonce) for an account.
Parameters:
Example Response:
Get the current gas price.
Parameters: None
Example Request:
Example Response:
Get the network chain ID.
Parameters: None
Example Request:
Example Response:
JSON-RPC Methods:
Block Methods
eth_getBlockByNumber
Get block information by block number.
Parameters:
blockNumber(string): Block number in hex or “latest”, “earliest”, “pending”includeTransactions(boolean): If true, returns full transaction objects
{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", true],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"number": "0x1b4",
"hash": "0x1234567890abcdef...",
"parentHash": "0x...",
"gasLimit": "0x1c9c380",
"gasUsed": "0x...",
"timestamp": "0x...",
"transactions": [...]
}
}
eth_getBlockByHash
Get block information by block hash.
Parameters:
blockHash(string): Block hash in hexadecimal formatincludeTransactions(boolean): If true, returns full transaction objects
{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": ["0x1234567890abcdef...", true],
"id": 1
}
eth_blockNumber
Get the current block number.
Parameters: None
Example Request:
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4b7"
}
Transaction Methods
eth_getTransactionByHash
Get transaction information by transaction hash.
Parameters:
transactionHash(string): Transaction hash in hexadecimal format
{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0x1234567890abcdef..."],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"hash": "0x1234567890abcdef...",
"blockNumber": "0x1b4",
"blockHash": "0x...",
"transactionIndex": "0x0",
"from": "0x...",
"to": "0x...",
"value": "0x...",
"gas": "0x5208",
"gasPrice": "0x...",
"input": "0x"
}
}
eth_getTransactionReceipt
Get transaction receipt by transaction hash.
Parameters:
transactionHash(string): Transaction hash in hexadecimal format
{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0x1234567890abcdef..."],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x1234567890abcdef...",
"blockNumber": "0x1b4",
"blockHash": "0x...",
"transactionIndex": "0x0",
"from": "0x...",
"to": "0x...",
"gasUsed": "0x5208",
"cumulativeGasUsed": "0x5208",
"status": "0x1",
"logs": []
}
}
Account Methods
eth_getBalance
Get account balance for a specific address.
Parameters:
address(string): Account address in hexadecimal formatblockParameter(string): Block number in hex, or “latest”, “earliest”, “pending”
{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0x1234567890abcdef...", "latest"],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
eth_getTransactionCount
Get the transaction count (nonce) for an account.
Parameters:
address(string): Account address in hexadecimal formatblockParameter(string): Block number in hex, or “latest”, “earliest”, “pending”
{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": ["0x1234567890abcdef...", "latest"],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
Network Methods
eth_gasPrice
Get the current gas price.
Parameters: None
Example Request:
{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x09184e72a000"
}
eth_chainId
Get the network chain ID.
Parameters: None
Example Request:
{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
Error Handling
Standard JSON-RPC 2.0 error responses:{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32601,
"message": "Method not found"
}
}
Integration Examples
Web3.js
const Web3 = require('web3');
const web3 = new Web3('https://midl-mainnet.gomaestro-api.org/v0');
// Set default headers for API key
web3.currentProvider.headers = {
'api-key': 'YOUR_API_KEY'
};
// Get latest block
const block = await web3.eth.getBlock('latest');
Ethers.js
const { JsonRpcProvider } = require('ethers');
const provider = new JsonRpcProvider('https://midl-mainnet.gomaestro-api.org/v0', {
headers: {
'api-key': 'YOUR_API_KEY'
}
});
// Get account balance
const balance = await provider.getBalance('0x...');
Rate Limits
API calls are subject to your plan’s rate limits. See billing documentation for details on threshold billing and plan limits.Authorizations
Project API Key
Body
application/json
JSON-RPC request payload
JSON-RPC version
Available options:
2.0 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 Request identifier
Method parameters
Was this page helpful?

