Supported Chains: C-I (4/4)
Supported chains C-I on the Web3 API platform. See the full chain list for every network.
IoTeX
Available for Freemium and Premium users.
IoTeX API is available on Web3 API platform.
IoTeX Network is the lightning-fast, ultra-secure, and highly scalable blockchain platform that connects real world data to on-chain Dapps.
Official quick links: Website, Docs, GitHub
Networks
- Mainnet (
HTTPSandWSS) - Testnet (
HTTPSandWSS)
Add networks to MetaMask
Using Ankr as the blockchain provider for MetaMask makes user interaction on Web3 not just easy and slick but also PRIVATE. We DON'T collect users' blockchain addresses — end of the story. Feel free to check our terms and privacy policy to be sure.
For MetaMask to interact with IoTeX through Ankr's infrastructure, add a required IoTeX network either via Web3 API platform's or MetaMask's UI.
Via Web3 API platform
To be added soon.
Via MetaMask
To add IoTeX Mainnet, follow these steps:
-
In MetaMask extension, click Networks (drop-down menu) > Add network to open Settings.
-
In the Add a network pane, click Add a network manually, then enter the network details and click Save:
- Network name:
IoTeX Mainnet by Ankr RPC. - New RPC URL:
https://rpc.ankr.com/iotex/{your_token}. - Chain ID:
4689. - Currency symbol:
IOTX. - Block explorer URL:
https://iotexscan.io/.
- Network name:
Congrats — you've just added Ankr as the blockchain provider for MetaMask to interact with IoTeX Mainnet.
API methods
For IoTeX, we support blockchain interaction via all the applicable methods except for those listed as unsupported.
Unsupported
This section contains a list of methods we don't support for Premium service plan.
If you require any of the methods from the list, contact our Sales (sales@ankr.com) about moving to the Enterprise service plan that can provide the services tailored to your specific needs.
HTTPS:
eth_newFilter, eth_getFilterChanges, eth_syncing, eth_coinbase, eth_hashrate, eth_mining, eth_getWork, eth_submitWork, eth_submitHashrate, eth_accounts, eth_getStorageAt, eth_getUncleCountByBlockHash, eth_getUncleCountByBlockNumber, eth_sign, eth_signTransaction, eth_sendTransaction, eth_getUncleByBlockHashAndIndex, eth_getUncleByBlockNumberAndIndex, eth_newBlockFilter, eth_newPendingTransactionFilter, eth_uninstallFilter, eth_getFilterLogs, eth_pendingTransactions,
debug_* (exception: debug_traceBlockByHash, debug_traceBlockByNumber, debug_traceTransaction, debug_traceCall, debug_traceBlock),
personal_*, admin_*, clique_*, les_*, miner_*, db_*, shh_*
WSS:
txpool_content, txpool_inspect, txpool_status, txpool_contentFrom
API querying
Request example
- cURL
- Golang
- Web3.JS
- Python
curl -X POST https://rpc.ankr.com/iotex/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc":"2.0",
"method":"eth_blockNumber",
"params": [],
"id":1
}'
package main
import (
"context"
"fmt"
"github.com/ethereum/go-ethereum/ethclient"
)
func main() {
const url = "https://rpc.ankr.com/iotex/{your_token}" // url string
rpcClient,err := ethclient.Dial(url)
if err != nil {
panic(err)
}
blockNumber, err := rpcClient.BlockNumber(context.Background())
if err != nil {
panic(err)
}
fmt.Println(blockNumber)
}
const Web3 = require('web3');
const url = 'https://rpc.ankr.com/iotex/{your_token}' // url string
const web3 = new Web3(new Web3.providers.HttpProvider(url));
web3.eth.getBlockNumber((error, blockNumber) => {
if(!error) {
console.log(blockNumber);
} else {
console.log(error);
}
});
from web3 import Web3
def test_block_number(self):
url = 'https://rpc.ankr.com/iotex/{your_token}' # url string
web3 = Web3(HTTPProvider(url))
print(web3.eth.block_number)
Response example
{
"id":1,
"jsonrpc":"2.0",
"result":"0x139dbf4"
}