Get BNB Balance for a Single Address
Returns the BNB balance of a given address.
https://api-opbnb-testnet.bscscan.com/api
?module=account
&action=balance
&address=0xc35ad6d767948cabe5c7f70445cf7dcec1a67687
&tag=latest
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the address to check for balance |
| the string pre-defined block parameter, either earliest , pending or latest |
Sample Response
{
"status": "1",
"message": "OK",
"result": "1971010347020276516"
}
Get BNB Balance for Multiple Addresses in a Single Call
Returns the balance of the accounts from a list of addresses.
https://api-opbnb-testnet.bscscan.com/api
?module=account
&action=balancemulti
&address=0x08535a09b157a52fcc208d6d754a938fdcae51b6,0xC35AD6d767948Cabe5C7F70445Cf7dcEc1A67687
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the strings representing the addresses to check for balance, separated by , commas
up to 20 addresses per call |
| the integer pre-defined block parameter, either earliest , pending or latest |
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"account": "0x08535a09b157a52fcc208d6d754a938fdcae51b6",
"balance": "227442169297842304"
},
{
"account": "0xC35AD6d767948Cabe5C7F70445Cf7dcEc1A67687",
"balance": "1971010347020276516"
}
]
}
Get a list of 'Normal' Transactions By Address
Returns the list of transactions performed by an address, with optional pagination.
📝 Note : This API endpoint returns a maximum of 10000 records only.
https://api-opbnb-testnet.bscscan.com/api
?module=account
&action=txlist
&address=0xC35AD6d767948Cabe5C7F70445Cf7dcEc1A67687
&startblock=0
&endblock=99999999
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the addresses to check for balance |
| the integer block number to start searching for transactions |
| the integer block number to stop searching for transactions |
| the integer page number, if pagination is enabled |
| the number of transactions displayed per page |
| the sorting preference, use asc to sort by ascending and desc to sort by descending |
💡 Tip: Specify a smaller startblock
and endblock
range for faster search results.
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "6003794",
"timeStamp": "1692882300",
"hash": "0xbb145d173383664365a1d266720f8a9ce841e7c6214733c3894b68110f4cb676",
"nonce": "0",
"blockHash": "0xffc1d87a940f8d1208bd9253cb12265ddd57033a608257e175705064ddb3a62f",
"transactionIndex": "6",
"from": "0xc35ad6d767948cabe5c7f70445cf7dcec1a67687",
"to": "0x77a5bf0e03d1ff7f7a7abce8998c1c9f985f466a",
"value": "20000000000",
"gas": "172449",
"gasPrice": "1875000010",
"isError": "0",
"txreceipt_status": "1",
"input": "0x7ff36ab5000000000000000000000000000000000000000000000000000011b84f89cfea0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000c35ad6d767948cabe5c7f70445cf7dcec1a676870000000000000000000000000000000000000000000000000000000064e75a150000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f0b4a48860434a386489eb07900a2fd20b5f45eb000000000000000000000000864e732666df56b096f2732c1013ae375282dc4b",
"contractAddress": "",
"cumulativeGasUsed": "444975",
"gasUsed": "131270",
"confirmations": "9198473",
"methodId": "0x7ff36ab5",
"functionName": "swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline)"
},
{
"blockNumber": "6003933",
"timeStamp": "1692882439",
"hash": "0x46ebd4295e972ab11cd2899de536327ba46eaade540dba9b50eaf116c883e45e",
"nonce": "1",
"blockHash": "0x72dc0ef5f8777e3eb89c8394562eea92109613984f7378191ca316daf1de73c2",
"transactionIndex": "6",
"from": "0xc35ad6d767948cabe5c7f70445cf7dcec1a67687",
"to": "0x864e732666df56b096f2732c1013ae375282dc4b",
"value": "0",
"gas": "46217",
"gasPrice": "1875000010",
"isError": "0",
"txreceipt_status": "1",
"input": "0x095ea7b300000000000000000000000077a5bf0e03d1ff7f7a7abce8998c1c9f985f466a000000000000000000000000000000000000000000000000000011cc9a1adc35",
"contractAddress": "",
"cumulativeGasUsed": "347306",
"gasUsed": "46217",
"confirmations": "9198334",
"methodId": "0x095ea7b3",
"functionName": "approve(address spender, uint256 amount)"
}
]
}
Get a list of 'Internal' Transactions by Address
Returns the list of internal transactions performed by an address, with optional pagination.
📝 Note : This API endpoint returns a maximum of 10000 records only.
https://api-opbnb-testnet.bscscan.com/api
?module=account
&action=txlistinternal
&address=0xc35ad6d767948cabe5c7f70445cf7dcec1a67687
&startblock=0
&endblock=99999999
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the addresses to check for balance |
| the integer block number to start searching for transactions |
| the integer block number to stop searching for transactions |
| the integer page number, if pagination is enabled |
| the number of transactions displayed per page |
| the sorting preference, use asc to sort by ascending and desc to sort by descending |
💡 Tip: Specify a smaller startblock
and endblock
range for faster search results
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "6003480",
"timeStamp": "1692881986",
"hash": "0x94f4ce3b3ff1cb44dfeeb33296eaff822b4fb56f81eb864a6ce6fd49560d97f6",
"from": "0x4200000000000000000000000000000000000010",
"to": "0xc35ad6d767948cabe5c7f70445cf7dcec1a67687",
"value": "10000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "345588",
"gasUsed": "0",
"traceId": "0_1_1_1_1",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "6003501",
"timeStamp": "1692882007",
"hash": "0x562a42f154332bdbb19ddf53cefe54b5ddb1b786157d1e81d5216940fc26cf3e",
"from": "0x4200000000000000000000000000000000000010",
"to": "0xc35ad6d767948cabe5c7f70445cf7dcec1a67687",
"value": "10000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "370198",
"gasUsed": "0",
"traceId": "0_1_1_1_1",
"isError": "0",
"errCode": ""
}
]
}
Get 'Internal Transactions' by Transaction Hash
Returns the list of internal transactions performed within a transaction.
Note : This API endpoint returns a maximum of 10000 records only.
https://api-opbnb-testnet.bscscan.com/api
?module=account
&action=txlistinternal
&txhash=0x9b882a2f9a357e93e5dad86efdf5e21058fd854ec119b90a575e858e3ae09319
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the transaction hash to check for internal transactions |
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "12101171",
"timeStamp": "1698979677",
"from": "0x4200000000000000000000000000000000000007",
"to": "0x4200000000000000000000000000000000000010",
"value": "1000000000000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "404931",
"gasUsed": "22804",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "12101171",
"timeStamp": "1698979677",
"from": "0x4200000000000000000000000000000000000010",
"to": "0xc35ad6d767948cabe5c7f70445cf7dcec1a67687",
"value": "1000000000000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "370145",
"gasUsed": "0",
"isError": "0",
"errCode": ""
}
]
}
The isError
field returns 0
for successful transactions and 1
for rejected/cancelled transactions.
Get "Internal Transactions" by Block Range
Returns the list of internal transactions performed within a block range, with optional pagination.
📝 Note : This API endpoint returns a maximum of 10000 records only.
https://api-opbnb-testnet.bscscan.com/api
?module=account
&action=txlistinternal
&startblock=484887
&endblock=765371
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the integer block number to start searching for transactions |
| the integer block number to stop searching for transactions |
| the integer page number, if pagination is enabled |
| the number of transactions displayed per page |
| the sorting preference, use asc to sort by ascending and desc to sort by descending |
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "484887",
"timeStamp": "1687363393",
"hash": "0xb9cf43eff57efe19bce43fd44165960fdb6c1ea25b9ce8479453825230451823",
"from": "0x4200000000000000000000000000000000000015",
"to": "0xc0d3c0d3c0d3c0d3c0d3c0d3c0d3c0d3c0d30015",
"value": "0",
"contractAddress": "",
"input": "",
"type": "delegatecall",
"gas": "956929",
"gasUsed": "27384",
"traceId": "0_1",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "484887",
"timeStamp": "1687363393",
"hash": "0x3fbd33a1f5ace9d2f5c798116f0c685983f3eefe19f4463db5235a8f1af9427a",
"from": "0x4200000000000000000000000000000000000007",
"to": "0xc0d3c0d3c0d3c0d3c0d3c0d3c0d3c0d3c0d30007",
"value": "10000000000000000",
"contractAddress": "",
"input": "",
"type": "delegatecall",
"gas": "454838",
"gasUsed": "66190",
"traceId": "0_1",
"isError": "0",
"errCode": ""
}
]
}
The isError
field returns 0
for successful transactions and 1
for rejected/cancelled transactions.
Get a list of 'ERC20 - Token Transfer Events' by Address
Returns the list of ERC-20 tokens transferred by an address, with optional filtering by token contract.
https://api-opbnb-testnet.bscscan.com/api
?module=account
&action=tokentx
&contractaddress=0x5F49adeD456DbCCe426cA8B6cAfB3b1305c953c8
&address=0x59e123596b0fae85e06aa072575d0dc74ef5a7c5
&page=1
&offset=100
&startblock=0
&endblock=99999999
&sort=asc
&apikey=YourApiKeyToken
Usage:
ERC-20 transfers from an address, specify the address
parameter
ERC-20 transfers from a contract address, specify the contract address
parameter
ERC-20 transfers from an address filtered by a token contract, specify both address
and contract address
parameters.
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the address to check for balance |
| the string representing the token contract address to check for balance |
| the integer page number, if pagination is enabled |
| the number of transactions displayed per page |
| the integer block number to start searching for transactions |
| the integer block number to stop searching for transactions |
| the sorting preference, use asc to sort by ascending and desc to sort by descending |
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "11785083",
"timeStamp": "1698663589",
"hash": "0x2612b87ddf5a3985e797150ed61f2af5791b5be7b36b77eadf6f12dd4d9c80b0",
"nonce": "23",
"blockHash": "0xafb34acca643ad627a5c399a141a820457f8d80f5c502e6aa27659de715a6e5a",
"from": "0x0ca1636eee5940879ca6bef090f6019226bae261",
"contractAddress": "0x5f49aded456dbcce426ca8b6cafb3b1305c953c8",
"to": "0x59e123596b0fae85e06aa072575d0dc74ef5a7c5",
"value": "50000000000000000000000",
"tokenName": "Segment",
"tokenSymbol": "SEF",
"tokenDecimal": "18",
"transactionIndex": "1",
"gas": "163640",
"gasPrice": "1500000008",
"gasUsed": "156614",
"cumulativeGasUsed": "207115",
"input": "deprecated",
"confirmations": "3417782"
},
{
"blockNumber": "11785114",
"timeStamp": "1698663620",
"hash": "0x1b85301524e2f1e8229133b18c874cc94fc4f7397cf3e938b9547c151fcbbd4e",
"nonce": "24",
"blockHash": "0xf0bb452e06349e21377785ca5699cdd93686a640c2337e6a1d5e6829614dd1e0",
"from": "0x0ca1636eee5940879ca6bef090f6019226bae261",
"contractAddress": "0x5f49aded456dbcce426ca8b6cafb3b1305c953c8",
"to": "0x59e123596b0fae85e06aa072575d0dc74ef5a7c5",
"value": "50950688688183266950126",
"tokenName": "Segment",
"tokenSymbol": "SEF",
"tokenDecimal": "18",
"transactionIndex": "1",
"gas": "194217",
"gasPrice": "1500000008",
"gasUsed": "177113",
"cumulativeGasUsed": "229626",
"input": "deprecated",
"confirmations": "3417751"
}
]
}
Get a list of 'ERC721 - Token Transfer Events' by Address
Returns the list of ERC-721 ( NFT ) tokens transferred by an address, with optional filtering by token contract
https://api-opbnb-testnet.bscscan.com/api
?module=account
&action=tokennfttx
&contractaddress=0x1a4fF088Af61F4564d43b7060cc4bE0274Bdd3d4
&address=0x37864e925cca445e2647d6674bff7f7738397fe0
&page=1
&offset=100
&startblock=0
&endblock=99999999
&sort=asc
&apikey=YourApiKeyToken
Usage:
ERC-721 transfers from an address, specify the address
parameter
ERC-721 transfers from a contract address, specify the contract address
parameter
ERC-721 transfers from an address filtered by a token contract, specify both address
and contract address
parameters.
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the address to check for balance |
| the string representing the token contract address to check for balance |
| the integer page number, if pagination is enabled |
| the number of transactions displayed per page |
| the integer block number to start searching for transactions |
| the integer block number to stop searching for transactions |
| the sorting preference, use asc to sort by ascending and desc to sort by descending |
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "3191490",
"timeStamp": "1690069996",
"hash": "0x0bb69f3c576056b3514fb6531698bf151a68176964011911af011134907bf689",
"nonce": "0",
"blockHash": "0xcba908d7d25a78e9ca1f4593a0a2a78c9336b9b48890e9f683076f8c8bcdb9fd",
"from": "0x0000000000000000000000000000000000000000",
"contractAddress": "0x1a4ff088af61f4564d43b7060cc4be0274bdd3d4",
"to": "0x37864e925cca445e2647d6674bff7f7738397fe0",
"tokenID": "6519",
"tokenName": "SoulBound",
"tokenSymbol": "SBT",
"tokenDecimal": "0",
"transactionIndex": "1",
"gas": "1000000",
"gasPrice": "1500000008",
"gasUsed": "435550",
"cumulativeGasUsed": "486051",
"input": "deprecated",
"confirmations": "12011435"
},
{
"blockNumber": "3191577",
"timeStamp": "1690070083",
"hash": "0x9e4a9b548c15d06d6bc0bd61d30f884855faf98d0ca8e5eaa11e258f5726011a",
"nonce": "1",
"blockHash": "0x24695f2aa77f2d197c4fc700345df70d0ada5ed06114b84ce20050203fff076d",
"from": "0x0000000000000000000000000000000000000000",
"contractAddress": "0x1a4ff088af61f4564d43b7060cc4be0274bdd3d4",
"to": "0x37864e925cca445e2647d6674bff7f7738397fe0",
"tokenID": "6520",
"tokenName": "SoulBound",
"tokenSymbol": "SBT",
"tokenDecimal": "0",
"transactionIndex": "1",
"gas": "1000000",
"gasPrice": "1500000008",
"gasUsed": "418450",
"cumulativeGasUsed": "465363",
"input": "deprecated",
"confirmations": "12011348"
}
]
}
Last updated