---
updatedAt: 2025-12-14T07:07:50.000Z
agentTools:
  projectIndex: https://nodereal.readme.io/llms.txt
---

# Migrating from Bscscan

# 1. How to Migrate from BscScan to BscTrace

Migrating from BscScan APIs to BscTrace/MegaNode requires switching from **REST-based, module/action-style endpoints** to **JSON-RPC 2.0 calls** (and MegaNode Enhanced APIs for transfers, token data, holders, etc.).

BscScan-style APIs rely heavily on:

* HTTP GET
* Query parameters
* Human-oriented response wrappers (`status`, `message`, `result`)

BscTrace/MegaNode rely on:

* JSON-RPC 2.0
* POST requests with structured method calls
* Direct blockchain-native return values (hex-encoded Wei, raw RPC objects)

This guide illustrates the differences clearly and provides concrete examples.

***

# 2. API Call Example — Getting Native Balance

This section shows the migration from **BSCScan/Etherscan V2** balance API to **MegaNode (JSON-RPC)**.

We break the example into:

1. **cURL Comparison**
2. **Request Structure Comparison**
3. **Response Comparison**
4. **Summary of Key Differences**

<br />

## **2.1 cURL Comparison**

### **A) BscScan / Etherscan V2 (REST GET)**

```shell
curl "https://api.etherscan.io/v2/api?apikey=YOUR_API_KEY&chainid=56&module=account&action=balance&address=0xfF3f428583c15a5681584e9e5e86e270418AC4d3&tag=latest"
```

### **B) BscTrace / MegaNode (JSON-RPC POST)**

```shell
curl -X POST https://bsc-mainnet.nodereal.io/v1/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getBalance",
    "params": [
      "0xfF3f428583c15a5681584e9e5e86e270418AC4d3",
      "latest"
    ],
    "id": 1
  }'
```

## **2.2 Request Structure Comparison**

| Aspect              | BscScan / Etherscan V2                               | BscTrace / MegaNode                                     |
| :------------------ | :--------------------------------------------------- | :------------------------------------------------------ |
| **Protocol**        | REST (HTTP GET)                                      | JSON-RPC 2.0 (HTTP POST)                                |
| **Base URL**        | `https://api.etherscan.io/v2/api`                    | `https://bsc-mainnet.nodereal.io/v1/<API_KEY>`          |
| **Authentication**  | `apikey=...` query param                             | API key embedded in endpoint URL                        |
| **Chain Selection** | Requires `chainid=56`                                | Chain-specific endpoint, no chainid needed              |
| **Request Format**  | Query parameters: `module=account&action=balance...` | JSON: `{ "method": "eth_getBalance", "params": [...] }` |
| **Method Naming**   | BscScan-style: module + action                       | Standard RPC methods (`eth_*`)                          |
| **Error Handling**  | `status: "0"` in JSON                                | JSON-RPC error object                                   |
| **HTTP Method**     | GET                                                  | POST                                                    |

<br />

## **2.3 Response Comparison**

### **A) BscScan / Etherscan V2 Response**

```json
{
  "status": "1",
  "message": "OK",
  "result": "0"
}
```

**Notable characteristics:**

* Contains wrapper fields: `status`, `message`
* `result` is **stringified Wei**, decimal
* API is not purely blockchain-native; it is a *browser-style wrapper*

