Logo
RPC Assistant

Metis API: Chain Settings, RPC Methods, and Provider Selection

Summary

The Metis API refers to the JSON-RPC interface for the Metis Andromeda Layer 2 blockchain, an Ethereum-compatible rollup. This article covers chain configuration, essential RPC methods, how to connect wallets and dApps, and criteria for choosing a reliable RPC provider for production workloads.

Metis API Decision Checklist

Before integrating the Metis API, evaluate these criteria to ensure your infrastructure matches your workload:

CriterionWhat to checkWhy it matters
Chain ID1088 (Metis Andromeda mainnet)Wrong chain ID causes transaction rejection
RPC endpoint reliabilityUptime history, rate limits, failover supportUnreliable endpoints break dApps and cause user frustration
Archive data availabilitySupport for eth_getLogs and eth_call with historical blocksRequired for analytics, indexing, and event history
WebSocket supportWSS endpoint for real-time subscriptionsNeeded for live updates in wallets and trading apps
Gas estimation accuracyeth_estimateGas response consistencyPrevents transaction failures due to underpriced gas
Provider transparencyPublished rate limits, pricing, and termsAvoids unexpected throttling or costs
Testnet availabilitySepolia-based Metis testnet for developmentEssential for safe testing before mainnet deployment

What Is the Metis API?

The Metis API is the JSON-RPC interface for the Metis Andromeda blockchain, an Ethereum Layer 2 (L2) scaling solution that uses optimistic rollups. It is fully compatible with the Ethereum JSON-RPC specification, meaning any tool or library that works with Ethereum (e.g., ethers.js, web3.js, Hardhat) can connect to Metis by pointing to a Metis RPC endpoint.

Developers use the Metis API to:

  • Send transactions and deploy smart contracts
  • Query on-chain data such as balances, logs, and transaction receipts
  • Estimate gas costs and simulate contract calls
  • Subscribe to real-time events via WebSocket

Because Metis is EVM-equivalent, migrating dApps from Ethereum or other EVM chains requires minimal changes—typically just updating the RPC endpoint and chain ID.


Metis Chain Settings

To connect to Metis Andromeda, configure your wallet or application with the following parameters:

ParameterValue
Network NameMetis Andromeda
RPC URL(Provided by your RPC provider)
Chain ID1088
Currency SymbolMETIS
Block Explorerhttps://andromeda-explorer.metis.io
WebSocket URL(Provided by your RPC provider)

For the Metis Sepolia testnet, use chain ID 59902 and the corresponding testnet explorer.


Common RPC Methods on Metis

Since Metis is EVM-compatible, standard Ethereum JSON-RPC methods work identically. Here are the most frequently used ones:

eth_getBalance

Returns the balance of an address.

curl -X POST https://your-metis-rpc.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getBalance",
    "params": ["0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18", "latest"],
    "id": 1
  }'

eth_call

Executes a smart contract call without creating a transaction.

curl -X POST https://your-metis-rpc.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [{"to": "0x...", "data": "0x..."}, "latest"],
    "id": 1
  }'

eth_getLogs

Retrieves event logs matching a filter. Useful for indexing token transfers or contract events.

curl -X POST https://your-metis-rpc.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getLogs",
    "params": [{
      "address": "0x...",
      "fromBlock": "0x0",
      "toBlock": "latest"
    }],
    "id": 1
  }'

eth_estimateGas

Estimates the gas required for a transaction.

curl -X POST https://your-metis-rpc.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_estimateGas",
    "params": [{
      "from": "0x...",
      "to": "0x...",
      "value": "0x0",
      "data": "0x..."
    }],
    "id": 1
  }'

eth_subscribe (WebSocket)

Subscribes to real-time events. Requires a WebSocket connection.

const WebSocket = require('ws');
const ws = new WebSocket('wss://your-metis-rpc.com');

ws.on('open', () => {
  ws.send(JSON.stringify({
    jsonrpc: '2.0',
    method: 'eth_subscribe',
    params: ['newHeads'],
    id: 1
  }));
});

ws.on('message', (data) => {
  console.log(JSON.parse(data));
});

Connecting Wallets and dApps

Most EVM wallets (MetaMask, WalletConnect, etc.) allow adding custom networks. Use the chain settings table above. For programmatic access, configure your provider library:

ethers.js

import { ethers } from 'ethers';

const provider = new ethers.JsonRpcProvider('https://your-metis-rpc.com', 1088);
const signer = provider.getSigner();

web3.js

import Web3 from 'web3';

const web3 = new Web3('https://your-metis-rpc.com');

Choosing a Metis RPC Provider

Public RPC endpoints (like those from Metis official docs) are suitable for testing but often have strict rate limits and no SLA. For production dApps, consider a managed RPC service that offers:

  • Dedicated endpoints: Private RPC URLs with higher throughput and no shared throttling.
  • Archive data: Full historical state for queries like eth_getLogs from genesis.
  • WebSocket support: For real-time subscriptions.
  • Geographic distribution: Low-latency access from multiple regions.
  • Transparent pricing: Predictable costs based on usage or flat fee.

OnFinality provides RPC endpoints for Metis Andromeda and testnet, with options for public access and dedicated nodes. Check the pricing page for details.


Troubleshooting Common Issues

"Chain ID mismatch"

Ensure your wallet or application uses chain ID 1088 for mainnet and 59902 for testnet.

"Rate limit exceeded"

Public endpoints often cap requests per second. Switch to a private endpoint or upgrade your plan.

"eth_getLogs returns empty"

Verify the contract address and block range. Some providers limit the range for archive queries; use a provider with full archive support.

"WebSocket disconnects frequently"

Check your provider's WebSocket stability. Dedicated endpoints typically offer more reliable connections.


Key Takeaways

  • The Metis API is fully EVM-compatible, so existing Ethereum tooling works with minimal changes.
  • Chain ID 1088 is critical for Metis Andromeda; testnet uses 59902.
  • Standard JSON-RPC methods like eth_getBalance, eth_call, and eth_getLogs are used for data retrieval.
  • For production, choose a provider with dedicated endpoints, archive support, and WebSocket capabilities.
  • OnFinality offers Metis RPC endpoints as part of its supported networks.

Frequently Asked Questions

Q: Is the Metis API the same as Ethereum's JSON-RPC? A: Yes, Metis implements the Ethereum JSON-RPC specification, so methods and parameters are identical.

Q: What is the Metis testnet RPC URL? A: The Metis Sepolia testnet uses chain ID 59902. Contact your RPC provider for the endpoint URL.

Q: Can I use Metis API for free? A: Public endpoints are available for testing, but production use requires a paid plan to avoid rate limits.

Q: Does Metis support WebSocket? A: Yes, most providers offer WSS endpoints for real-time subscriptions.

Q: How do I get a dedicated Metis RPC endpoint? A: Services like OnFinality provide dedicated nodes and RPC endpoints. Visit the networks page for details.

RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started