Accounts
Returns the MATIC balance of a given address.
https://api-testnet.polygonscan.com/api
?module=account
&action=balance
&address=0xe84d601e5d945031129a83e5602be0cc7f182cf3
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
address | the string representing the address to check for balance |
tag | the string pre-defined block parameter, either earliest , pending or latest |
Sample response
{
"status":"1",
"message":"OK",
"result":"25521252845438900040000"
}
Returns the balance of the accounts from a list of addresses.
https://api-testnet.polygonscan.com/api
?module=account
&action=balancemulti
&address=0xfb09c792be3a4af026913823923ab29917cd53b9,0xb02cb47d2b9c8e06fc5f8e6790e8a84e580bbf15,0xda29ce0d12d570ab55eac80ed00e11ea4e10c62c
&tag=latest
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
address | the strings representing the addresses to check for balance, separated by , commas
up to 20 addresses per call |
tag | the string pre-defined block parameter, either earliest , pending or latest |
Sample Response
{
"status":"1",
"message":"OK",
"result":[
{
"account":"0xfb09c792be3a4af026913823923ab29917cd53b9",
"balance":"101317614558581208"
},
{
"account":"0xb02cb47d2b9c8e06fc5f8e6790e8a84e580bbf15",
"balance":"241205670653000000000"
},
{
"account":"0xda29ce0d12d570ab55eac80ed00e11ea4e10c62c",
"balance":"0"
}
]
}
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-testnet.polygonscan.com/api
?module=account
&action=txlist
&address=0x756212f2Eb2cbd97CAc8B8f16ff044fe6281FDcf
&startblock=0
&endblock=99999999
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
address | the string representing the addresses to check for balance |
startblock | the integer block number to start searching for transactions |
endblock | the integer block number to stop searching for transactions |
page | the integer page number, if pagination is enabled |
offset | the number of transactions displayed per page |
sort | 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":"19781198",
"timeStamp":"1633408884",
"hash":"0x24a07167ddaee795edada14536bcd8be3e842b324e88f6ebe2523acbd634fcc2",
"nonce":"1480244",
"blockHash":"0x68316e9a1f86b206fc09525cc849dbddd0c2f274edb47222db8d3f41daf80d97",
"transactionIndex":"0",
"from":"0xe84d601e5d945031129a83e5602be0cc7f182cf3",
"to":"0x756212f2eb2cbd97cac8b8f16ff044fe6281fdcf",
"value":"100000000000000000",
"gas":"150000",
"gasPrice":"30000000000",
"isError":"0",
"txreceipt_status":"1",
"input":"0x",
"contractAddress":"",
"cumulativeGasUsed":"21000",
"gasUsed":"21000",
"confirmations":"393726"
},
{
"blockNumber":"20013120",
"timeStamp":"1633891325",
"hash":"0x7f5162b1e5674904514469977b78b196345c7c8bec036afd2cee3e202d4b31c6",
"nonce":"0",
"blockHash":"0xd1e87b76be91cdb1cd62edad8d93bf8a1ac8783b5907ab29ac283aa6186b7f3b",
"transactionIndex":"1",
"from":"0x756212f2eb2cbd97cac8b8f16ff044fe6281fdcf",
"to":"0x80cdb12b33135d14a8a12b0d551d55edfdfaf578",
"value":"0",
"gas":"264236",
"gasPrice":"3000000000",
"isError":"0",
"txreceipt_status":"1",
"input":"0x4e71d92d",
"contractAddress":"",
"cumulativeGasUsed":"285236",
"gasUsed":"264236",
"confirmations":"161804"
}
]
}
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-testnet.polygonscan.com/api
?module=account
&action=txlistinternal
&address=0xDFAB03C9fbDbef66dA105B88776B35bfd7743D39
&startblock=0
&endblock=99999999
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
address | the string representing the addresses to check for balance |
startblock | the integer block number to start searching for transactions |
endblock | the integer block number to stop searching for transactions |
page | the integer page number, if pagination is enabled |
offset | the number of transactions displayed per page |
sort | 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 resultsSample Response
{
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"14850982",
"timeStamp":"1623170270",
"hash":"0xc7e34fcd65a2082c446707b49a0002c1ec30964bbb873da3d5e59edf850d842f",
"from":"0xdfab03c9fbdbef66da105b88776b35bfd7743d39",
"to":"",
"value":"0",
"contractAddress":"0xc198d5539b335c48a0eaf49136df2f5ced3b160d",
"input":"",
"type":"create2",
"gas":"2860909",
"gasUsed":"9031",
"traceId":"0_1",
"isError":"0",
"errCode":""
},
{
"blockNumber":"14922863",
"timeStamp":"1623320956",
"hash":"0x370193c8c6daeb0503333cb73066a2a79d9364d5ada80fc8a6a467cfa65a9829",
"from":"0xdfab03c9fbdbef66da105b88776b35bfd7743d39",
"to":"",
"value":"0",
"contractAddress":"0x7119442c7e627438deb0ec59291e31378f88dd06",
"input":"",
"type":"create2",
"gas":"2860980",
"gasUsed":"9031",
"traceId":"0_1",
"isError":"0",
"errCode":""
}
]
}
Returns the list of internal transactions performed within a transaction.
Note : This API endpoint returns a maximum of 10000 records only.
📝
https://api-testnet.polygonscan.com/api
?module=account
&action=txlistinternal
&txhash=0x927c3a03cb554d7bfe4ed9f037fd86a98272801d50a08e4beab1d11002a4fb81
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
txhash | the string representing the transaction hash to check for internal transactions |
Sample Response
{
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"20174713",
"timeStamp":"1634226655",
"from":"0xdfab03c9fbdbef66da105b88776b35bfd7743d39",
"to":"",
"value":"0",
"contractAddress":"0xbee9e9d6ff91c091a78e0b702de7ba3e45f59b74",
"input":"",
"type":"create2",
"gas":"327139",
"gasUsed":"9031",
"isError":"0",
"errCode":""
}
]
}
The
isError
field returns 0
for successful transactions and 1
for rejected/cancelled transactions.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-testnet.polygonscan.com/api
?module=account
&action=txlistinternal
&startblock=19568000
&endblock=19569000
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
startblock | the integer block number to start searching for transactions |
endblock | the integer block number to stop searching for transactions |
page | the integer page number, if pagination is enabled |
offset | the number of transactions displayed per page |
sort | the sorting preference, use asc to sort by ascending and desc to sort by descending |
Sample Response
{
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"19568003",
"timeStamp":"1632967886",
"hash":"0xd38bc5991728eb5c241f3bf28538bcaa7648aa0303e2111a081c3a4a8c1bcd24",
"from":"0x05352c7d52d792519974f1385c0c3b61a179a4c1",
"to":"0x708621fea6a3e127f775886f4fcc5a7edc6cc736",
"value":"10000000000000000",
"contractAddress":"",
"input":"",
"type":"call",
"gas":"0",
"gasUsed":"0",
"traceId":"0_1",
"isError":"0",
"errCode":""
},
{
"blockNumber":"19568025",
"timeStamp":"1632967930",
"hash":"0xec6e3cdf1a555d68965c1b6d8ce50b7541917fb7ffb20da736ff19505cdc0ad3",
"from":"0x54d7d347430cde85b2f847a672df250ec0551a42",
"to":"0xb9249fc2c91232926243a7b70397f5775286a1a6",
"value":"19600000000000000",
"contractAddress":"",
"input":"",
"type":"call",
"gas":"0",
"gasUsed":"0",
"traceId":"0_1",
"isError":"0",
"errCode":""
}
]
}
The
isError
field returns 0
for successful transactions and 1
for rejected/cancelled transactions.Returns the list of ERC-20 tokens transferred by an address, with optional filtering by token contract.
https://api-testnet.polygonscan.com/api
?module=account
&action=tokentx
&contractaddress=0xa3bcff6aa08ff0ca764e65a9579748c7e676e566
&address=0x312012c6637c4071d4c7f802587a6a90f0ee17fb
&page=1
&offset=5
&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
andcontract address
parameters.
Request
Response
Query Parameters
Parameter | Description |
---|---|
address | the string representing the address to check for balance |
contractaddress | the string representing the token contract address to check for balance |
page | the integer page number, if pagination is enabled |
offset | the number of transactions displayed per page |
sort | the sorting preference, use asc to sort by ascending and desc to sort by descending |
Sample Response
{
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"19757953",
"timeStamp":"1633360686",
"hash":"0x9aaf1589dd5b57f318a2df5d82ee802d1bbf0b52ce1a6b5daff81b6ef590a2e8",
"nonce":"0",
"blockHash":"0xa6a9672d5ca4223fc1ebd523e4c03b8ccb4dca0f5c44920ea3e9cc4b6e88f272",
"from":"0x80cdb12b33135d14a8a12b0d551d55edfdfaf578",
"contractAddress":"0xa3bcff6aa08ff0ca764e65a9579748c7e676e566",
"to":"0x312012c6637c4071d4c7f802587a6a90f0ee17fb",
"value":"1000000000000000000000",
"tokenName":"MDAI",
"tokenSymbol":"MDAI",
"tokenDecimal":"18",
"transactionIndex":"1",
"gas":"264236",
"gasPrice":"10000000000",
"gasUsed":"264236",
"cumulativeGasUsed":"299096",
"input":"deprecated",
"confirmations":"417080"
},
{
"blockNumber":"19775851",
"timeStamp":"1633397854",
"hash":"0x30ceff11c8fcce44e7301504f869800f595fe21f0d6fb48284c3392831786296",
"nonce":"2",
"blockHash":"0xa11f9986fba6a02656f169cd35199fcbfe48c35814a8f6f01c28090e1d31a007",
"from":"0x0a9300abd764a86784ed7c3d07314b190a1d6231",
"contractAddress":"0xa3bcff6aa08ff0ca764e65a9579748c7e676e566",
"to":"0x312012c6637c4071d4c7f802587a6a90f0ee17fb",
"value":"0",
"tokenName":"MDAI",
"tokenSymbol":"MDAI",
"tokenDecimal":"18",
"transactionIndex":"0",
"gas":"86580",
"gasPrice":"4000000000",
"gasUsed":"57720",
"cumulativeGasUsed":"57720",
"input":"deprecated",
"confirmations":"399182"
}
]
}
Returns the list of ERC-721 ( NFT ) tokens transferred by an address, with optional filtering by token contract.
https://api-testnet.polygonscan.com/api
?module=account
&action=tokennfttx
&contractaddress=0xd6f9e7defa52ac67cdfd6a9a352ce6e0a9684b0a
&address=0xbb282ced765a2a2573747f04101cabd2adab8f45
&page=1
&offset=100
&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
andcontract address
parameters.
Request
Response
Query Parameters
Parameter | Description |
---|---|
address | the string representing the address to check for balance |
contractaddress | the string representing the token contract address to check for balance |
page | the integer page number, if pagination is enabled |
offset | the number of transactions displayed per page |
sort | the sorting preference, use asc to sort by ascending and desc to sort by descending |
Sample Response
{
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"18597440",
"timeStamp":"1630960097",
"hash":"0x0391b0b66457b45f77b0107ab0f96f82a76e3089da86fc1f560817f1f2d67a2b",
"nonce":"0",
"blockHash":"0x2dcc4c772282d504e4da64046e3bfacfb17092558cb6422f73890acb1690c96d",
"from":"0x9ea7783b3e45213e0da1e9fe7bca3b7362f052b1",
"contractAddress":"0xd6f9e7defa52ac67cdfd6a9a352ce6e0a9684b0a",
"to":"0xbb282ced765a2a2573747f04101cabd2adab8f45",
"tokenID":"374",
"tokenName":"MoonieNFT",
"tokenSymbol":"MOONIE",
"tokenDecimal":"0",
"transactionIndex":"2",
"gas":"0",
"gasPrice":"0",
"gasUsed":"0",
"cumulativeGasUsed":"0",
"input":"deprecated",
"confirmations":"1577636"
},
{
"blockNumber":"18597440",
"timeStamp":"1630960097",
"hash":"0x0391b0b66457b45f77b0107ab0f96f82a76e3089da86fc1f560817f1f2d67a2b",
"nonce":"0",
"blockHash":"0x2dcc4c772282d504e4da64046e3bfacfb17092558cb6422f73890acb1690c96d",
"from":"0x9ea7783b3e45213e0da1e9fe7bca3b7362f052b1",
"contractAddress":"0xd6f9e7defa52ac67cdfd6a9a352ce6e0a9684b0a",
"to":"0xbb282ced765a2a2573747f04101cabd2adab8f45",
"tokenID":"455",
"tokenName":"MoonieNFT",
"tokenSymbol":"MOONIE",
"tokenDecimal":"0",
"transactionIndex":"2",
"gas":"0",
"gasPrice":"0",
"gasUsed":"0",
"cumulativeGasUsed":"0",
"input":"deprecated",
"confirmations":"1577636"
}
]
}
Returns the list of blocks validated by an address.
https://api-testnet.polygonscan.com/api
?module=account
&action=getminedblocks
&address=0xc26880a0af2ea0c7e8130e6ec47af756465452e8
&blocktype=blocks
&page=1
&offset=10
&apikey=YourApiKeyToken
Request
Response
Query Parameters
Parameter | Description |
---|---|
address | the string representing the address to check for balance |
blocktype | the string pre-defined block type, blocks for canonical blocks |
page | the integer page number, if pagination is enabled |
offset | the number of transactions displayed per page |
Sample Response
{
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"20175095",
"timeStamp":"1634227443",
"blockReward":"3917894000000000"
},
{
"blockNumber":"20175094",
"timeStamp":"1634227441",
"blockReward":"1111176000000000"
},
{
"blockNumber":"20175093",
"timeStamp":"1634227439",
"blockReward":"1830072000000000"
}
]
}
Last modified 1yr ago