Get Ether Balance for a Single Address
Returns the Ether balance of a given address.
Copy https://api.lineascan.build/api
?module=account
&action=balance
&address=0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f
&tag=latest
&apikey=YourApiKeyToken
Try this endpoint in your browser
Request Response
Sample response
Copy {
"status":"1",
"message":"OK",
"result":"986620209929017246541w"
}
Get Ether Balance for Multiple Addresses in a Single Call
Returns the balance of the accounts from a list of addresses.
Copy https://api.lineascan.build/api
?module=account
&action=balancemulti
&address=0x292fc50e4eb66c3f6514b9e402dbc25961824d62,0x7c3892be12adf04deaec3909b2d849f341f61dbd,0x201a089de2bfd27066cba34bf9dd780665e39c72
&tag=latest
&apikey=YourApiKeyToken
Request Response
Sample Response
Copy {
"status":"1",
"message":"OK",
"result":[
{
"account":"0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
"balance":"0"
},
{
"account":"0x63a9975ba31b0b9626b34300f7f627147df1f526",
"balance":"0"
},
{
"account":"0x198ef1ec325a96cc354c7266a038be8b5c558f67",
"balance":"3041883228674873430418832286748734"
}
]
}
Get a list of 'Normal' Transactions By Address
Returns the list of transactions performed by an address, with optional pagination.
Copy https://api.lineascan.build/api
?module=account
&action=txlist
&address=0x7de2b2b6ad99d83f97ad3ea24bb36d2f5b800e00
&startblock=0
&endblock=latest
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Request Response
Sample Response
Copy {
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "16094",
"blockHash": "0xc903cff4c38da2dbc8bfd69fd8a6dedc52730296dc8eaee7d8d5c238874d91e4",
"timeStamp": "1689852393",
"hash": "0x6877dfde84d28b21dc1213787114f89e1b0e0174d01d168e3d84d4f5a8085382",
"nonce": "3",
"transactionIndex": "42",
"from": "0xe895e93d5c9f334e9575b2d7e9e8bc2dbd46e893",
"to": "0x7de2b2b6ad99d83f97ad3ea24bb36d2f5b800e00",
"value": "0",
"gas": "46098",
"gasPrice": "1794572597",
"input": "0x095ea7b300000000000000000000000000dfeb5761f17ae83e9d3249d23f09eab355f1f9000000000000000000000000000000000000000000000000005d02c2987713b3",
"methodId": "0x095ea7b3",
"functionName": "approve(address spender,uint256 amount)",
"contractAddress": "",
"cumulativeGasUsed": "3689071",
"txreceipt_status": "1",
"gasUsed": "46098",
"confirmations": "34237",
"isError": "0"
},
{
"blockNumber": "16145",
"blockHash": "0x829b020599dd7ce41ea64c5e960d06759bf31de7bca4d1bda37b1139134f13ec",
"timeStamp": "1689853005",
"hash": "0x61ea4a497ff169c93d2d5e372a66280e57e9b472a590763676da170f6155d2e8",
"nonce": "10",
"transactionIndex": "29",
"from": "0xd42d4a12717a0b764b49f34044ae0259db2ad308",
"to": "0x7de2b2b6ad99d83f97ad3ea24bb36d2f5b800e00",
"value": "0",
"gas": "46110",
"gasPrice": "2031344900",
"input": "0x095ea7b300000000000000000000000000dfeb5761f17ae83e9d3249d23f09eab355f1f900000000000000000000000000000000000000000000000011645d804fbb62ca",
"methodId": "0x095ea7b3",
"functionName": "approve(address spender,uint256 amount)",
"contractAddress": "",
"cumulativeGasUsed": "2484341",
"txreceipt_status": "1",
"gasUsed": "46110",
"confirmations": "34186",
"isError": "0"
}
]
}
Get a list of 'Internal' Transactions by Address
Returns the list of internal transactions performed by an address, with optional pagination.
Copy https://api.lineascan.build/api
?module=account
&action=txlistinternal
&address=0x7de2b2b6ad99d83f97ad3ea24bb36d2f5b800e00
&startblock=0
&endblock=latest
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Request Response
Sample Response
Copy {
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "15443",
"timeStamp": "1689844579",
"hash": "0x65aaea45ac66ad8b382a1b7778825ae5b7c6b05bfa84fba93ed7cd52d11cd80c",
"from": "0x6d1063f2187442cc9adbfad2f55a96b846fcb399",
"to": "",
"value": "0",
"contractAddress": "0x7de2b2b6ad99d83f97ad3ea24bb36d2f5b800e00",
"input": "",
"type": "create2",
"gas": "3519584",
"gasUsed": "2948662",
"traceId": "0_1_1",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "15443",
"timeStamp": "1689844579",
"hash": "0x65aaea45ac66ad8b382a1b7778825ae5b7c6b05bfa84fba93ed7cd52d11cd80c",
"from": "0x6d1063f2187442cc9adbfad2f55a96b846fcb399",
"to": "0x7de2b2b6ad99d83f97ad3ea24bb36d2f5b800e00",
"value": "0",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "616597",
"gasUsed": "44628",
"traceId": "0_1_1",
"isError": "0",
"errCode": ""
}
]
}
Get 'Internal Transactions' by Transaction Hash
Returns the list of internal transactions performed within a transaction.
Copy https://api.lineascan.build/api
?module=account
&action=txlistinternal
&txhash=0x65aaea45ac66ad8b382a1b7778825ae5b7c6b05bfa84fba93ed7cd52d11cd80c
&apikey=YourApiKeyToken
Request Response
Sample Response
Copy {
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "15443",
"timeStamp": "1689844579",
"from": "0x6d1063f2187442cc9adbfad2f55a96b846fcb399",
"to": "",
"value": "0",
"contractAddress": "0x7de2b2b6ad99d83f97ad3ea24bb36d2f5b800e00",
"input": "",
"type": "create2",
"gas": "3519584",
"gasUsed": "2948662",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "15443",
"timeStamp": "1689844579",
"from": "0xc66149996d0263c0b42d3bc05e50db88658106ce",
"to": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
"value": "1000000000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "508566",
"gasUsed": "23974",
"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.
Copy https://api.lineascan.build/api
?module=account
&action=txlistinternal
&startblock=50346
&endblock=50348
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Request Response
Sample Response
Copy {
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "50346",
"timeStamp": "1690269771",
"hash": "0xf7fd21c4614f934529653a349574a98ff548ef8ee83701c318b48d5f568a79d1",
"from": "0xa658742d33ebd2ce2f0bdff73515aa797fd161d9",
"to": "0x5b19bd330a84c049b62d5b0fc2ba120217a18c1c",
"value": "0",
"contractAddress": "",
"input": "",
"type": "delegatecall",
"gas": "1497232",
"gasUsed": "145795",
"traceId": "0_1",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "50346",
"timeStamp": "1690269771",
"hash": "0xf7fd21c4614f934529653a349574a98ff548ef8ee83701c318b48d5f568a79d1",
"from": "0xa658742d33ebd2ce2f0bdff73515aa797fd161d9",
"to": "0x38de71124f7a447a01d67945a51edce9ff491251",
"value": "0",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "1458583",
"gasUsed": "130138",
"traceId": "0_1_1",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "50346",
"timeStamp": "1690269771",
"hash": "0xf7fd21c4614f934529653a349574a98ff548ef8ee83701c318b48d5f568a79d1",
"from": "0x38de71124f7a447a01d67945a51edce9ff491251",
"to": "0xc1b15d3b262beec0e3565c11c9e0f6134bdacb36",
"value": "0",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "1415123",
"gasUsed": "5801",
"traceId": "0_1_1_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.
Copy https://api.lineascan.build/api
?module=account
&action=tokentx
&contractaddress=0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f
&address=0x975a03ffccbdb080655952eae6b608931a84a7cb
&page=1
&offset=100
&startblock=0
&endblock=27025780
&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.
Request Response
Sample Response
Copy {
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "28134",
"timeStamp": "1690002783",
"hash": "0x12b3dad1ad1aae621aeca07797b7b7a06708eb460269716b78cd7fc60cecbf0a",
"nonce": "15",
"blockHash": "0x4fd565827ac7fc17c705d97748561b21a1c632b20fc4602e07220db013a7b30f",
"from": "0x975a03ffccbdb080655952eae6b608931a84a7cb",
"contractAddress": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
"to": "0xe2df725e44ab983e8513ecfc9c3e13bc21ea867e",
"value": "3434346192354082696",
"tokenName": "Wrapped Ether",
"tokenSymbol": "WETH",
"tokenDecimal": "18",
"transactionIndex": "10",
"gas": "519616",
"gasPrice": "1656172933",
"gasUsed": "395789",
"cumulativeGasUsed": "5092383",
"input": "deprecated",
"confirmations": "22231"
}
]
}
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.
Copy https://api.lineascan.build/api
?module=account
&action=tokennfttx
&contractaddress=0x33084a2A5e90622033cAAc1Fe1aa0ED2De41cf4b
&address=0xb0b9cbd9b3b10fbec20aaf819dfc29c9936089e4
&page=1
&offset=100
&startblock=0
&endblock=27025780
&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.
Request Response
Sample Response
Copy {
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "8907",
"timeStamp": "1689766063",
"hash": "0x591bf0683411ad5804b8c0c49ab15fe6f715d5c7e13760726ce9399f30f13b9b",
"nonce": "0",
"blockHash": "0xc7de2f14ce3768e15af9b80b04808a5514201d3254ee199a0100d105040f6efb",
"from": "0xda4c3eb39707ad82ea7a31afd42bdf850fed8f41",
"contractAddress": "0x33084a2a5e90622033caac1fe1aa0ed2de41cf4b",
"to": "0xb0b9cbd9b3b10fbec20aaf819dfc29c9936089e4",
"tokenID": "30074375349064411345983190144248654746809175412128699869841413320033691008784",
"tokenName": "Linea Name Service",
"tokenSymbol": "LineaNS",
"tokenDecimal": "0",
"transactionIndex": "15",
"gas": "500000",
"gasPrice": "1630301220",
"gasUsed": "427700",
"cumulativeGasUsed": "6095386",
"input": "deprecated",
"confirmations": "41471"
},
{
"blockNumber": "8921",
"timeStamp": "1689766231",
"hash": "0xd5efbd09273ae1670b064bae2eb5ef0afc0528d6ed17d6fb3000bf1a9a5207bc",
"nonce": "1",
"blockHash": "0xdbe5bbf928186d03fa476cc5441b7f8b9990a5d295d8a33cddfacfa32809d4dc",
"from": "0xda4c3eb39707ad82ea7a31afd42bdf850fed8f41",
"contractAddress": "0x33084a2a5e90622033caac1fe1aa0ed2de41cf4b",
"to": "0xb0b9cbd9b3b10fbec20aaf819dfc29c9936089e4",
"tokenID": "10136389257050035111531801965779521400138329621773098639483933015936976820004",
"tokenName": "Linea Name Service",
"tokenSymbol": "LineaNS",
"tokenDecimal": "0",
"transactionIndex": "62",
"gas": "500000",
"gasPrice": "1630301213",
"gasUsed": "403885",
"cumulativeGasUsed": "7967692",
"input": "deprecated",
"confirmations": "41457"
}
]
}
Get a list of 'ERC1155 - Token Transfer Events' by Address
Returns the list of ERC-1155 ( Multi Token Standard ) tokens transferred by an address, with optional filtering by token contract.
Copy https://api.lineascan.build/api
?module=account
&action=token1155tx
&contractaddress=0x0872ec4426103482a50f26Ffc32aCEfcec61b3c9
&address=0x32e9a9d06999a600061d34cb9df05d94fa3f74a8
&page=1
&offset=100
&startblock=0
&endblock=99999999
&sort=asc
&apikey=YourApiKeyToken
Usage:
ERC-1155 transfers from an address , specify the address
parameter
ERC-1155 transfers from a contract address , specify the contract address
parameter
ERC-1155 transfers from an address filtered by a token contract , specify both address
and contract address
parameters.
Request Response
Sample Response
Copy {
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "815376",
"timeStamp": "1699490171",
"hash": "0xa7ccb54ed9a6aa807aba525d8f63344a9ad7c34c9e4a9fa740cf0e0f64d771e6",
"nonce": "0",
"blockHash": "0x5c585f231f856e59d2e2494053b5e9b548ab30b75a46d58d144f92b3dd8fdd84",
"transactionIndex": "3",
"gas": "818672",
"gasPrice": "2757618621",
"gasUsed": "568611",
"cumulativeGasUsed": "741683",
"input": "deprecated",
"contractAddress": "0x0872ec4426103482a50f26ffc32acefcec61b3c9",
"from": "0x41c1d719baf2e88b9d7b2331440c50c94d438c65",
"to": "0x32e9a9d06999a600061d34cb9df05d94fa3f74a8",
"tokenID": "2",
"tokenValue": "1",
"tokenName": "Linea Voyage",
"tokenSymbol": "VOYAGE",
"confirmations": "1947"
},
{
"blockNumber": "815376",
"timeStamp": "1699490171",
"hash": "0xa7ccb54ed9a6aa807aba525d8f63344a9ad7c34c9e4a9fa740cf0e0f64d771e6",
"nonce": "0",
"blockHash": "0x5c585f231f856e59d2e2494053b5e9b548ab30b75a46d58d144f92b3dd8fdd84",
"transactionIndex": "3",
"gas": "818672",
"gasPrice": "2757618621",
"gasUsed": "568611",
"cumulativeGasUsed": "741683",
"input": "deprecated",
"contractAddress": "0x0872ec4426103482a50f26ffc32acefcec61b3c9",
"from": "0xbceda22fa2361ef0fbbf1ac99c83a39278d6dd66",
"to": "0x32e9a9d06999a600061d34cb9df05d94fa3f74a8",
"tokenID": "1",
"tokenValue": "1",
"tokenName": "Linea Voyage",
"tokenSymbol": "VOYAGE",
"confirmations": "1947"
}
]
}
Returns the historical ETH balance of an address at a certain block height.
Copy https://api.lineascan.build/api
?module=account
&action=balancehistory
&address=0x1336F0cbcD2B67A788ec1eF6a37f7E1c2Dcc47E1
&blockno=5343368
&apikey=YourApiKeyToken
Request Response
Sample Response
Copy {
"status": "1",
"message": "OK",
"result": "21988485865935486"
}