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: Nodereal API 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 / NotesDescription
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 field. Requires indexing historical data.Retrieves the list of blocks validated by an address.
Get Normal Transactions By Addressnr_getAssetTransfers or ng_getTransactionByAddressRetrieves transaction history with pagination.
Get ERC20 Token Transfers by Addressnr_getAssetTransfers or ng_getTransactionByAddress with category parameter set to ERC20Retrieves ERC-20 token transfers.
Get ERC721 Token Transfers by Addressnr_getAssetTransfersor ng_getTransactionByAddress with category parameter set to ERC721Retrieves ERC-721 token transfers.
Get ERC1155 Token Transfers by Addressnr_getAssetTransfers or ng_getTransactionByAddress with category parameter set to ERC1155Retrieves ERC-1155 token transfers.
Get Internal Transactions by Addressnr_getAssetTransfers or ng_getTransactionByAddress with category parameter set to 'internalRetrieves internal transaction history with pagination.
Get Internal Transactions by Block Rangenr_getAssetTransfers or ng_getTransactionByAddress with settings on 'fromBlock' and 'toBlock' parametersReturns internal transactions within a block range.
Get Internal Transactions by Transaction Hashnr_getAssetTransfers or ng_getTransactionByAddress with transactionHash parametersRetrieves 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 NameMegaNode Equivalent / NotesDescription
Get ERC20-Token TotalSupply by ContractAddressnr_getTotalSupply20Returns ERC-20 total supply.
Get ERC20-Token Account Balance for TokenContractAddressnr_getTokenBalance20Retrieves ERC-20 balance for an address.
Get Historical ERC20-Token TotalSupply by ContractAddress & BlockNonr_getTotalSupply20Historical total supply.
Get Historical ERC20-Token Account Balance by BlockNonr_getTokenBalance20Historical ERC-20 balance.
Get Top Token Holdersnr_getTokenHoldersReturns list of top holders.
Get Token Holder List by Contract Addressnr_getTokenHoldersRetrieves current token holders.
Get Token Holder Count by Contract Addressnr_getTokenHolderCount (Enhanced API, note: not real-time, maybe hours latency).Retrieves count of token holders.
Get Token Info by ContractAddressnr_getTokenMeta (Enhanced API) for basic meta-data (name/symbol).Retrieves basic token info.
Get Address ERC20 Token Holdingnr_getTokenHoldingsRetrieves ERC-20 balance.
Get Address ERC721 Token Holdingnr_getNFTHoldingsRetrieves ERC-721 tokens owned by an address.
Get Address ERC721 Token Inventory by Contractnr_getNFTInventoryRetrieves count of ERC-721 token IDs per collection.

III. Block Module APIs

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

BSCScan API NameMegaNode Equivalent / NotesDescription
Get Block Number by Timestampnr_getBlockNumberByTimeStamp See DocumentationRetrieves the block number mined at a specific timestamp.
Get Daily Block Count and Rewardsnr_getDailyBlockCountAndReward See DocumentationRetrieves daily count of mined blocks and rewards.
Get Daily Block Rewardsnr_getDailyBlockReward See DocumentationRetrieves daily distribution of block rewards.

IV. Gas Tracker APIs

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

BSCScan API NameMegaNode Equivalent / NotesDescription
Get Gas Oracleeth_gasPrice or eth_feeHistory.Get current gas price recommendations.

V. Log & Transaction APIs

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

BSCScan API NameMegaNode Equivalent / NotesDescription
Event Logs by Addresseth_getLogs with address filter.Retrieves event logs from an address.
Event Logs by Topicseth_getLogs with topics.Retrieves event logs filtered by topics.
Event Logs by Address and Topicseth_getLogs with combined filter.Retrieves event logs filtered by address and topics.
Check Contract Execution Statuseth_getTransactionReceipt.Retrieves current status and execution result.
Check Transaction Receipt Statuseth_getTransactionReceipt.Retrieves the execution status by hash.
Get Deposit/Withdrawal Transactions by Addressnr_getAssetTransfers or ng_getTransactionByAddress This endpoint is only available for Optimism stack chains.L2 bridging specific, not core RPC for BSC.

VI. Contracts APIs (Verification and Deployment)

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

BSCScan API NameMegaNode Equivalent / NotesDescription
Get Contract ABIRequires deploying a BSC contract verification service.Retrieve the ABI for a verified smart contract.
Get Contract Source CodeRequires deploying a BSC contract verification service.Retrieve the source code for a verified smart contract.
Get Contract Creator and Creation Tx Hashnr_getContractCreationTransaction (Enhanced API)Retrieve a contract’s deployer address and creation transaction.
Verify Solidity Source CodeRequires deploying a BSC contract verification service.Submit Solidity source code for verification.
Check Source Code Verification StatusRequires deploying a BSC contract verification service.Check the status of a source code verification request.
Verify Proxy ContractRequires deploying a BSC contract verification service.Submit a proxy contract for verification.
Check Proxy Contract Verification StatusRequires deploying a BSC contract verification service.Check the status of a proxy contract verification.

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.