### **B) BscTrace / MegaNode JSON-RPC Response**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x18b907bc31ae8172d100e0"
}
```

**Notable characteristics:**

* Pure JSON-RPC 2.0 format
* `result` is **hexadecimal Wei** (0x-prefixed)
* No wrapper fields (`status`, `message`)
* Directly compatible with Ethereum RPC tooling

<br />

## 2.4 Key Differences

| Difference                  | BscScan / Etherscan V2   | BscTrace / MegaNode   |
| :-------------------------- | :----------------------- | :-------------------- |
| **Data Encoding (Balance)** | Decimal string (Wei)     | Hexadecimal (Wei)     |
| **Interface Abstraction**   | Browser-style API        | Native blockchain RPC |
| **HTTP Method**             | GET                      | POST                  |
| **Parameters**              | Query params             | JSON body             |
| **Result Parsing**          | Must convert decimal Wei | Must convert hex Wei  |
| **Chain Selection**         | Explicit (`chainid`)     | Implicit via endpoint |

<br />

***

# **3. Quick Tip: Searching for API**

Users can quickly locate API methods using the built-in documentation search.

**Navigate to:** [Nodereal API Reference](https://docs.nodereal.io/reference/find-api-key-endpoint) → **Jump To** → **Search Here**

<Image align="center" border={false} src="https://files.readme.io/8e4ff98162385eef30901ee66267710d6c4f6ba531525e26413ac0184bbbafca-Screenshot_2025-12-09_at_3.10.25_PM.png" />

<Image align="center" border={false} src="https://files.readme.io/306caa09a72f1dcb3788756c904d8ec00083f86bb7aa7b7ba0139750bd3cf42d-Screenshot_2025-12-09_at_3.10.57_PM.png" />

This allows users to instantly find:

* RPC methods
* Enhanced APIs (`nr_*`)
* Trace-related APIs
* Token, asset, holder, and NFT endpoints

***

# 4. Supported API

## I. Account Module APIs

The following APIs under the Account module can be mapped to MegaNode's supported methods, often involving standard RPC calls or MegaNode's enhanced asset/transfer APIs.

| BSCScan API Name                              | MegaNode Equivalent / Notes                                                                                                                                                                                                            | Description                                                                 |
| :-------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------- |
| Get Native Balance for an Address             | [eth\_getBalance](https://docs.nodereal.io/reference/eth-getbalance-bnb-chain)                                                                                                                                                         | NA                                                                          |
| Get Historical Native Balance for an Address  | [eth\_getBalance](https://docs.nodereal.io/reference/eth-getbalance-bnb-chain) with block parameter (requires archive node).                                                                                                           | Retrieves the balance at a given block height.                              |
| Get Blocks Validated by Address               | Query blocks using [eth\_getBlockByNumber](https://docs.nodereal.io/reference/eth-getblockbynumber-bnb-chain) and check `miner` field. Requires indexing historical data.                                                              | Retrieves the list of blocks validated by an address.                       |
| Get Normal Transactions By Address            | [nr\_getAssetTransfers](https://docs.nodereal.io/reference/nr_getassettransfers) or [ng\_getTransactionByAddress](https://docs.nodereal.io/reference/nr_gettransactionbyaddress)                                                       | Retrieves transaction history with pagination.                              |
| Get ERC20 Token Transfers by Address          | [nr\_getAssetTransfers](https://docs.nodereal.io/reference/nr_getassettransfers)  or [ng\_getTransactionByAddress](https://docs.nodereal.io/reference/nr_gettransactionbyaddress) with category parameter set to ERC20                 | Retrieves ERC-20 token transfers.                                           |
| Get ERC721 Token Transfers by Address         | [nr\_getAssetTransfers](https://docs.nodereal.io/reference/nr_getassettransfers)or [ng\_getTransactionByAddress](https://docs.nodereal.io/reference/nr_gettransactionbyaddress) with category parameter set to ERC721                  | Retrieves ERC-721 token transfers.                                          |
| Get ERC1155 Token Transfers by Address        | [nr\_getAssetTransfers](https://docs.nodereal.io/reference/nr_getassettransfers) or [ng\_getTransactionByAddress](https://docs.nodereal.io/reference/nr_gettransactionbyaddress) with category parameter set to ERC1155                | Retrieves ERC-1155 token transfers.                                         |
| Get Internal Transactions by Address          | [nr\_getAssetTransfers](https://docs.nodereal.io/reference/nr_getassettransfers) or [ng\_getTransactionByAddress](https://docs.nodereal.io/reference/nr_gettransactionbyaddress) with category parameter set to 'internal              | Retrieves internal transaction history with pagination.                     |
| Get Internal Transactions by Block Range      | [nr\_getAssetTransfers](https://docs.nodereal.io/reference/nr_getassettransfers) or [ng\_getTransactionByAddress](https://docs.nodereal.io/reference/nr_gettransactionbyaddress) with settings on 'fromBlock' and 'toBlock' parameters | Returns internal transactions within a block range.                         |
| Get Internal Transactions by Transaction Hash | [nr\_getAssetTransfers](https://docs.nodereal.io/reference/nr_getassettransfers) or [ng\_getTransactionByAddress](https://docs.nodereal.io/reference/nr_gettransactionbyaddress) with transactionHash parameters                       | Retrieves internal transactions within a specific transaction.              |
| Get Address Funded By                         | Trace creation transaction or use [eth\_getLogs](https://docs.nodereal.io/reference/eth-getlogs-bnb-chain) for transfers (requires historical index, confirmed not supported by current enhanced-API).                                 | Retrieves the address and transaction that first funded a specific address. |

<br />

## II. Token Module APIs

Token-related queries are supported either via direct `eth_call` on the contract methods (`totalSupply`, `balanceOf`) or via MegaNode's enhanced APIs for aggregated data and holders/inventory.

| BSCScan API Name                                                    | MegaNode Equivalent / Notes                                                        | Description                                          |
| :------------------------------------------------------------------ | :--------------------------------------------------------------------------------- | :--------------------------------------------------- |
| Get ERC20-Token TotalSupply by ContractAddress                      | `nr_getTotalSupply20`                                                              | Returns ERC-20 total supply.                         |
| Get ERC20-Token Account Balance for TokenContractAddress            | `nr_getTokenBalance20`                                                             | Retrieves ERC-20 balance for an address.             |
| Get Historical ERC20-Token TotalSupply by ContractAddress & BlockNo | `nr_getTotalSupply20`                                                              | Historical total supply.                             |
| Get Historical ERC20-Token Account Balance by BlockNo               | `nr_getTokenBalance20`                                                             | Historical ERC-20 balance.                           |
| Get Top Token Holders                                               | `nr_getTokenHolders`                                                               | Returns list of top holders.                         |
| Get Token Holder List by Contract Address                           | `nr_getTokenHolders`                                                               | Retrieves current token holders.                     |
| Get Token Holder Count by Contract Address                          | `nr_getTokenHolderCount` (Enhanced API, note: not real-time, maybe hours latency). | Retrieves count of token holders.                    |
| Get Token Info by ContractAddress                                   | `nr_getTokenMeta` (Enhanced API) for basic meta-data (name/symbol).                | Retrieves basic token info.                          |
| Get Address ERC20 Token Holding                                     | `nr_getTokenHoldings`                                                              | Retrieves ERC-20 balance.                            |
| Get Address ERC721 Token Holding                                    | `nr_getNFTHoldings`                                                                | Retrieves ERC-721 tokens owned by an address.        |
| Get Address ERC721 Token Inventory by Contract                      | `nr_getNFTInventory`                                                               | Retrieves count of ERC-721 token IDs per collection. |

<br />

## III. Block Module APIs

Block information can be obtained via standard RPC, or enhanced MegaNode APIs for aggregated daily statistics.

| BSCScan API Name                  | MegaNode Equivalent / Notes                                                                                                           | Description                                               |
| :-------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------- |
| Get Block Number by Timestamp     | `nr_getBlockNumberByTimeStamp` [`See Documentation`](https://docs.nodereal.io/reference/bnbburn-api#nr_getblocknumberbytimestamp)     | Retrieves the block number mined at a specific timestamp. |
| Get Daily Block Count and Rewards | `nr_getDailyBlockCountAndReward` [`See Documentation`](https://docs.nodereal.io/reference/bnbburn-api#nr_getdailyblockcountandreward) | Retrieves daily count of mined blocks and rewards.        |
| Get Daily Block Rewards           | `nr_getDailyBlockReward` [`See Documentation`](https://docs.nodereal.io/reference/bnbburn-api#nr_getdailyblockreward)                 | Retrieves daily distribution of block rewards.            |

<br />

## IV. Gas Tracker APIs

Gas price and usage information, including some historical and estimation features, can be migrated.

| BSCScan API Name | MegaNode Equivalent / Notes         | Description                            |
| :--------------- | :---------------------------------- | :------------------------------------- |
| Get Gas Oracle   | `eth_gasPrice` or `eth_feeHistory`. | Get current gas price recommendations. |

<br />

## V. Log & Transaction APIs

Log retrieval uses standard RPC, and transaction status checks map to receipt lookups.

| BSCScan API Name                               | MegaNode Equivalent / Notes                                                                                                                                                                                                                  | Description                                          |
| :--------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------- |
| Event Logs by Address                          | `eth_getLogs` with address filter.                                                                                                                                                                                                           | Retrieves event logs from an address.                |
| Event Logs by Topics                           | `eth_getLogs` with topics.                                                                                                                                                                                                                   | Retrieves event logs filtered by topics.             |
| Event Logs by Address and Topics               | `eth_getLogs` with combined filter.                                                                                                                                                                                                          | Retrieves event logs filtered by address and topics. |
| Check Contract Execution Status                | `eth_getTransactionReceipt`.                                                                                                                                                                                                                 | Retrieves current status and execution result.       |
| Check Transaction Receipt Status               | `eth_getTransactionReceipt`.                                                                                                                                                                                                                 | Retrieves the execution status by hash.              |
| Get Deposit/Withdrawal Transactions by Address | [nr\_getAssetTransfers ](https://docs.nodereal.io/reference/nr_getassettransfers) or [ng\_getTransactionByAddress](https://docs.nodereal.io/reference/nr_gettransactionbyaddress) This endpoint is only available for Optimism stack chains. | L2 bridging specific, not core RPC for BSC.          |

<br />

## VI. Contracts APIs (Verification and Deployment)

Contract verification requires dedicated services, while creator information is available via tracing.

| BSCScan API Name                          | MegaNode Equivalent / Notes                             | Description                                                      |
| :---------------------------------------- | :------------------------------------------------------ | :--------------------------------------------------------------- |
| Get Contract ABI                          | Requires deploying a BSC contract verification service. | Retrieve the ABI for a verified smart contract.                  |
| Get Contract Source Code                  | Requires deploying a BSC contract verification service. | Retrieve the source code for a verified smart contract.          |
| Get Contract Creator and Creation Tx Hash | `nr_getContractCreationTransaction` (Enhanced API)      | Retrieve a contract’s deployer address and creation transaction. |
| Verify Solidity Source Code               | Requires deploying a BSC contract verification service. | Submit Solidity source code for verification.                    |
| Check Source Code Verification Status     | Requires deploying a BSC contract verification service. | Check the status of a source code verification request.          |
| Verify Proxy Contract                     | Requires deploying a BSC contract verification service. | Submit a proxy contract for verification.                        |
| Check Proxy Contract Verification Status  | Requires deploying a BSC contract verification service. | Check the status of a proxy contract verification.               |

<br />

## VII. Geth/Parity Proxy APIs (Standard RPC - Native Support)

All BSCScan Geth/Parity Proxy endpoints are directly supported by standard JSON-RPC methods available on MegaNode.

| BSCScan API Name                       | MegaNode Equivalent RPC Method            |
| :------------------------------------- | :---------------------------------------- |
| `eth_blockNumber`                      | `eth_blockNumber`                         |
| `eth_BlockByNumber`                    | `eth_getBlockByNumber`                    |
| `eth_UncleByBlockNumberAndIndex`       | `eth_getUncleByBlockNumberAndIndex`       |
| `eth_BlockTransactionCountByNumber`    | `eth_getBlockTransactionCountByNumber`    |
| `eth_TransactionByHash`                | `eth_getTransactionByHash`                |
| `eth_TransactionByBlockNumberAndIndex` | `eth_getTransactionByBlockNumberAndIndex` |
| `eth_TransactionCount`                 | `eth_getTransactionCount`                 |
| `eth_sendRawTransaction`               | `eth_sendRawTransaction`                  |
| `eth_TransactionReceipt`               | `eth_getTransactionReceipt`               |
| `eth_call`                             | `eth_call`                                |
| `eth_Code`                             | `eth_getCode`                             |
| `eth_StorageAt`                        | `eth_getStorageAt`                        |
| `eth_gasPrice`                         | `eth_gasPrice`                            |
| `eth_estimateGas`                      | `eth_estimateGas`                         |

<br />

# **5. Not Supported API**

These APIs are **currently not supported** by BscTrace or MegaNode. They **may** be added in the future depending on feature roadmap and indexing availability.

| API Name                                                                                                                                                | BscScan Function Name                             | Description                                                                               |
| :------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------ | :---------------------------------------------------------------------------------------- |
| [Get Daily Transaction Count](https://docs.etherscan.io/api-reference/endpoint/dailytx)                                                                 | Get Get Daily Transaction Count                   | Retrieves the daily number of transactions executed in the blockchain.                    |
| [Get Daily Average Block Size](https://docs.etherscan.io/api-reference/endpoint/dailyavgblocksize#get-daily-average-block-size)                         | Get Get Daily Average Block Size                  | Retrieves the average daily block size over a specified date range.                       |
| [Get Daily Average Block Time](https://docs.etherscan.io/api-reference/endpoint/dailyavgblocktime#get-daily-average-block-time)                         | Get Get Daily Average Block Time                  | Retrieves the daily average time taken to successfully mine a block.                      |
| [Get Daily Average Gas Limit](https://docs.etherscan.io/api-reference/endpoint/dailyavggaslimit)                                                        | Get Get Daily Average Gas Limit                   | Retrieve historical daily average gas limit.                                              |
| [Get Ethereum Daily Total Gas Used](https://docs.etherscan.io/api-reference/endpoint/dailygasused)                                                      | Get Get Ethereum Daily Total Gas Used             | Retrieve the total gas used each day.                                                     |
| [Get Daily Average Gas Price](https://docs.etherscan.io/api-reference/endpoint/dailyavggasprice)                                                        | Get Get Daily Average Gas Price                   | Retrieve daily average gas price statistics.                                              |
| [Get Estimated Block Countdown](https://docs.etherscan.io/api-reference/endpoint/getblockcountdown#get-estimated-block-countdown-by-block-number)       | Get Get Estimated Block Countdown by Block Number | Retrieves the estimated time, in seconds, until a specified block is mined.               |
| [Get Daily Uncle Block Count and Rewards](https://docs.etherscan.io/api-reference/endpoint/dailyuncleblkcount#get-daily-uncle-block-count-and-rewards)  | Get Get Daily Uncle Block Count and Rewards       | Returns the daily count of Uncle blocks mined and their associated rewards.               |
| [Get Total Supply of Ether 2](https://docs.etherscan.io/api-reference/endpoint/ethsupply2#get-total-supply-of-ether-2)                                  | Get Get Total Supply of Ether 2                   | Retrieves the current Ether supply, including circulation and staking-related accounting. |
| [Get Ether Last Price](https://docs.etherscan.io/api-reference/endpoint/ethprice#get-ether-last-price)                                                  | Get Get Ether Last Price                          | Retrieves the latest price of the native gas token.                                       |
| [Get Ethereum Nodes Size](https://docs.etherscan.io/api-reference/endpoint/chainsize#get-ethereum-nodes-size)                                           | Get Get Ethereum Nodes Size                       | Retrieves the total size of the blockchain in bytes.                                      |
| [Get Total Nodes Count](https://docs.etherscan.io/api-reference/endpoint/nodecount#get-total-nodes-count)                                               | Get Get Total Nodes Count                         | Retrieves the total count of discoverable nodes.                                          |
| [Get Daily Network Transaction Fee](https://docs.etherscan.io/api-reference/endpoint/dailytxnfee#get-daily-network-transaction-fee)                     | Get Get Daily Network Transaction Fee             | Retrieves the total transaction fees paid each day.                                       |
| [Get Daily New Address Count](https://docs.etherscan.io/api-reference/endpoint/dailynewaddress#get-daily-new-address-count)                             | Get Get Daily New Address Count                   | Retrieves the daily count of newly created addresses.                                     |
| [Get Daily Network Utilization](https://docs.etherscan.io/api-reference/endpoint/dailynetutilization#get-daily-network-utilization)                     | Get Get Daily Network Utilization                 | Retrieves the daily average percentage of gas used relative to the network gas limit.     |
| [Get Daily Average Network Hash Rate](https://docs.etherscan.io/api-reference/endpoint/dailyavghashrate#get-daily-average-network-hash-rate)            | Get Get Daily Average Network Hash Rate           | Retrieves historical hash rate statistics.                                                |
| [Get Daily Average Network Difficulty](https://docs.etherscan.io/api-reference/endpoint/dailyavgnetdifficulty#get-daily-average-network-difficulty)     | Get Get Daily Average Network Difficulty          | Returns historical mining difficulty data.                                                |
| [Get Ether Historical Price](https://docs.etherscan.io/api-reference/endpoint/ethdailyprice#get-ether-historical-price)                                 | Get Get Ether Historical Price                    | Returns the historical USD price data for 1 ETH.                                          |
| [Get Plasma Deposits by Address](https://docs.etherscan.io/api-reference/endpoint/txnbridge#get-plasma-deposits-by-address)                             | Get Get Plasma Deposits by Address                | Retrieves a list of Plasma deposit transactions received by an address.                   |
| [Get Nametag for Address](https://docs.etherscan.io/api-reference/endpoint/getaddresstag#get-nametag-metadata-for-an-address)                           | Get Get Nametag (Metadata) for an Address         | Retrieves off-chain name tags and metadata.                                               |
| [Get Beacon Chain Withdrawals by Address](https://docs.etherscan.io/api-reference/endpoint/txsbeaconwithdrawal#get-beacon-chain-withdrawals-by-address) | Get Get Beacon Chain Withdrawals by Address       | Retrieves Beacon chain withdrawal transactions to an address.                             |
| [Chainlist](https://docs.etherscan.io/api-reference/endpoint/chainlist#chainlist)                                                                       | Get Chainlist                                     | Returns the list of supported Etherscan chains.                                           |
| [Verify Source Code on zkSync](https://docs.etherscan.io/api-reference/endpoint/verifyzksyncsourcecode#verify-source-code-on-zksync)                    | Post Verify Source Code on zkSync                 | Submit zkSync source code for verification.                                               |
| [Verify Vyper Source Code](https://docs.etherscan.io/api-reference/endpoint/verifyvyper#verify-vyper-source-code)                                       | Post Verify Vyper Source Code                     | Submit a Vyper contract for verification.                                                 |
| [Verify Stylus Source Code](https://docs.etherscan.io/api-reference/endpoint/verifystylus#verify-stylus-source-code)                                    | Post Verify Stylus Source Code                    | Submit Stylus source code for verification.                                               |
| [Verify with Foundry](https://docs.etherscan.io/contract-verification/verify-with-foundry#verify-with-foundry)                                          | Verify with Foundry                               | Contract verification via Foundry.                                                        |
| [Verify with Hardhat](https://docs.etherscan.io/contract-verification/verify-with-hardhat#verify-with-hardhat)                                          | Verify with Hardhat                               | Contract verification via Hardhat.                                                        |
| [Verify with Remix](https://docs.etherscan.io/contract-verification/verify-with-remix#verify-with-remix)                                                | Verify with Remix                                 | Contract verification via Remix.                                                          |

<br />

## Other not supported functions:

* Get Estimation of Confirmation Time
* Retrieves the average daily block size.
* Retrieves the daily average time to mine a block.