RPC Endpoints

Ethereum RPC endpoints

You can point any Ethereum libraries and tools to an IoTeX RPC node. Below you find a list of official and third-party RPC endpoints on the IoTeX blockchain that you can use with any Ethereum wallet or tool:

Mainnet

Endpoint
Provider
More
https://babel-api.mainnet.iotex.io
IoTeX Foundation
https://babel-api.mainnet.iotex.one
IoTeX Foundation
https://iotexrpc.com
Ankr
https://rpc.ankr.com/iotex
Ankr
https://iotex-rpc.gateway.pokt.network
Pocket Network
Testnet
Endpoint
Text
More
https://babel-api.testnet.iotex.io
IoTeX Foundation
Example
To get the balance of the IoTeX address ukzv5m6xnsg3gzaec3shew8nw03cch2x53d6v6 you first convert it into the Ethereum address format using ioctl:
$ ioctl account ethaddr io1ukzv5m6xnsg3gzaec3shew8nw03cch2x53d6v6
io1ukzv5m6xnsg3gzaec3shew8nw03cch2x53d6v6 - 0xE584ca6F469c11140Bb9c4617Cb8f373E38C5D46
which gives you the following Ethereum address:0xE584ca6F469c11140Bb9c4617Cb8f373E38C5D46.
Then you can query the Babel endpoint according to the Ethereum JSON RPC API:
» curl -X POST -H "Content-Type:application/json" --data '{"id": 1, "jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xE584ca6F469c11140Bb9c4617Cb8f373E38C5D46", ""]}' http://babel-api.mainnet.iotex.io
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x10f0cf064dd59200000"
}
Which returns the balance 0x10f0cf064dd59200000 (hex) for the address, expressed in Rau units (i.e. 5000000000000000000000 Rau, equivalent to 5000 IOTX).
Check out the official Ethereum JSON-RPC API Documentation at:
json-rpc
Ethereum Wiki
Official Ethereum JSON-RPC API Documentation

Chain ID

The chainID chain identifier was introduced by Ethereum in EIP-155 to prevent replay attacks between Ethereum-compatible chains, it is a way to tell chains apart, where Ethereum was assigned a chainID of 1.
In respect of this EIP, IoTeX chainIDs have been picked as follows:
Network
chainID
IoTeX Mainnet
4689
IoTeX Testnet
4690

Supported APIs

Below is the list of the currently supported APIs:
  • eth_accounts
  • eth_blockNumber
  • eth_call
  • eth_chainId
  • eth_estimateGas
  • eth_gasPrice
  • eth_getBalance
  • eth_getBlockByHash
  • eth_getBlockByNumber
  • eth_getBlockTransactionCountByHash
  • eth_getBlockTransactionCountByNumber
  • eth_getCode
  • eth_getFilterChanges
  • eth_getFilterLogs
  • eth_getLogs
  • eth_getStorageAt
  • eth_getTransactionByBlockHashAndIndex
  • eth_getTransactionByBlockNumberAndIndex
  • eth_getTransactionByHash
  • eth_getTransactionCount
  • eth_getTransactionReceipt
  • eth_hashrate
  • eth_mining
  • eth_newBlockFilter
  • eth_newFilter
  • eth_protocolVersion
  • eth_sendRawTransaction
  • eth_syncing
  • eth_uninstallFilter
  • net_listening
  • net_peerCount
  • net_version
  • web3_clientVersion
Additional API methods support can be requested by posting an issue in the GitHub repository below:
Issues · iotexproject/iotex-core
GitHub
Export as PDF
Copy link
On this page
Ethereum RPC endpoints
Chain ID
Supported APIs