BSC/ opBNB RPC

The 4EVERLAND RPC follows the JSON-RPC data format standard for Ethereum and supports all the methods in Ethereum JSON RPC. This tutorial will provide an example of the request method for eth_getBalance. Other methods can be referenced using this example.

API Endpoints

The requested URL, combined with the API Key, is as follows:

Endpoint(https): https://bsc-mainnet.4everland.org/v1/{apikey}

Endpoint(wss): wss://bsc-mainnet.4everland.org/ws/v1/{apikey}

Example

Take eth_getBalance method as an example

Parameters

  1. DATA, 20 Bytes - address to check for balance.

  2. QUANTITY|TAG - integer block number, or the string "latest", "earliest" or "pending"

params: ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"]

Request Example

curl --request POST \
     --url https://bsc-mainnet.4everland.org/v1/1659dfb40aa24bbb8153a677b98064d7 \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "params": [
    "0x145BD3C05D8d3117d133f577fa9af538ba353e8C",
    "latest"
  ],
  "method": "eth_getBalance"
}
'

Response Example

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x2eb9bcf4ec145"
}

Networks

By substituting the URL in the example with the endpoints of other networks, you can request content from other networks.

BNB Smart Chain Testnet

Endpoint(https): https://bsc-testnet.4everland.org/v1/{apikey}

Endpoint(wss): wss://bsc-testnet.4everland.org/ws/v1/{apikey}

opBNB Chain Mainnet

Endpoint(https): https://opbnb-mainnet.4everland.org/v1/{apikey}

Endpoint(wss): wss://opbnb-mainnet.4everland.org/ws/v1/{apikey}

opBNB Chain Testnet

Endpoint(https): https://opbnb-testnet.4everland.org/v1/{apikey}

Endpoint(wss): wss://opbnb-testnet.4everland.org/ws/v1/{apikey}

If you have any questions, please join our Discord server, or send us an email at contact@4everland.org.

Last updated