Supported Chains: 0G-B (3/3)
Supported chains 0G-B on the Web3 API platform. See the full chain list for every network.
Base
Available for Freemium and Premium users.
Base API is available on Web3 API platform.
Base is a secure, low-cost, developer-friendly Ethereum L2 built to bring the next billion users to web3.
Base is built on the Bedrock release of the OP Stack, which is designed from the ground up to be as close to Ethereum as possible. Because of this, there are very little differences when it comes to building on Base and Ethereum.
However, there are still some minor discrepancies between the behavior of Base and Ethereum that you should be aware of when building apps on top of Base.
These minor differences include:
Official quick links: Website, Docs, GitHub
Networks
- Mainnet (
HTTPSandWSS) - Testnet:
- Sepolia (
HTTPSandWSS)
- Sepolia (
API methods
For Base, 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_coinbase, eth_hashrate, eth_mining, eth_getWork,eth_submitWork, eth_submitHashrate, net_peerCount, eth_newBlockFilter, eth_newPendingTransactionFilter, eth_uninstallFilter, eth_getFilterLogs,
debug_* (exception: debug_traceBlockByHash, debug_traceBlockByNumber, debug_traceTransaction, debug_traceCall, debug_traceBlock),
personal_*, admin_*, clique_*, les_*, miner_*, engine_*, parity_*
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/base/{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/base/{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/base/{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/base/{your_token}' # url string
web3 = Web3(HTTPProvider(url))
print(web3.eth.block_number)
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x459996"
}
Bitcoin
Available for Freemium and Premium users.
Bitcoin API is available on Web3 API platform.
Bitcoin API provides the means for communication with the Bitcoin’s public ledger.
Official quick links: Website, Docs, GitHub
Networks
- Mainnet (
HTTPS) - Signet Testnet (
HTTPS)
API methods
For Bitcoin, we support blockchain interaction via the following interfaces:
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.
Bitcoin's HTTPS:
savemempool, verifychain, getmemoryinfo, getrpcinfo, gettransaction, help, logging, stop, uptime, getblocktemplate, getmininginfo, getnetworkhashps, pruneblockchain, generateblock, generatetoaddress, generatetodescriptor, prioritisetransaction, submitblock, submitheader, addnode, clearbanned, disconnectnode, getaddednodeinfo, getconnectioncount, getnettotals, getnetworkinfo, getnodeaddresses, getpeerinfo, listbanned, ping, setban, setnetworkactive, signrawtransactionwithkey, createmultisig, getdescriptorinfo, signmessagewithprivkey, abandontransaction, abortrescan, addmultisigaddress, backupwallet, bumpfee, createwallet, dumpprivkey, dumpwallet, encryptwallet, getaddressesbylabel, getbalance, getbalances, getnewaddress, getrawchangeaddress, getreceivedbyaddress, getreceivedbylabel, getunconfirmedbalance, getwalletinfo, importaddress, importdescriptors, importmulti, importprivkey, importprunedfunds, importpubkey, importwallet, keypoolrefill, listaddressgroupings, listlabels, listlockunspent, listreceivedbyaddress, listreceivedbylabel, listtransactions, listsinceblock, listunspent, listwalletdir, listwallets, loadwallet, lockunspent, psbtbumpfee, removeprunedfunds, rescanblockchain, send, sendmany, sendtoaddress, sethdseed, setlabel, setwalletflag, signmessage, settxfee, signrawtransactionwithwallet, unloadwallet, upgradewallet, walletcreatefundedpsbt, walletlock, walletpassphrase, walletpassphrasechange, walletprocesspsbt, deriveaddresses, fundrawtransaction, scantxoutset, preciousblock, gettxoutsetinfo
Blockbook API:
- All WebSocket methods
- All
socket.iomethods
API querying
Request example
- Bitcoin JSON-RPC
- Blockbook REST
curl -X POST https://rpc.ankr.com/btc/{your_token} \
-d '{
"id": "hmm",
"method": "getindexinfo",
"params": []
}'
curl -X GET https://rpc.ankr.com/premium-http/btc_blockbook/{your_token}/api/v2/utxo/bc1qxhmdufsvnuaaaer4ynz88fspdsxq2h9e9cetdj?confirmed=true
Response example
- Bitcoin
- Blockbook
{
"result": {
"txindex": {
"synced": true,
"best_block_height": 843277
},
"basic block filter index": {
"synced": true,
"best_block_height": 843277
}
},
"error": null,
"id": "hmm"
}
[
{
"txid": "c80f70c48aff883b060aed28544aec0fbdeb3db913a214d37194cee6337b0437",
"vout": 1,
"value": "319691557",
"height": 854658,
"confirmations": 3,
"coinbase": true
},
{
"txid": "d6957ef0d3a8a13b369f4996f3a80182acc26445508f22ac50a4cea468663f06",
"vout": 1,
"value": "317092804",
"height": 854649,
"confirmations": 12,
"coinbase": true
},
{
"txid": "9b11befa61b7e7bc7440fcb68213c6ecf2c19f50bfac4fc5a4bbe37dad138d0d",
"vout": 1,
"value": "319367244",
"height": 854646,
"confirmations": 15,
"coinbase": true
}
]
Bitlayer
Bitlayer API is available on Web3 API platform.
Bitlayer is the first Bitcoin security-equivalent layer 2 based on BitVM. It consists of an EVM compatible chain/sequencer that can map BTC ecological assets and facilitate the entry of BTC users.
Official quick links: Website, Docs, GitHub
Networks
- Mainnet (
HTTPSandWSS) - Testnet (
HTTPSandWSS)
API methods
For Bitlayer, 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_coinbase, eth_hashrate, eth_mining, eth_getWork,eth_submitWork, eth_submitHashrate, net_peerCount, eth_newBlockFilter, eth_newPendingTransactionFilter, eth_uninstallFilter, eth_getFilterLogs,
debug_* (exception: debug_traceBlockByHash, debug_traceBlockByNumber, debug_traceTransaction, debug_traceCall, debug_traceBlock),
personal_*, admin_*, clique_*, les_*, miner_*, engine_*, parity_*
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/bitlayer \
-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/bitlayer" // 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/bitlayer' // 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/bitlayer' # url string
web3 = Web3(HTTPProvider(url))
print(web3.eth.block_number)
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4718"
}
Blast
Blast API is available on Web3 API platform.
Blast is the only Ethereum L2 with native yield for ETH and stablecoins.
Official quick links: Website, Docs
Networks
- Mainnet (
HTTPSandWSS) - Sepolia Testnet (
HTTPSandWSS)
API methods
For Blast, 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_coinbase, eth_hashrate, eth_mining, eth_getWork,eth_submitWork, eth_submitHashrate, net_peerCount, eth_newBlockFilter, eth_newPendingTransactionFilter, eth_uninstallFilter, eth_getFilterLogs,
debug_* (exception: debug_traceBlockByHash, debug_traceBlockByNumber, debug_traceTransaction, debug_traceCall, debug_traceBlock),
personal_*, admin_*, clique_*, les_*, miner_*, engine_*, parity_*
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/blast_testnet_sepolia \
-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/blast_testnet_sepolia" // 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/blast_testnet_sepolia' // 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/blast_testnet_sepolia' # url string
web3 = Web3(HTTPProvider(url))
print(web3.eth.block_number)
Response example
{
"jsonrpc":"2.0",
"id":1,
"result":"0x1e7a17"
}
BNB Smart Chain
Available for Freemium and Premium users.
BNB Smart Chain API is available on Web3 API platform.
BNB Smart Chain (BSC) (previously Binance Smart Chain) is an innovative solution to bring programmability and interoperability to Beacon Chain. BNB Smart Chain relies on a system of 21 active validators with Proof of Staked Authority (PoSA) consensus that can support short block time and lower fees. The most bonded validator candidates of staking will become validators and produce blocks. The double-sign detection and other slashing logic guarantee security, stability, and chain finality.
To the EVM compatibility that permits support for Ethereum tools and DApps, BNB Smart Chain adds smart contract functionality to the chain. The dual-chain architecture alongside Binance Chain enables sending and receiving of BNB and BEP2 tokens cross-chain.
Official quick links: Website, Docs, GitHub
Networks
- Mainnet (
HTTPSandWSS) - Chapel 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 BNB Smart Chain through Ankr's infrastructure, add a required BNB Smart Chain network either via Web3 API platform's or MetaMask's UI.
Via Web3 API platform
To be added soon.
Via MetaMask
To add BNB Smart Chain 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:
BNB Smart Chain Mainnet by Ankr RPC. - New RPC URL:
https://rpc.ankr.com/bsc/{your_token}. - Chain ID:
56. - Currency symbol:
BNB. - Block explorer URL:
https://bscscan.com/.
- Network name:
Congrats — you've just added Ankr as the blockchain provider for MetaMask to interact with BNB Smart Chain Mainnet.
To add BNB Smart Chain Testnet, 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:
BNB Smart Chain Chapel Testnet by Ankr RPC. - New RPC URL:
https://rpc.ankr.com/bsc_testnet_chapel/{your_token}. - Chain ID:
97. - Currency symbol:
BNB. - Block explorer URL:
https://testnet.bscscan.com/.
- Network name:
Congrats — you've just added Ankr as the blockchain provider for MetaMask to interact with BNB Smart Chain Chapel Testnet.
API methods
For BNB Smart Chain, 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_coinbase, eth_hashrate, eth_mining, eth_getWork,eth_submitWork, eth_submitHashrate, net_peerCount, eth_newBlockFilter, eth_newPendingTransactionFilter, eth_uninstallFilter, eth_getFilterLogs,
debug_* (exception: debug_traceBlockByHash, debug_traceBlockByNumber, debug_traceTransaction, debug_traceCall, debug_traceBlock),
personal_*, admin_*, clique_*, les_*, miner_*, engine_*, parity_*
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/bsc/{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/bsc/{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/bsc/{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/bsc/{your_token}' # url string
web3 = Web3(HTTPProvider(url))
print(web3.eth.block_number)
Response example
{
"jsonrpc":"2.0",
"id":1,
"result":"0x1601d3a"
}
Botanix
Botanix API is available on Web3 API platform.
Botanix is a decentralized Turing-complete Layer 2 EVM built on the native currency of bitcoin. It operates using two core components:
- Ethereum Virtual Machine: Fortified by a Proof-of-Stake consensus protocol that leverages Bitcoin's Proof-of-Work for superior security. Stakes are represented by actual bitcoin stored securely within multi-signature wallets on the Bitcoin network. By supporting EVM, Botanix allows developers to seamlessly port existing Ethereum dApps to the Bitcoin ecosystem.
- Spiderchain Protocol: At the core of Botanix is the Spiderchain, a series of successive multisignature (multisig) wallets managed by randomized sets of orchestrators. This structure secures user funds and facilitates the movement of Bitcoin within the network, effectively separating Bitcoin "the asset" from Bitcoin "the blockchain." By securing the Bitcoin present on Botanix in a decentralized chain of multisigs, it separates Bitcoin from the EVM. This allows for a transition from Bitcoin’s UTXO model to an account model used in the EVM.
Official quick links: Website, Docs, GitHub
Networks
- Mainnet (
HTTPSandWSS) - Testnet (
HTTPSandWSS)
API methods
For Botanix, 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_coinbase, eth_hashrate, eth_mining, eth_getWork,eth_submitWork, eth_submitHashrate, net_peerCount, eth_newBlockFilter, eth_newPendingTransactionFilter, eth_uninstallFilter, eth_getFilterLogs,
debug_* (exception: debug_traceBlockByHash, debug_traceBlockByNumber, debug_traceTransaction, debug_traceCall, debug_traceBlock),
personal_*, admin_*, clique_*, les_*, miner_*, engine_*, parity_*
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/botanix_testnet \
-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/botanix_testnet" // 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/botanix_testnet' // 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/botanix_testnet' # url string
web3 = Web3(HTTPProvider(url))
print(web3.eth.block_number)
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5c061"
}