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

2.1 cURL Comparison

A) BscScan / Etherscan V2 (REST GET)

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)

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

AspectBscScan / Etherscan V2BscTrace / MegaNode
ProtocolREST (HTTP GET)JSON-RPC 2.0 (HTTP POST)
Base URLhttps://api.etherscan.io/v2/apihttps://bsc-mainnet.nodereal.io/v1/<API_KEY>
Authenticationapikey=... query paramAPI key embedded in endpoint URL
Chain SelectionRequires chainid=56Chain-specific endpoint, no chainid needed
Request FormatQuery parameters: module=account&action=balance...JSON: { "method": "eth_getBalance", "params": [...] }
Method NamingBscScan-style: module + actionStandard RPC methods (eth_*)
Error Handlingstatus: "0" in JSONJSON-RPC error object
HTTP MethodGETPOST

2.3 Response Comparison

A) BscScan / Etherscan V2 Response

{
  "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

{
  "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

2.4 Key Differences

DifferenceBscScan / Etherscan V2BscTrace / MegaNode
Data Encoding (Balance)Decimal string (Wei)Hexadecimal (Wei)
Interface AbstractionBrowser-style APINative blockchain RPC
HTTP MethodGETPOST
ParametersQuery paramsJSON body
Result ParsingMust convert decimal WeiMust convert hex Wei
Chain SelectionExplicit (chainid)Implicit via endpoint


3. Quick Tip: Searching for API

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

Navigate to: https://docs.nodereal.ioAPI ReferenceJump ToSearch Here

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 NameMegaNode Equivalent / NotesAdditional Information
Get Native Balance for an Addresseth_getBalanceNA
Get Historical Native Balance for an Addresseth_getBalance with block parameter (requires archive node).Retrieves the balance at a given block height.
Get Blocks Validated by AddressQuery blocks using eth_getBlockByNumber and check miner/author field. Requires indexing historical data.Retrieves the list of blocks validated by an address.
Get Normal Transactions By Addressnr_getAssetTransfersRetrieves transaction history with pagination.
Get ERC20 Token Transfers by Addressnr_getAssetTransfersRetrieves ERC-20 token transfers.
Get ERC721 Token Transfers by Addressnr_getAssetTransfersRetrieves ERC-721 token transfers.
Get ERC1155 Token Transfers by Addressnr_getAssetTransfersRetrieves ERC-1155 token transfers.
Get Internal Transactions by Addressnr_getAssetTransfersRetrieves internal transaction history with pagination.
Get Internal Transactions by Block Rangenr_getAssetTransfersReturns internal transactions within a block range.
Get Internal Transactions by Transaction Hashnr_getAssetTransfersRetrieves internal transactions within a specific transaction.
Get Address Funded ByTrace creation transaction or use eth_getLogs for transfers (requires historical index, confirmed not supported by current enhanced-API).Retrieves the address and transaction that first funded a specific address.

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 NameDescriptionMegaNode Equivalent / Notes
Get ERC20-Token TotalSupply by ContractAddressReturns ERC-20 total supply.nr_getTotalSupply20
Get ERC20-Token Account Balance for TokenContractAddressRetrieves ERC-20 balance for an address.nr_getTokenBalance20
Get Historical ERC20-Token TotalSupply by ContractAddress & BlockNoHistorical total supply.nr_getTotalSupply20
Get Historical ERC20-Token Account Balance by BlockNoHistorical ERC-20 balance.nr_getTokenBalance20
Get Top Token HoldersReturns list of top holders.nr_getTokenHolders
Get Token Holder List by Contract AddressRetrieves current token holders.nr_getTokenHolders
Get Token Holder Count by Contract AddressRetrieves count of token holders.nr_getTokenHolderCount (Enhanced API, note: not real-time, maybe hours latency).
Get Token Info by ContractAddressRetrieves basic token info.nr_getTokenMeta (Enhanced API) for basic meta-data (name/symbol).
Get Address ERC20 Token HoldingRetrieves ERC-20 balance.nr_getTokenHoldings
Get Address ERC721 Token HoldingRetrieves ERC-721 tokens owned by an address.nr_getNFTHoldings
Get Address ERC721 Token Inventory by ContractRetrieves count of ERC-721 token IDs per collection.nr_getNFTInventory

III. Block Module APIs

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

BSCScan API NameDescriptionMegaNode Equivalent / Notes
Get Block Number by TimestampRetrieves the block number mined at a specific timestamp.nr_getBlockNumberByTimeStamp See Documentation
Get Daily Block Count and RewardsRetrieves daily count of mined blocks and rewards.nr_getDailyBlockCountAndReward See Documentation
Get Daily Block RewardsRetrieves daily distribution of block rewards.nr_getDailyBlockReward See Documentation

IV. Gas Tracker APIs

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

BSCScan API NameDescriptionMegaNode Equivalent / Notes
Get Gas OracleGet current gas price recommendations.eth_gasPrice or eth_feeHistory.

V. Log & Transaction APIs

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

BSCScan API NameDescriptionMegaNode Equivalent / Notes
Event Logs by AddressRetrieves event logs from an address.eth_getLogs with address filter.
Event Logs by TopicsRetrieves event logs filtered by topics.eth_getLogs with topics.
Event Logs by Address and TopicsRetrieves event logs filtered by address and topics.eth_getLogs with combined filter.
Check Contract Execution StatusRetrieves current status and execution result.eth_getTransactionReceipt.
Check Transaction Receipt StatusRetrieves the execution status by hash.eth_getTransactionReceipt.
Get Deposit/Withdrawal Transactions by AddressL2 bridging specific, not core RPC for BSC.nr_getAssetTransfers. This endpoint is only available for Arbitrum and Optimism stack chains.

VI. Contracts APIs (Verification and Deployment)

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

BSCScan API NameDescriptionMegaNode Equivalent / Notes
Get Contract ABIRetrieve the ABI for a verified smart contract.Requires deploying a BSC contract verification service.
Get Contract Source CodeRetrieve the source code for a verified smart contract.Requires deploying a BSC contract verification service.
Get Contract Creator and Creation Tx HashRetrieve a contract’s deployer address and creation transaction.nr_getContractCreationTransaction (Enhanced API)
Verify Solidity Source CodeSubmit Solidity source code for verification.Requires deploying a BSC contract verification service.
Check Source Code Verification StatusCheck the status of a source code verification request.Requires deploying a BSC contract verification service.
Verify Proxy ContractSubmit a proxy contract for verification.Requires deploying a BSC contract verification service.
Check Proxy Contract Verification StatusCheck the status of a proxy contract verification.Requires deploying a BSC contract verification service.

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 NameMegaNode Equivalent RPC Method
eth_blockNumbereth_blockNumber
eth_BlockByNumbereth_getBlockByNumber
eth_UncleByBlockNumberAndIndexeth_getUncleByBlockNumberAndIndex
eth_BlockTransactionCountByNumbereth_getBlockTransactionCountByNumber
eth_TransactionByHasheth_getTransactionByHash
eth_TransactionByBlockNumberAndIndexeth_getTransactionByBlockNumberAndIndex
eth_TransactionCounteth_getTransactionCount
eth_sendRawTransactioneth_sendRawTransaction
eth_TransactionReceipteth_getTransactionReceipt
eth_calleth_call
eth_Codeeth_getCode
eth_StorageAteth_getStorageAt
eth_gasPriceeth_gasPrice
eth_estimateGaseth_estimateGas

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 NameBscScan Function NameDescription
Get Daily Transaction CountGet Get Daily Transaction CountRetrieves the daily number of transactions executed in the blockchain.
Get Daily Average Block SizeGet Get Daily Average Block SizeRetrieves the average daily block size over a specified date range.
Get Daily Average Block TimeGet Get Daily Average Block TimeRetrieves the daily average time taken to successfully mine a block.
Get Daily Average Gas LimitGet Get Daily Average Gas LimitRetrieve historical daily average gas limit.
Get Ethereum Daily Total Gas UsedGet Get Ethereum Daily Total Gas UsedRetrieve the total gas used each day.
Get Daily Average Gas PriceGet Get Daily Average Gas PriceRetrieve daily average gas price statistics.
Get Estimated Block CountdownGet Get Estimated Block Countdown by Block NumberRetrieves the estimated time, in seconds, until a specified block is mined.
Get Daily Uncle Block Count and RewardsGet Get Daily Uncle Block Count and RewardsReturns the daily count of Uncle blocks mined and their associated rewards.
Get Total Supply of Ether 2Get Get Total Supply of Ether 2Retrieves the current Ether supply, including circulation and staking-related accounting.
Get Ether Last PriceGet Get Ether Last PriceRetrieves the latest price of the native gas token.
Get Ethereum Nodes SizeGet Get Ethereum Nodes SizeRetrieves the total size of the blockchain in bytes.
Get Total Nodes CountGet Get Total Nodes CountRetrieves the total count of discoverable nodes.
Get Daily Network Transaction FeeGet Get Daily Network Transaction FeeRetrieves the total transaction fees paid each day.
Get Daily New Address CountGet Get Daily New Address CountRetrieves the daily count of newly created addresses.
Get Daily Network UtilizationGet Get Daily Network UtilizationRetrieves the daily average percentage of gas used relative to the network gas limit.
Get Daily Average Network Hash RateGet Get Daily Average Network Hash RateRetrieves historical hash rate statistics.
Get Daily Average Network DifficultyGet Get Daily Average Network DifficultyReturns historical mining difficulty data.
Get Ether Historical PriceGet Get Ether Historical PriceReturns the historical USD price data for 1 ETH.
Get Plasma Deposits by AddressGet Get Plasma Deposits by AddressRetrieves a list of Plasma deposit transactions received by an address.
Get Nametag for AddressGet Get Nametag (Metadata) for an AddressRetrieves off-chain name tags and metadata.
Get Beacon Chain Withdrawals by AddressGet Get Beacon Chain Withdrawals by AddressRetrieves Beacon chain withdrawal transactions to an address.
ChainlistGet ChainlistReturns the list of supported Etherscan chains.
Verify Source Code on zkSyncPost Verify Source Code on zkSyncSubmit zkSync source code for verification.
Verify Vyper Source CodePost Verify Vyper Source CodeSubmit a Vyper contract for verification.
Verify Stylus Source CodePost Verify Stylus Source CodeSubmit Stylus source code for verification.
Verify with FoundryVerify with FoundryContract verification via Foundry.
Verify with HardhatVerify with HardhatContract verification via Hardhat.
Verify with RemixVerify with RemixContract verification via Remix.

Other not supported functions:

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